Response object containing the available critical assets.
Expand All
Field
Type
Description
data
[object]
A list of critical assets objects.
attributes
object
The attributes of the critical asset.
creation_author_id
int64
ID of user who created the critical asset.
creation_date
int64
A Unix millisecond timestamp given the creation date of the critical asset.
creator
object
A user.
handle
string
The handle of the user.
name
string
The name of the user.
enabled
boolean
Whether the critical asset is enabled.
query
string
The query for the critical asset. It uses the same syntax as the queries to search signals in the Signals Explorer.
rule_query
string
The rule query of the critical asset, with the same syntax as the search bar for detection rules. This determines which rules this critical asset will apply to.
severity
enum
Severity associated with this critical asset. Either an explicit severity can be set, or the severity can be increased or decreased, or the severity can be left unchanged (no-op).
Allowed enum values: info,low,medium,high,critical,increase,decrease,no-op
tags
[string]
List of tags associated with the critical asset.
update_author_id
int64
ID of user who updated the critical asset.
update_date
int64
A Unix millisecond timestamp given the update date of the critical asset.
updater
object
A user.
handle
string
The handle of the user.
name
string
The name of the user.
version
int32
The version of the critical asset; it starts at 1, and is incremented at each update.
id
string
The ID of the critical asset.
type
enum
The type of the resource. The value should always be critical_assets.
Allowed enum values: critical_assets
"""
Get all critical assets returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.security_monitoring_apiimportSecurityMonitoringApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=SecurityMonitoringApi(api_client)response=api_instance.list_security_monitoring_critical_assets()print(response)
# Get all critical assets returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::SecurityMonitoringAPI.newpapi_instance.list_security_monitoring_critical_assets()
// Get all critical assets 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()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewSecurityMonitoringApi(apiClient)resp,r,err:=api.ListSecurityMonitoringCriticalAssets(ctx)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `SecurityMonitoringApi.ListSecurityMonitoringCriticalAssets`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `SecurityMonitoringApi.ListSecurityMonitoringCriticalAssets`:\n%s\n",responseContent)}
// Get all critical assets returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=SecurityMonitoringAPI::with_config(configuration);letresp=api.list_security_monitoring_critical_assets().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="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get all critical assets returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.SecurityMonitoringApi(configuration);apiInstance.listSecurityMonitoringCriticalAssets().then((data: v2.SecurityMonitoringCriticalAssetsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));