"""
List ownership inferences for a resource returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.csm_ownership_apiimportCSMOwnershipApiconfiguration=Configuration()configuration.unstable_operations["list_ownership_inferences"]=TruewithApiClient(configuration)asapi_client:api_instance=CSMOwnershipApi(api_client)response=api_instance.list_ownership_inferences(resource_id="test-resource",)print(response)
# List ownership inferences for a resource returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.list_ownership_inferences".to_sym]=trueendapi_instance=DatadogAPIClient::V2::CSMOwnershipAPI.newpapi_instance.list_ownership_inferences("test-resource")
// List ownership inferences for a resource 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()configuration.SetUnstableOperationEnabled("v2.ListOwnershipInferences",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewCSMOwnershipApi(apiClient)resp,r,err:=api.ListOwnershipInferences(ctx,"test-resource")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `CSMOwnershipApi.ListOwnershipInferences`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `CSMOwnershipApi.ListOwnershipInferences`:\n%s\n",responseContent)}
// List ownership inferences for a resource returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.CsmOwnershipApi;importcom.datadog.api.client.v2.model.OwnershipInferenceListResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.listOwnershipInferences",true);CsmOwnershipApiapiInstance=newCsmOwnershipApi(defaultClient);try{OwnershipInferenceListResponseresult=apiInstance.listOwnershipInferences("test-resource");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling CsmOwnershipApi#listOwnershipInferences");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// List ownership inferences for a resource returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_csm_ownership::CSMOwnershipAPI;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.ListOwnershipInferences",true);letapi=CSMOwnershipAPI::with_config(configuration);letresp=api.list_ownership_inferences("test-resource".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.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List ownership inferences for a resource returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.listOwnershipInferences"]=true;constapiInstance=newv2.CSMOwnershipApi(configuration);constparams: v2.CSMOwnershipApiListOwnershipInferencesRequest={resourceId:"test-resource",};apiInstance.listOwnershipInferences(params).then((data: v2.OwnershipInferenceListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));