DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List Fastly accounts returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);apiInstance.listFastlyAccounts().then((data: v2.FastlyAccountsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Add Fastly account returns "CREATED" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);constparams: v2.FastlyIntegrationApiCreateFastlyAccountRequest={body:{data:{attributes:{apiKey:"ExampleFastlyIntegration",name:"Example-Fastly-Integration",services:[],},type:"fastly-accounts",},},};apiInstance.createFastlyAccount(params).then((data: v2.FastlyAccountResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Get Fastly account returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.fastly_integration_apiimportFastlyIntegrationApi# there is a valid "fastly_account" in the systemFASTLY_ACCOUNT_DATA_ID=environ["FASTLY_ACCOUNT_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=FastlyIntegrationApi(api_client)response=api_instance.get_fastly_account(account_id=FASTLY_ACCOUNT_DATA_ID,)print(response)
# Get Fastly account returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::FastlyIntegrationAPI.new# there is a valid "fastly_account" in the systemFASTLY_ACCOUNT_DATA_ID=ENV["FASTLY_ACCOUNT_DATA_ID"]papi_instance.get_fastly_account(FASTLY_ACCOUNT_DATA_ID)
// Get Fastly account returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "fastly_account" in the systemFastlyAccountDataID:=os.Getenv("FASTLY_ACCOUNT_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewFastlyIntegrationApi(apiClient)resp,r,err:=api.GetFastlyAccount(ctx,FastlyAccountDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `FastlyIntegrationApi.GetFastlyAccount`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `FastlyIntegrationApi.GetFastlyAccount`:\n%s\n",responseContent)}
// Get Fastly account returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.FastlyIntegrationApi;importcom.datadog.api.client.v2.model.FastlyAccountResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();FastlyIntegrationApiapiInstance=newFastlyIntegrationApi(defaultClient);// there is a valid "fastly_account" in the systemStringFASTLY_ACCOUNT_DATA_ID=System.getenv("FASTLY_ACCOUNT_DATA_ID");try{FastlyAccountResponseresult=apiInstance.getFastlyAccount(FASTLY_ACCOUNT_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling FastlyIntegrationApi#getFastlyAccount");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get Fastly account returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_fastly_integration::FastlyIntegrationAPI;#[tokio::main]asyncfnmain(){// there is a valid "fastly_account" in the system
letfastly_account_data_id=std::env::var("FASTLY_ACCOUNT_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=FastlyIntegrationAPI::with_config(configuration);letresp=api.get_fastly_account(fastly_account_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get Fastly account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);// there is a valid "fastly_account" in the system
constFASTLY_ACCOUNT_DATA_ID=process.env.FASTLY_ACCOUNT_DATA_IDasstring;constparams: v2.FastlyIntegrationApiGetFastlyAccountRequest={accountId: FASTLY_ACCOUNT_DATA_ID,};apiInstance.getFastlyAccount(params).then((data: v2.FastlyAccountResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update Fastly account returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "fastly_account" in the systemFastlyAccountDataID:=os.Getenv("FASTLY_ACCOUNT_DATA_ID")body:=datadogV2.FastlyAccountUpdateRequest{Data:datadogV2.FastlyAccountUpdateRequestData{Attributes:&datadogV2.FastlyAccountUpdateRequestAttributes{ApiKey:datadog.PtrString("update-secret"),},Type:datadogV2.FASTLYACCOUNTTYPE_FASTLY_ACCOUNTS.Ptr(),},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewFastlyIntegrationApi(apiClient)resp,r,err:=api.UpdateFastlyAccount(ctx,FastlyAccountDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `FastlyIntegrationApi.UpdateFastlyAccount`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `FastlyIntegrationApi.UpdateFastlyAccount`:\n%s\n",responseContent)}
// Update Fastly account returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.FastlyIntegrationApi;importcom.datadog.api.client.v2.model.FastlyAccountResponse;importcom.datadog.api.client.v2.model.FastlyAccountType;importcom.datadog.api.client.v2.model.FastlyAccountUpdateRequest;importcom.datadog.api.client.v2.model.FastlyAccountUpdateRequestAttributes;importcom.datadog.api.client.v2.model.FastlyAccountUpdateRequestData;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();FastlyIntegrationApiapiInstance=newFastlyIntegrationApi(defaultClient);// there is a valid "fastly_account" in the systemStringFASTLY_ACCOUNT_DATA_ID=System.getenv("FASTLY_ACCOUNT_DATA_ID");FastlyAccountUpdateRequestbody=newFastlyAccountUpdateRequest().data(newFastlyAccountUpdateRequestData().attributes(newFastlyAccountUpdateRequestAttributes().apiKey("update-secret")).type(FastlyAccountType.FASTLY_ACCOUNTS));try{FastlyAccountResponseresult=apiInstance.updateFastlyAccount(FASTLY_ACCOUNT_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling FastlyIntegrationApi#updateFastlyAccount");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update Fastly account returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.fastly_integration_apiimportFastlyIntegrationApifromdatadog_api_client.v2.model.fastly_account_typeimportFastlyAccountTypefromdatadog_api_client.v2.model.fastly_account_update_requestimportFastlyAccountUpdateRequestfromdatadog_api_client.v2.model.fastly_account_update_request_attributesimportFastlyAccountUpdateRequestAttributesfromdatadog_api_client.v2.model.fastly_account_update_request_dataimportFastlyAccountUpdateRequestData# there is a valid "fastly_account" in the systemFASTLY_ACCOUNT_DATA_ID=environ["FASTLY_ACCOUNT_DATA_ID"]body=FastlyAccountUpdateRequest(data=FastlyAccountUpdateRequestData(attributes=FastlyAccountUpdateRequestAttributes(api_key="update-secret",),type=FastlyAccountType.FASTLY_ACCOUNTS,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=FastlyIntegrationApi(api_client)response=api_instance.update_fastly_account(account_id=FASTLY_ACCOUNT_DATA_ID,body=body)print(response)
# Update Fastly account returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::FastlyIntegrationAPI.new# there is a valid "fastly_account" in the systemFASTLY_ACCOUNT_DATA_ID=ENV["FASTLY_ACCOUNT_DATA_ID"]body=DatadogAPIClient::V2::FastlyAccountUpdateRequest.new({data:DatadogAPIClient::V2::FastlyAccountUpdateRequestData.new({attributes:DatadogAPIClient::V2::FastlyAccountUpdateRequestAttributes.new({api_key:"update-secret",}),type:DatadogAPIClient::V2::FastlyAccountType::FASTLY_ACCOUNTS,}),})papi_instance.update_fastly_account(FASTLY_ACCOUNT_DATA_ID,body)
// Update Fastly account returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_fastly_integration::FastlyIntegrationAPI;usedatadog_api_client::datadogV2::model::FastlyAccountType;usedatadog_api_client::datadogV2::model::FastlyAccountUpdateRequest;usedatadog_api_client::datadogV2::model::FastlyAccountUpdateRequestAttributes;usedatadog_api_client::datadogV2::model::FastlyAccountUpdateRequestData;#[tokio::main]asyncfnmain(){// there is a valid "fastly_account" in the system
letfastly_account_data_id=std::env::var("FASTLY_ACCOUNT_DATA_ID").unwrap();letbody=FastlyAccountUpdateRequest::new(FastlyAccountUpdateRequestData::new().attributes(FastlyAccountUpdateRequestAttributes::new().api_key("update-secret".to_string()),).type_(FastlyAccountType::FASTLY_ACCOUNTS),);letconfiguration=datadog::Configuration::new();letapi=FastlyIntegrationAPI::with_config(configuration);letresp=api.update_fastly_account(fastly_account_data_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update Fastly account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);// there is a valid "fastly_account" in the system
constFASTLY_ACCOUNT_DATA_ID=process.env.FASTLY_ACCOUNT_DATA_IDasstring;constparams: v2.FastlyIntegrationApiUpdateFastlyAccountRequest={body:{data:{attributes:{apiKey:"update-secret",},type:"fastly-accounts",},},accountId: FASTLY_ACCOUNT_DATA_ID,};apiInstance.updateFastlyAccount(params).then((data: v2.FastlyAccountResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete Fastly account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);constparams: v2.FastlyIntegrationApiDeleteFastlyAccountRequest={accountId:"account_id",};apiInstance.deleteFastlyAccount(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List Fastly services returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);constparams: v2.FastlyIntegrationApiListFastlyServicesRequest={accountId:"account_id",};apiInstance.listFastlyServices(params).then((data: v2.FastlyServicesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Add Fastly service returns "CREATED" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);constparams: v2.FastlyIntegrationApiCreateFastlyServiceRequest={body:{data:{attributes:{tags:["myTag","myTag2:myValue"],},id:"abc123",type:"fastly-services",},},accountId:"account_id",};apiInstance.createFastlyService(params).then((data: v2.FastlyServiceResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Get Fastly service returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.fastly_integration_apiimportFastlyIntegrationApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=FastlyIntegrationApi(api_client)response=api_instance.get_fastly_service(account_id="account_id",service_id="service_id",)print(response)
# Get Fastly service returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::FastlyIntegrationAPI.newpapi_instance.get_fastly_service("account_id","service_id")
// Get Fastly service returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewFastlyIntegrationApi(apiClient)resp,r,err:=api.GetFastlyService(ctx,"account_id","service_id")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `FastlyIntegrationApi.GetFastlyService`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `FastlyIntegrationApi.GetFastlyService`:\n%s\n",responseContent)}
// Get Fastly service returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.FastlyIntegrationApi;importcom.datadog.api.client.v2.model.FastlyServiceResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();FastlyIntegrationApiapiInstance=newFastlyIntegrationApi(defaultClient);try{FastlyServiceResponseresult=apiInstance.getFastlyService("account_id","service_id");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling FastlyIntegrationApi#getFastlyService");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get Fastly service returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_fastly_integration::FastlyIntegrationAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=FastlyIntegrationAPI::with_config(configuration);letresp=api.get_fastly_service("account_id".to_string(),"service_id".to_string()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get Fastly service returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);constparams: v2.FastlyIntegrationApiGetFastlyServiceRequest={accountId:"account_id",serviceId:"service_id",};apiInstance.getFastlyService(params).then((data: v2.FastlyServiceResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update Fastly service returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);constparams: v2.FastlyIntegrationApiUpdateFastlyServiceRequest={body:{data:{attributes:{tags:["myTag","myTag2:myValue"],},id:"abc123",type:"fastly-services",},},accountId:"account_id",serviceId:"service_id",};apiInstance.updateFastlyService(params).then((data: v2.FastlyServiceResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete Fastly service returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.FastlyIntegrationApi(configuration);constparams: v2.FastlyIntegrationApiDeleteFastlyServiceRequest={accountId:"account_id",serviceId:"service_id",};apiInstance.deleteFastlyService(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));