## default
#
# Path parameters exportidp_id="00000000-0000-0000-0000-000000000001" # Use a Personal Access Token or Service Access Token exportDD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Update an identity provider returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V2::IdentityProvidersAPI.newbody=DatadogAPIClient::V2::IdentityProviderUpdateRequest.new({data:DatadogAPIClient::V2::IdentityProviderUpdateData.new({attributes:DatadogAPIClient::V2::IdentityProviderUpdateAttributes.new({enabled:true,}),id:"00000000-0000-0000-0000-000000000001",type:DatadogAPIClient::V2::IdentityProviderType::IDENTITY_PROVIDERS,}),})papi_instance.update_identity_provider("00000000-0000-0000-0000-000000000001",body)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Update an identity provider 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:=datadogV2.IdentityProviderUpdateRequest{Data:datadogV2.IdentityProviderUpdateData{Attributes:datadogV2.IdentityProviderUpdateAttributes{Enabled:true,},Id:"00000000-0000-0000-0000-000000000001",Type:datadogV2.IDENTITYPROVIDERTYPE_IDENTITY_PROVIDERS,},}ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewIdentityProvidersApi(apiClient)resp,r,err:=api.UpdateIdentityProvider(ctx,"00000000-0000-0000-0000-000000000001",body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `IdentityProvidersApi.UpdateIdentityProvider`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `IdentityProvidersApi.UpdateIdentityProvider`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Update an identity provider returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.IdentityProvidersApi;importcom.datadog.api.client.v2.model.IdentityProviderResponse;importcom.datadog.api.client.v2.model.IdentityProviderType;importcom.datadog.api.client.v2.model.IdentityProviderUpdateAttributes;importcom.datadog.api.client.v2.model.IdentityProviderUpdateData;importcom.datadog.api.client.v2.model.IdentityProviderUpdateRequest;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));IdentityProvidersApiapiInstance=newIdentityProvidersApi(defaultClient);IdentityProviderUpdateRequestbody=newIdentityProviderUpdateRequest().data(newIdentityProviderUpdateData().attributes(newIdentityProviderUpdateAttributes().enabled(true)).id("00000000-0000-0000-0000-000000000001").type(IdentityProviderType.IDENTITY_PROVIDERS));try{IdentityProviderResponseresult=apiInstance.updateIdentityProvider("00000000-0000-0000-0000-000000000001",body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling IdentityProvidersApi#updateIdentityProvider");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// Update an identity provider returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_identity_providers::IdentityProvidersAPI;usedatadog_api_client::datadogV2::model::IdentityProviderType;usedatadog_api_client::datadogV2::model::IdentityProviderUpdateAttributes;usedatadog_api_client::datadogV2::model::IdentityProviderUpdateData;usedatadog_api_client::datadogV2::model::IdentityProviderUpdateRequest;#[tokio::main]asyncfnmain(){letbody=IdentityProviderUpdateRequest::new(IdentityProviderUpdateData::new(IdentityProviderUpdateAttributes::new(true),"00000000-0000-0000-0000-000000000001".to_string(),IdentityProviderType::IDENTITY_PROVIDERS,));letconfiguration=datadog::Configuration::new();letapi=IdentityProvidersAPI::with_config(configuration);letresp=api.update_identity_provider("00000000-0000-0000-0000-000000000001".to_string(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Update an identity provider returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv2.IdentityProvidersApi(configuration);constparams: v2.IdentityProvidersApiUpdateIdentityProviderRequest={body:{data:{attributes:{enabled: true,},id:"00000000-0000-0000-0000-000000000001",type:"identity_providers",},},idpId:"00000000-0000-0000-0000-000000000001",};apiInstance.updateIdentityProvider(params).then((data: v2.IdentityProviderResponse)=>{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.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.