Skip to content

aws.opsworks.describe_stacks

Example SQL Queries

SELECT * FROM
aws.opsworks.describe_stacks;

Description

Requests a description of one or more stacks.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.

Table Definition

Column NameColumn Data Type
stack_ids Input Column

An array of stack IDs that specify the stacks to be described. If you omit this parameter, and have permissions to get information about all stacks, DescribeStacks returns a description of every stack. If the IAM policy that is attached to an IAM user limits the DescribeStacks action to specific stack ARNs, this parameter is required, and the user must specify a stack ARN that is allowed by the policy. Otherwise, DescribeStacks returns an AccessDenied error.

VARCHAR[]
Show child fields
stack_ids[]
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
stacks

An array of Stack objects that describe the stacks.

STRUCT(
"stack_id" VARCHAR,
"name" VARCHAR,
"arn" VARCHAR,
"region" VARCHAR,
"vpc_id" VARCHAR,
"attributes" MAP(VARCHAR, VARCHAR),
"service_role_arn" VARCHAR,
"default_instance_profile_arn" VARCHAR,
"default_os" VARCHAR,
"hostname_theme" VARCHAR,
"default_availability_zone" VARCHAR,
"default_subnet_id" VARCHAR,
"custom_json" VARCHAR,
"configuration_manager" STRUCT(
"name" VARCHAR,
"version" VARCHAR
),
"chef_configuration" STRUCT(
"manage_berkshelf" BOOLEAN,
"berkshelf_version" VARCHAR
),
"use_custom_cookbooks" BOOLEAN,
"use_opsworks_security_groups" BOOLEAN,
"custom_cookbooks_source" STRUCT(
"type" VARCHAR,
"url" VARCHAR,
"username" VARCHAR,
"password" VARCHAR,
"ssh_key" VARCHAR,
"revision" VARCHAR
),
"default_ssh_key_name" VARCHAR,
"created_at" VARCHAR,
"default_root_device_type" VARCHAR,
"agent_version" VARCHAR
)[]
Show child fields
stacks[]
Show child fields
stacks[].agent_version

The agent version. This parameter is set to LATEST for auto-update. or a version number for a fixed agent version.

stacks[].arn

The stack's ARN.

stacks[].attributes

The stack's attributes.

stacks[].chef_configuration

A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.

Show child fields
stacks[].chef_configuration.berkshelf_version

The Berkshelf version.

stacks[].chef_configuration.manage_berkshelf

Whether to enable Berkshelf.

stacks[].configuration_manager

The configuration manager.

Show child fields
stacks[].configuration_manager.name

The name. This parameter must be set to Chef.

stacks[].configuration_manager.version

The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux stacks, and to 12.2 for Windows stacks. The default value for Linux stacks is 12.

stacks[].created_at

The date when the stack was created.

stacks[].custom_cookbooks_source

Contains the information required to retrieve an app or cookbook from a repository. For more information, see Adding Apps or Cookbooks and Recipes.

Show child fields
stacks[].custom_cookbooks_source.password

When included in a request, the parameter depends on the repository type.

  • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

  • For HTTP bundles and Subversion repositories, set Password to the password.

For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

stacks[].custom_cookbooks_source.revision

The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

stacks[].custom_cookbooks_source.ssh_key

In requests, the repository's SSH key.

In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

stacks[].custom_cookbooks_source.type

The repository type.

stacks[].custom_cookbooks_source.url

The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks_cookbook_demo.tar.gz.

stacks[].custom_cookbooks_source.username

This parameter depends on the repository type.

  • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

  • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

stacks[].custom_json

A JSON object that contains user-defined attributes to be added to the stack configuration and deployment attributes. You can use custom JSON to override the corresponding default stack configuration attribute values or to pass data to recipes. The string should be in the following format:

"{\"key1\": \"value1\", \"key2\": \"value2\",...}"

For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

stacks[].default_availability_zone

The stack's default Availability Zone. For more information, see Regions and Endpoints.

stacks[].default_instance_profile_arn

The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

stacks[].default_os

The stack's default operating system.

stacks[].default_root_device_type

The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

stacks[].default_ssh_key_name

A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.

stacks[].default_subnet_id

The default subnet ID; applicable only if the stack is running in a VPC.

stacks[].hostname_theme

The stack host name theme, with spaces replaced by underscores.

stacks[].name

The stack name. Stack names can be a maximum of 64 characters.

stacks[].region

The stack Amazon Web Services Region, such as ap-northeast-2. For more information about Amazon Web Services Regions, see Regions and Endpoints.

stacks[].service_role_arn

The stack Identity and Access Management (IAM) role.

stacks[].stack_id

The stack ID.

stacks[].use_custom_cookbooks

Whether the stack uses custom cookbooks.

stacks[].use_opsworks_security_groups

Whether the stack automatically associates the OpsWorks Stacks built-in security groups with the stack's layers.

stacks[].vpc_id

The VPC ID; applicable only if the stack is running in a VPC.