Skip to main content

resources_v2s

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

Overview

Nameresources_v2s
TypeResource
Idaws.securityhub.resources_v2s

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe Amazon Web Services account that recorded the resource data in Security Hub. (pattern: <code>.\S.</code>)
account_namestringThe name of the Amazon Web Services account that's associated with the resource. (pattern: <code>.\S.</code>)
discovery_typestringSpecifies how the resource was discovered. If the value is Managed, the resource is natively provided by a cloud service provider. If the value is SelfHosted, the resource is hosted on customer-managed infrastructure, such as a compute instance or container image. (Managed, SelfHosted)
findings_summaryarrayAn aggregated view of security findings associated with a resource.
regionstringThe Amazon Web Services Region that recorded the resource data in Security Hub. (pattern: <code>.\S.</code>)
resource_categorystringThe grouping where the resource belongs. (Compute, Database, Storage, Code, AI/ML, Identity, Network, Messaging, Other)
resource_cloud_partitionstringThe cloud partition where the resource exists. For Amazon Web Services, valid values include aws, aws-cn, and aws-us-gov. This field isn't returned for cloud providers that don't use partitions. (pattern: <code>.\S.</code>)
resource_configobjectThe configuration details of a resource.
resource_creation_time_dtstringThe time when the resource was created. (pattern: <code>.\S.</code>)
resource_detail_capture_time_dtstringThe timestamp when information about the resource was captured. (pattern: <code>.\S.</code>)
resource_guidstringThe global identifier used to identify a resource. (pattern: <code>.\S.</code>)
resource_idstringThe unique identifier for a resource. (pattern: <code>.\S.</code>)
resource_infoobjectAdditional resource-type-specific details. For self-hosted AI resources and their host resources, contains an AIDetails structure.
resource_namestringThe name of the resource. (pattern: <code>.\S.</code>)
resource_owner_account_idstringThe identifier of the cloud account that owns the resource. For Amazon Web Services resources, this is the Amazon Web Services account ID. For Azure resources, this is the Azure subscription ID. (pattern: <code>.\S.</code>)
resource_owner_org_idstringThe identifier of the cloud organization that owns the resource. For Amazon Web Services resources, this is the Organizations ID. For Azure resources, this is the Azure tenant ID. (pattern: <code>.\S.</code>)
resource_providerstringThe cloud provider where the resource exists. Valid values are AWS and Azure. This field is always included. (pattern: <code>.\S.</code>)
resource_regionstringThe native cloud region where the resource is located. For Amazon Web Services, this is an Amazon Web Services Region (for example, us-east-1). For Azure resources, this is the Azure region (for example, westus2). This field is always included. (pattern: <code>.\S.</code>)
resource_sub_categorystringThe AI/ML sub-grouping of the resource. Present only when ResourceCategory is AI/ML. (Model, ModelServing, Agent, AgentFramework, AgentToolsAndIdentity, SafetyAndGuardrail, KnowledgeAndData, OrchestrationAndPipeline, ExternalEndpoint, Development, Other)
resource_tagsarrayThe key-value pairs associated with a resource.
resource_typestringThe type of resource. (pattern: <code>.\S.</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resources_v2selectregionReturns a list of resources. You can use the Scopes parameter to define the data boundary for the query. Currently, Scopes supports AwsOrganizations, which lets you retrieve resources from your entire organization or from specific organizational units. Only the delegated administrator account can use Scopes. You can use the Filters parameter to refine results based on resource attributes. You can use Scopes and Filters independently or together. When both are provided, Scopes narrows the data set first, and then Filters refines results within that scoped data set. For AI/ML resources, the response includes the ResourceSubCategory field. For self-hosted AI resources and their host resources, the response also includes ResourceInfo with AI-specific details. Self-hosted AI resources use a ResourceType with the SelfHosted::AI:: prefix, such as SelfHosted::AI::Model, SelfHosted::AI::Agent, SelfHosted::AI::InferenceEndpoint, and SelfHosted::AI::ExternalEndpoint. If you filter by ResourceSubCategory, you must also include a ResourceCategory string filter with comparison set to EQUALS and value AI/ML in the same request.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a list of resources. You can use the Scopes parameter to define the data boundary for the query. Currently, Scopes supports AwsOrganizations, which lets you retrieve resources from your entire organization or from specific organizational units. Only the delegated administrator account can use Scopes. You can use the Filters parameter to refine results based on resource attributes. You can use Scopes and Filters independently or together. When both are provided, Scopes narrows the data set first, and then Filters refines results within that scoped data set. For AI/ML resources, the response includes the ResourceSubCategory field. For self-hosted AI resources and their host resources, the response also includes ResourceInfo with AI-specific details. Self-hosted AI resources use a ResourceType with the SelfHosted::AI:: prefix, such as SelfHosted::AI::Model, SelfHosted::AI::Agent, SelfHosted::AI::InferenceEndpoint, and SelfHosted::AI::ExternalEndpoint. If you filter by ResourceSubCategory, you must also include a ResourceCategory string filter with comparison set to EQUALS and value AI/ML in the same request.

SELECT
account_id,
account_name,
discovery_type,
findings_summary,
region,
resource_category,
resource_cloud_partition,
resource_config,
resource_creation_time_dt,
resource_detail_capture_time_dt,
resource_guid,
resource_id,
resource_info,
resource_name,
resource_owner_account_id,
resource_owner_org_id,
resource_provider,
resource_region,
resource_sub_category,
resource_tags,
resource_type
FROM aws.securityhub.resources_v2s
WHERE region = '{{ region }}' -- required
;