// Create a Datadog GCP principal with empty body 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(){body:=new(interface{})ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewGCPIntegrationApi(apiClient)resp,r,err:=api.MakeGCPSTSDelegate(ctx,*datadogV2.NewMakeGCPSTSDelegateOptionalParameters().WithBody(body))iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `GCPIntegrationApi.MakeGCPSTSDelegate`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `GCPIntegrationApi.MakeGCPSTSDelegate`:\n%s\n",responseContent)}
// Create a Datadog GCP principal with empty body returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.GcpIntegrationApi;importcom.datadog.api.client.v2.api.GcpIntegrationApi.MakeGCPSTSDelegateOptionalParameters;importcom.datadog.api.client.v2.model.GCPSTSDelegateAccountResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();GcpIntegrationApiapiInstance=newGcpIntegrationApi(defaultClient);Objectbody=newObject();try{GCPSTSDelegateAccountResponseresult=apiInstance.makeGCPSTSDelegate(newMakeGCPSTSDelegateOptionalParameters().body(body));System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling GcpIntegrationApi#makeGCPSTSDelegate");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Create a Datadog GCP principal with empty body returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.gcp_integration_apiimportGCPIntegrationApibody=dict()configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=GCPIntegrationApi(api_client)response=api_instance.make_gcpsts_delegate(body=body)print(response)
# Create a Datadog GCP principal with empty body returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::GCPIntegrationAPI.newbody={}opts={body:body,}papi_instance.make_gcpsts_delegate(opts)
// Create a Datadog GCP principal with empty body returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_gcp_integration::GCPIntegrationAPI;usedatadog_api_client::datadogV2::api_gcp_integration::MakeGCPSTSDelegateOptionalParams;usestd::collections::BTreeMap;#[tokio::main]asyncfnmain(){letbody=BTreeMap::new();letconfiguration=datadog::Configuration::new();letapi=GCPIntegrationAPI::with_config(configuration);letresp=api.make_gcpsts_delegate(MakeGCPSTSDelegateOptionalParams::default().body(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.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Create a Datadog GCP principal with empty body returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.GCPIntegrationApi(configuration);constparams: v2.GCPIntegrationApiMakeGCPSTSDelegateRequest={body:{},};apiInstance.makeGCPSTSDelegate(params).then((data: v2.GCPSTSDelegateAccountResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));