stack_resources
Creates, updates, deletes, gets or lists a stack_resources resource.
Overview
| Name | stack_resources |
| Type | Resource |
| Id | aws.cloudformation.stack_resources |
Fields
The following fields are returned by SELECT queries:
- describe_stack_resource
- list_stack_resources
- describe_stack_resources
| Name | Datatype | Description |
|---|---|---|
description | string | User defined description associated with the resource. |
drift_information | string | Information about whether the resource's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detect unmanaged configuration changes to stacks and resources with drift detection. |
last_updated_timestamp | string | Time the status was updated. |
logical_resource_id | string | The logical name of the resource specified in the template. |
metadata | string | The content of the Metadata attribute declared for the resource. For more information, see Metadata attribute in the CloudFormation User Guide. |
module_info | string | Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template. |
physical_resource_id | string | The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation. |
resource_status | string | Current status of the resource. |
resource_status_reason | string | Success/failure message associated with the resource. |
resource_type | string | Type of resource. For more information, see Amazon Web Services resource and property types reference in the CloudFormation User Guide. |
stack_id | string | Unique identifier of the stack. |
stack_name | string | The name associated with the stack. |
| Name | Datatype | Description |
|---|---|---|
drift_information | string | Information about whether the resource's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detect unmanaged configuration changes to stacks and resources with drift detection. |
last_updated_timestamp | string | Time the status was updated. |
logical_resource_id | string | The logical name of the resource specified in the template. |
module_info | string | Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template. |
physical_resource_id | string | The name or unique identifier that corresponds to a physical instance ID of the resource. |
resource_status | string | Current status of the resource. |
resource_status_reason | string | Success/failure message associated with the resource. |
resource_type | string | Type of resource. (For more information, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.) |
| Name | Datatype | Description |
|---|---|---|
description | string | User defined description associated with the resource. |
drift_information | string | Information about whether the resource's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detect unmanaged configuration changes to stacks and resources with drift detection. |
logical_resource_id | string | The logical name of the resource specified in the template. |
module_info | string | Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template. |
physical_resource_id | string | The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation. |
resource_status | string | Current status of the resource. |
resource_status_reason | string | Success/failure message associated with the resource. |
resource_type | string | Type of resource. For more information, see Amazon Web Services resource and property types reference in the CloudFormation User Guide. |
stack_id | string | Unique identifier of the stack. |
stack_name | string | The name associated with the stack. |
timestamp | string | Time the status was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_stack_resource | select | StackName, LogicalResourceId, region | Returns a description of the specified resource in the specified stack. For deleted stacks, DescribeStackResource returns resource information for up to 90 days after the stack has been deleted. | |
list_stack_resources | select | StackName, region | NextToken | Returns descriptions of all resources of the specified stack. For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted. |
describe_stack_resources | select | region | StackName, LogicalResourceId, PhysicalResourceId | Returns Amazon Web Services resource descriptions for running and deleted stacks. If StackName is specified, all the associated resources that are part of the stack are returned. If PhysicalResourceId is specified, the associated resources of the stack that the resource belongs to are returned. Only the first 100 resources will be returned. If your stack has more resources than this, you should use ListStackResources instead. For deleted stacks, DescribeStackResources returns resource information for up to 90 days after the stack has been deleted. You must specify either StackName or PhysicalResourceId, but not both. In addition, you can specify LogicalResourceId to filter the returned result. For more information about resources, the LogicalResourceId and PhysicalResourceId, see the CloudFormation User Guide. A ValidationError is returned if you specify both StackName and PhysicalResourceId 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 |
|---|---|---|
LogicalResourceId | string | The logical name of the resource as specified in the template. |
StackName | string | The name or the unique stack ID that is associated with the stack, which aren't always interchangeable: Running stacks: You can specify either the stack's name or its unique stack ID. Deleted stacks: You must specify the unique stack ID. |
region | string | AWS region (default: us-east-1) |
LogicalResourceId | string | The logical name of the resource as specified in the template. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
PhysicalResourceId | string | The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation. For example, for an Amazon Elastic Compute Cloud (EC2) instance, PhysicalResourceId corresponds to the InstanceId. You can pass the EC2 InstanceId to DescribeStackResources to find which stack the instance belongs to and what other resources are part of the stack. Required: Conditional. If you don't specify PhysicalResourceId, you must specify StackName. |
StackName | string | The name or the unique stack ID that is associated with the stack, which aren't always interchangeable: Running stacks: You can specify either the stack's name or its unique stack ID. Deleted stacks: You must specify the unique stack ID. Required: Conditional. If you don't specify StackName, you must specify PhysicalResourceId. |
SELECT examples
- describe_stack_resource
- list_stack_resources
- describe_stack_resources
Returns a description of the specified resource in the specified stack. For deleted stacks, DescribeStackResource returns resource information for up to 90 days after the stack has been deleted.
SELECT
description,
drift_information,
last_updated_timestamp,
logical_resource_id,
metadata,
module_info,
physical_resource_id,
resource_status,
resource_status_reason,
resource_type,
stack_id,
stack_name
FROM aws.cloudformation.stack_resources
WHERE StackName = '{{ StackName }}' -- required
AND LogicalResourceId = '{{ LogicalResourceId }}' -- required
AND region = '{{ region }}' -- required
;
Returns descriptions of all resources of the specified stack. For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.
SELECT
drift_information,
last_updated_timestamp,
logical_resource_id,
module_info,
physical_resource_id,
resource_status,
resource_status_reason,
resource_type
FROM aws.cloudformation.stack_resources
WHERE StackName = '{{ StackName }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
;
Returns Amazon Web Services resource descriptions for running and deleted stacks. If StackName is specified, all the associated resources that are part of the stack are returned. If PhysicalResourceId is specified, the associated resources of the stack that the resource belongs to are returned. Only the first 100 resources will be returned. If your stack has more resources than this, you should use ListStackResources instead. For deleted stacks, DescribeStackResources returns resource information for up to 90 days after the stack has been deleted. You must specify either StackName or PhysicalResourceId, but not both. In addition, you can specify LogicalResourceId to filter the returned result. For more information about resources, the LogicalResourceId and PhysicalResourceId, see the CloudFormation User Guide. A ValidationError is returned if you specify both StackName and PhysicalResourceId in the same request.
SELECT
description,
drift_information,
logical_resource_id,
module_info,
physical_resource_id,
resource_status,
resource_status_reason,
resource_type,
stack_id,
stack_name,
timestamp
FROM aws.cloudformation.stack_resources
WHERE region = '{{ region }}' -- required
AND StackName = '{{ StackName }}'
AND LogicalResourceId = '{{ LogicalResourceId }}'
AND PhysicalResourceId = '{{ PhysicalResourceId }}'
;