Skip to main content

scanned_assets_metadata

Creates, updates, deletes, gets or lists a scanned_assets_metadata resource.

Overview

Namescanned_assets_metadata
TypeResource
Iddatadog.security.scanned_assets_metadata

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the scanned asset metadata. (example: Host|i-0fc7edef1ab26d7ef)
attributesobjectThe attributes of a scanned asset metadata.
typestringThe JSON:API type. (scanned-assets-metadata) (example: scanned-assets-metadata)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_scanned_assets_metadataselectpage[token], page[number], filter[asset.type], filter[asset.name], filter[last_success.origin], filter[last_success.env]Get a list of security scanned assets metadata for an organization.<br /><br />### Pagination<br /><br />For the "List Vulnerabilities" endpoint, see the [Pagination section](#pagination).<br /><br />### Filtering<br /><br />For the "List Vulnerabilities" endpoint, see the [Filtering section](#filtering).<br /><br />### Metadata<br /><br /> For the "List Vulnerabilities" endpoint, see the [Metadata section](#metadata).<br /><br />### Related endpoints<br /><br />This endpoint returns additional metadata for cloud resources that is not available from the standard resource endpoints. To access a richer dataset, call this endpoint together with the relevant resource endpoint(s) and merge (join) their results using the resource identifier.<br /><br />Hosts<br /><br />To enrich host data, join the response from the [Hosts](https:​//docs.datadoghq.com/api/latest/hosts/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:<br /><br />| ENDPOINT | JOIN KEY | TYPE |<br />| --- | --- | --- |<br />| [/api/v1/hosts](https:​//docs.datadoghq.com/api/latest/hosts/) | host_list.host_name | string |<br />| /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |<br /><br />Host Images<br /><br />To enrich host image data, join the response from the [Hosts](https:​//docs.datadoghq.com/api/latest/hosts/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:<br /><br />| ENDPOINT | JOIN KEY | TYPE |<br />| --- | --- | --- |<br />| [/api/v1/hosts](https:​//docs.datadoghq.com/api/latest/hosts/) | host_list.tags_by_source["Amazon Web Services"]["image"] | string |<br />| /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |<br /><br />Container Images<br /><br />To enrich container image data, join the response from the [Container Images](https:​//docs.datadoghq.com/api/latest/container-images/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:<br /><br />| ENDPOINT | JOIN KEY | TYPE |<br />| --- | --- | --- |<br />| [/api/v2/container_images](https:​//docs.datadoghq.com/api/latest/container-images/) | data.attributes.name@data.attributes.repo_digest | string |<br />| /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
filter[asset.name]stringThe name of the scanned asset. (example: i-0fc7edef1ab26d7ef)
filter[asset.type]stringThe type of the scanned asset.
filter[last_success.env]stringThe environment of last success scan. (example: prod)
filter[last_success.origin]stringThe origin of last success scan. (example: agent)
page[number]integer (int64)The page number to be retrieved. It should be equal to or greater than 1. (example: 1)
page[token]stringIts value must come from the links section of the response of the first request. Do not manually edit it. (example: b82cef018aab81ed1d4bb4xb35xxfc065da7efa685fbcecdbd338f3015e3afabbbfa3a911b4984_721ee28a-zecb-4e45-9960-c42065b574f4)

SELECT examples

Get a list of security scanned assets metadata for an organization.<br /><br />### Pagination<br /><br />For the "List Vulnerabilities" endpoint, see the [Pagination section](#pagination).<br /><br />### Filtering<br /><br />For the "List Vulnerabilities" endpoint, see the [Filtering section](#filtering).<br /><br />### Metadata<br /><br /> For the "List Vulnerabilities" endpoint, see the [Metadata section](#metadata).<br /><br />### Related endpoints<br /><br />This endpoint returns additional metadata for cloud resources that is not available from the standard resource endpoints. To access a richer dataset, call this endpoint together with the relevant resource endpoint(s) and merge (join) their results using the resource identifier.<br /><br />Hosts<br /><br />To enrich host data, join the response from the [Hosts](https:​//docs.datadoghq.com/api/latest/hosts/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:<br /><br />| ENDPOINT | JOIN KEY | TYPE |<br />| --- | --- | --- |<br />| [/api/v1/hosts](https:​//docs.datadoghq.com/api/latest/hosts/) | host_list.host_name | string |<br />| /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |<br /><br />Host Images<br /><br />To enrich host image data, join the response from the [Hosts](https:​//docs.datadoghq.com/api/latest/hosts/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:<br /><br />| ENDPOINT | JOIN KEY | TYPE |<br />| --- | --- | --- |<br />| [/api/v1/hosts](https:​//docs.datadoghq.com/api/latest/hosts/) | host_list.tags_by_source["Amazon Web Services"]["image"] | string |<br />| /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |<br /><br />Container Images<br /><br />To enrich container image data, join the response from the [Container Images](https:​//docs.datadoghq.com/api/latest/container-images/) endpoint with the response from the scanned-assets-metadata endpoint on the following key fields:<br /><br />| ENDPOINT | JOIN KEY | TYPE |<br />| --- | --- | --- |<br />| [/api/v2/container_images](https:​//docs.datadoghq.com/api/latest/container-images/) | data.attributes.name@data.attributes.repo_digest | string |<br />| /api/v2/security/scanned-assets-metadata | data.attributes.asset.name | string |

SELECT
id,
attributes,
type
FROM datadog.security.scanned_assets_metadata
WHERE page[token] = '{{ page[token] }}'
AND page[number] = '{{ page[number] }}'
AND filter[asset.type] = '{{ filter[asset.type] }}'
AND filter[asset.name] = '{{ filter[asset.name] }}'
AND filter[last_success.origin] = '{{ filter[last_success.origin] }}'
AND filter[last_success.env] = '{{ filter[last_success.env] }}'
;