{"data":{"attributes":{"name":"fake-handle-name","space_display_name":"Fake Space Name","space_resource_name":"spaces/AAAAAAAAA"},"id":"596da4af-0563-4097-90ff-07230c3f9db3","type":"google-chat-organization-handle"}}
// Update organization handle 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 "organization_handle" in the systemOrganizationHandleDataID:=os.Getenv("ORGANIZATION_HANDLE_DATA_ID")body:=datadogV2.GoogleChatUpdateOrganizationHandleRequest{Data:datadogV2.GoogleChatUpdateOrganizationHandleRequestData{Attributes:datadogV2.GoogleChatUpdateOrganizationHandleRequestAttributes{Name:datadog.PtrString("fake-handle-name--updated"),},},Type:datadogV2.GOOGLECHATORGANIZATIONHANDLETYPE_GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE,}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewGoogleChatIntegrationApi(apiClient)resp,r,err:=api.UpdateOrganizationHandle(ctx,"e54cb570-c674-529c-769d-84b312288ed7",OrganizationHandleDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `GoogleChatIntegrationApi.UpdateOrganizationHandle`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `GoogleChatIntegrationApi.UpdateOrganizationHandle`:\n%s\n",responseContent)}
// Update organization handle returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.GoogleChatIntegrationApi;importcom.datadog.api.client.v2.model.GoogleChatOrganizationHandleResponse;importcom.datadog.api.client.v2.model.GoogleChatOrganizationHandleType;importcom.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequest;importcom.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequestAttributes;importcom.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequestData;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();GoogleChatIntegrationApiapiInstance=newGoogleChatIntegrationApi(defaultClient);// there is a valid "organization_handle" in the systemStringORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME=System.getenv("ORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME");StringORGANIZATION_HANDLE_DATA_ID=System.getenv("ORGANIZATION_HANDLE_DATA_ID");GoogleChatUpdateOrganizationHandleRequestbody=newGoogleChatUpdateOrganizationHandleRequest().data(newGoogleChatUpdateOrganizationHandleRequestData().attributes(newGoogleChatUpdateOrganizationHandleRequestAttributes().name("fake-handle-name--updated"))).type(GoogleChatOrganizationHandleType.GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE);try{GoogleChatOrganizationHandleResponseresult=apiInstance.updateOrganizationHandle("e54cb570-c674-529c-769d-84b312288ed7",ORGANIZATION_HANDLE_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling GoogleChatIntegrationApi#updateOrganizationHandle");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update organization handle returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.google_chat_integration_apiimportGoogleChatIntegrationApifromdatadog_api_client.v2.model.google_chat_organization_handle_typeimportGoogleChatOrganizationHandleTypefromdatadog_api_client.v2.model.google_chat_update_organization_handle_requestimport(GoogleChatUpdateOrganizationHandleRequest,)fromdatadog_api_client.v2.model.google_chat_update_organization_handle_request_attributesimport(GoogleChatUpdateOrganizationHandleRequestAttributes,)fromdatadog_api_client.v2.model.google_chat_update_organization_handle_request_dataimport(GoogleChatUpdateOrganizationHandleRequestData,)# there is a valid "organization_handle" in the systemORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME=environ["ORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME"]ORGANIZATION_HANDLE_DATA_ID=environ["ORGANIZATION_HANDLE_DATA_ID"]body=GoogleChatUpdateOrganizationHandleRequest(data=GoogleChatUpdateOrganizationHandleRequestData(attributes=GoogleChatUpdateOrganizationHandleRequestAttributes(name="fake-handle-name--updated",),),type=GoogleChatOrganizationHandleType.GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE,)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=GoogleChatIntegrationApi(api_client)response=api_instance.update_organization_handle(organization_binding_id="e54cb570-c674-529c-769d-84b312288ed7",handle_id=ORGANIZATION_HANDLE_DATA_ID,body=body)print(response)
# Update organization handle returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::GoogleChatIntegrationAPI.new# there is a valid "organization_handle" in the systemORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME=ENV["ORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME"]ORGANIZATION_HANDLE_DATA_ID=ENV["ORGANIZATION_HANDLE_DATA_ID"]body=DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequest.new({data:DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequestData.new({attributes:DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequestAttributes.new({name:"fake-handle-name--updated",}),}),type:DatadogAPIClient::V2::GoogleChatOrganizationHandleType::GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE,})papi_instance.update_organization_handle("e54cb570-c674-529c-769d-84b312288ed7",ORGANIZATION_HANDLE_DATA_ID,body)
// Update organization handle returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_google_chat_integration::GoogleChatIntegrationAPI;usedatadog_api_client::datadogV2::model::GoogleChatOrganizationHandleType;usedatadog_api_client::datadogV2::model::GoogleChatUpdateOrganizationHandleRequest;usedatadog_api_client::datadogV2::model::GoogleChatUpdateOrganizationHandleRequestAttributes;usedatadog_api_client::datadogV2::model::GoogleChatUpdateOrganizationHandleRequestData;#[tokio::main]asyncfnmain(){// there is a valid "organization_handle" in the system
letorganization_handle_data_id=std::env::var("ORGANIZATION_HANDLE_DATA_ID").unwrap();letbody=GoogleChatUpdateOrganizationHandleRequest::new(GoogleChatUpdateOrganizationHandleRequestData::new(GoogleChatUpdateOrganizationHandleRequestAttributes::new().name("fake-handle-name--updated".to_string()),),GoogleChatOrganizationHandleType::GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE,);letconfiguration=datadog::Configuration::new();letapi=GoogleChatIntegrationAPI::with_config(configuration);letresp=api.update_organization_handle("e54cb570-c674-529c-769d-84b312288ed7".to_string(),organization_handle_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.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update organization handle returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.GoogleChatIntegrationApi(configuration);// there is a valid "organization_handle" in the system
constORGANIZATION_HANDLE_DATA_ID=process.env.ORGANIZATION_HANDLE_DATA_IDasstring;constparams: v2.GoogleChatIntegrationApiUpdateOrganizationHandleRequest={body:{data:{attributes:{name:"fake-handle-name--updated",},},type:"google-chat-organization-handle",},organizationBindingId:"e54cb570-c674-529c-769d-84b312288ed7",handleId: ORGANIZATION_HANDLE_DATA_ID,};apiInstance.updateOrganizationHandle(params).then((data: v2.GoogleChatOrganizationHandleResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));