resources_v2s
Creates, updates, deletes, gets or lists a resources_v2s resource.
Overview
| Name | resources_v2s |
| Type | Resource |
| Id | aws.securityhub.resources_v2s |
Fields
The following fields are returned by SELECT queries:
- get_resources_v2
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account that recorded the resource data in Security Hub. (pattern: <code>.\S.</code>) |
account_name | string | The name of the Amazon Web Services account that's associated with the resource. (pattern: <code>.\S.</code>) |
discovery_type | string | Specifies 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_summary | array | An aggregated view of security findings associated with a resource. |
region | string | The Amazon Web Services Region that recorded the resource data in Security Hub. (pattern: <code>.\S.</code>) |
resource_category | string | The grouping where the resource belongs. (Compute, Database, Storage, Code, AI/ML, Identity, Network, Messaging, Other) |
resource_cloud_partition | string | The 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_config | object | The configuration details of a resource. |
resource_creation_time_dt | string | The time when the resource was created. (pattern: <code>.\S.</code>) |
resource_detail_capture_time_dt | string | The timestamp when information about the resource was captured. (pattern: <code>.\S.</code>) |
resource_guid | string | The global identifier used to identify a resource. (pattern: <code>.\S.</code>) |
resource_id | string | The unique identifier for a resource. (pattern: <code>.\S.</code>) |
resource_info | object | Additional resource-type-specific details. For self-hosted AI resources and their host resources, contains an AIDetails structure. |
resource_name | string | The name of the resource. (pattern: <code>.\S.</code>) |
resource_owner_account_id | string | The 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_id | string | The 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_provider | string | The cloud provider where the resource exists. Valid values are AWS and Azure. This field is always included. (pattern: <code>.\S.</code>) |
resource_region | string | The 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_category | string | The 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_tags | array | The key-value pairs associated with a resource. |
resource_type | string | The type of resource. (pattern: <code>.\S.</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resources_v2 | select | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_resources_v2
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
;