Get the value distribution for a specific agentless host facet, with optional search and filtering.
Arguments
Query Strings
Name
Type
Description
facet [required]
string
The facet identifier to retrieve value distribution for. Valid values are resource_name, account_id, resource_type, cloud_provider, has_vulnerability_scanning, and has_posture_management.
"""
Get agentless host facet info returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.csm_settings_apiimportCSMSettingsApiconfiguration=Configuration()configuration.unstable_operations["get_csm_agentless_host_facet_info"]=TruewithApiClient(configuration)asapi_client:api_instance=CSMSettingsApi(api_client)response=api_instance.get_csm_agentless_host_facet_info(facet="cloud_provider",)print(response)
# Get agentless host facet info returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.get_csm_agentless_host_facet_info".to_sym]=trueendapi_instance=DatadogAPIClient::V2::CSMSettingsAPI.newpapi_instance.get_csm_agentless_host_facet_info("cloud_provider")
// Get agentless host facet info 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.GetCSMAgentlessHostFacetInfo",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewCSMSettingsApi(apiClient)resp,r,err:=api.GetCSMAgentlessHostFacetInfo(ctx,"cloud_provider",*datadogV2.NewGetCSMAgentlessHostFacetInfoOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `CSMSettingsApi.GetCSMAgentlessHostFacetInfo`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `CSMSettingsApi.GetCSMAgentlessHostFacetInfo`:\n%s\n",responseContent)}
// Get agentless host facet info returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_csm_settings::CSMSettingsAPI;usedatadog_api_client::datadogV2::api_csm_settings::GetCSMAgentlessHostFacetInfoOptionalParams;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.GetCSMAgentlessHostFacetInfo",true);letapi=CSMSettingsAPI::with_config(configuration);letresp=api.get_csm_agentless_host_facet_info("cloud_provider".to_string(),GetCSMAgentlessHostFacetInfoOptionalParams::default(),).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
/**
* Get agentless host facet info returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.getCSMAgentlessHostFacetInfo"]=true;constapiInstance=newv2.CSMSettingsApi(configuration);constparams: v2.CSMSettingsApiGetCSMAgentlessHostFacetInfoRequest={facet:"cloud_provider",};apiInstance.getCSMAgentlessHostFacetInfo(params).then((data: v2.CsmHostFacetInfoResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));