이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다. 현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.
Org Connections
Manage connections between organizations. Org connections allow for controlled sharing of data between different Datadog organizations. See the Cross-Organization Visibiltiy page for more information.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List Org Connections returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrgConnectionsApi(configuration);apiInstance.listOrgConnections().then((data: v2.OrgConnectionListResponse)=>{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="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Create Org Connection returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrgConnectionsApi(configuration);constparams: v2.OrgConnectionsApiCreateOrgConnectionsRequest={body:{data:{type:"org_connection",relationships:{sinkOrg:{data:{type:"orgs",id:"83999dcd-7f97-11f0-8de1-1ecf66f1aa85",},},},attributes:{connectionTypes:["logs"],},},},};apiInstance.createOrgConnections(params).then((data: v2.OrgConnectionResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update Org Connection 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""github.com/google/uuid")funcmain(){// there is a valid "org_connection" in the systemOrgConnectionDataID:=uuid.MustParse(os.Getenv("ORG_CONNECTION_DATA_ID"))body:=datadogV2.OrgConnectionUpdateRequest{Data:datadogV2.OrgConnectionUpdate{Type:datadogV2.ORGCONNECTIONTYPE_ORG_CONNECTION,Id:OrgConnectionDataID,Attributes:datadogV2.OrgConnectionUpdateAttributes{ConnectionTypes:[]datadogV2.OrgConnectionTypeEnum{datadogV2.ORGCONNECTIONTYPEENUM_LOGS,datadogV2.ORGCONNECTIONTYPEENUM_METRICS,},},},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewOrgConnectionsApi(apiClient)resp,r,err:=api.UpdateOrgConnections(ctx,OrgConnectionDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OrgConnectionsApi.UpdateOrgConnections`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OrgConnectionsApi.UpdateOrgConnections`:\n%s\n",responseContent)}
// Update Org Connection returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.OrgConnectionsApi;importcom.datadog.api.client.v2.model.OrgConnectionResponse;importcom.datadog.api.client.v2.model.OrgConnectionType;importcom.datadog.api.client.v2.model.OrgConnectionTypeEnum;importcom.datadog.api.client.v2.model.OrgConnectionUpdate;importcom.datadog.api.client.v2.model.OrgConnectionUpdateAttributes;importcom.datadog.api.client.v2.model.OrgConnectionUpdateRequest;importjava.util.Arrays;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();OrgConnectionsApiapiInstance=newOrgConnectionsApi(defaultClient);// there is a valid "org_connection" in the systemUUIDORG_CONNECTION_DATA_ID=null;try{ORG_CONNECTION_DATA_ID=UUID.fromString(System.getenv("ORG_CONNECTION_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}OrgConnectionUpdateRequestbody=newOrgConnectionUpdateRequest().data(newOrgConnectionUpdate().type(OrgConnectionType.ORG_CONNECTION).id(ORG_CONNECTION_DATA_ID).attributes(newOrgConnectionUpdateAttributes().connectionTypes(Arrays.asList(OrgConnectionTypeEnum.LOGS,OrgConnectionTypeEnum.METRICS))));try{OrgConnectionResponseresult=apiInstance.updateOrgConnections(ORG_CONNECTION_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling OrgConnectionsApi#updateOrgConnections");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update Org Connection returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.org_connections_apiimportOrgConnectionsApifromdatadog_api_client.v2.model.org_connection_typeimportOrgConnectionTypefromdatadog_api_client.v2.model.org_connection_type_enumimportOrgConnectionTypeEnumfromdatadog_api_client.v2.model.org_connection_updateimportOrgConnectionUpdatefromdatadog_api_client.v2.model.org_connection_update_attributesimportOrgConnectionUpdateAttributesfromdatadog_api_client.v2.model.org_connection_update_requestimportOrgConnectionUpdateRequest# there is a valid "org_connection" in the systemORG_CONNECTION_DATA_ID=environ["ORG_CONNECTION_DATA_ID"]body=OrgConnectionUpdateRequest(data=OrgConnectionUpdate(type=OrgConnectionType.ORG_CONNECTION,id=ORG_CONNECTION_DATA_ID,attributes=OrgConnectionUpdateAttributes(connection_types=[OrgConnectionTypeEnum.LOGS,OrgConnectionTypeEnum.METRICS,],),),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=OrgConnectionsApi(api_client)response=api_instance.update_org_connections(connection_id=ORG_CONNECTION_DATA_ID,body=body)print(response)
# Update Org Connection returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::OrgConnectionsAPI.new# there is a valid "org_connection" in the systemORG_CONNECTION_DATA_ID=ENV["ORG_CONNECTION_DATA_ID"]body=DatadogAPIClient::V2::OrgConnectionUpdateRequest.new({data:DatadogAPIClient::V2::OrgConnectionUpdate.new({type:DatadogAPIClient::V2::OrgConnectionType::ORG_CONNECTION,id:ORG_CONNECTION_DATA_ID,attributes:DatadogAPIClient::V2::OrgConnectionUpdateAttributes.new({connection_types:[DatadogAPIClient::V2::OrgConnectionTypeEnum::LOGS,DatadogAPIClient::V2::OrgConnectionTypeEnum::METRICS,],}),}),})papi_instance.update_org_connections(ORG_CONNECTION_DATA_ID,body)
// Update Org Connection returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_org_connections::OrgConnectionsAPI;usedatadog_api_client::datadogV2::model::OrgConnectionType;usedatadog_api_client::datadogV2::model::OrgConnectionTypeEnum;usedatadog_api_client::datadogV2::model::OrgConnectionUpdate;usedatadog_api_client::datadogV2::model::OrgConnectionUpdateAttributes;usedatadog_api_client::datadogV2::model::OrgConnectionUpdateRequest;#[tokio::main]asyncfnmain(){// there is a valid "org_connection" in the system
letorg_connection_data_id=uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap()).expect("Invalid UUID");letbody=OrgConnectionUpdateRequest::new(OrgConnectionUpdate::new(OrgConnectionUpdateAttributes::new(vec![OrgConnectionTypeEnum::LOGS,OrgConnectionTypeEnum::METRICS,]),org_connection_data_id.clone(),OrgConnectionType::ORG_CONNECTION,));letconfiguration=datadog::Configuration::new();letapi=OrgConnectionsAPI::with_config(configuration);letresp=api.update_org_connections(org_connection_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="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Update Org Connection returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrgConnectionsApi(configuration);// there is a valid "org_connection" in the system
constORG_CONNECTION_DATA_ID=process.env.ORG_CONNECTION_DATA_IDasstring;constparams: v2.OrgConnectionsApiUpdateOrgConnectionsRequest={body:{data:{type:"org_connection",id: ORG_CONNECTION_DATA_ID,attributes:{connectionTypes:["logs","metrics"],},},},connectionId: ORG_CONNECTION_DATA_ID,};apiInstance.updateOrgConnections(params).then((data: v2.OrgConnectionResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Delete Org Connection returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.org_connections_apiimportOrgConnectionsApi# there is a valid "org_connection" in the systemORG_CONNECTION_DATA_ID=environ["ORG_CONNECTION_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=OrgConnectionsApi(api_client)api_instance.delete_org_connections(connection_id=ORG_CONNECTION_DATA_ID,)
# Delete Org Connection returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::OrgConnectionsAPI.new# there is a valid "org_connection" in the systemORG_CONNECTION_DATA_ID=ENV["ORG_CONNECTION_DATA_ID"]papi_instance.delete_org_connections(ORG_CONNECTION_DATA_ID)
// Delete Org Connection returns "OK" responsepackagemainimport("context""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2""github.com/google/uuid")funcmain(){// there is a valid "org_connection" in the systemOrgConnectionDataID:=uuid.MustParse(os.Getenv("ORG_CONNECTION_DATA_ID"))ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewOrgConnectionsApi(apiClient)r,err:=api.DeleteOrgConnections(ctx,OrgConnectionDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OrgConnectionsApi.DeleteOrgConnections`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete Org Connection returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.OrgConnectionsApi;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();OrgConnectionsApiapiInstance=newOrgConnectionsApi(defaultClient);// there is a valid "org_connection" in the systemUUIDORG_CONNECTION_DATA_ID=null;try{ORG_CONNECTION_DATA_ID=UUID.fromString(System.getenv("ORG_CONNECTION_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}try{apiInstance.deleteOrgConnections(ORG_CONNECTION_DATA_ID);}catch(ApiExceptione){System.err.println("Exception when calling OrgConnectionsApi#deleteOrgConnections");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete Org Connection returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_org_connections::OrgConnectionsAPI;#[tokio::main]asyncfnmain(){// there is a valid "org_connection" in the system
letorg_connection_data_id=uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap()).expect("Invalid UUID");letconfiguration=datadog::Configuration::new();letapi=OrgConnectionsAPI::with_config(configuration);letresp=api.delete_org_connections(org_connection_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="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete Org Connection returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OrgConnectionsApi(configuration);// there is a valid "org_connection" in the system
constORG_CONNECTION_DATA_ID=process.env.ORG_CONNECTION_DATA_IDasstring;constparams: v2.OrgConnectionsApiDeleteOrgConnectionsRequest={connectionId: ORG_CONNECTION_DATA_ID,};apiInstance.deleteOrgConnections(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));