Skip to content

aws.ssm.list_associations

Example SQL Queries

SELECT * FROM
aws.ssm.list_associations;

Description

Returns all State Manager associations in the current Amazon Web Services account and Amazon Web Services Region. You can limit the results to a specific State Manager association document or managed node by specifying a filter. State Manager is a capability of Amazon Web Services Systems Manager.

Table Definition

Column NameColumn Data Type
association_filter_list Input Column

One or more filters. Use a filter to return a more specific list of results.

Filtering associations using the InstanceID attribute only returns legacy associations created using the InstanceID attribute. Associations targeting the managed node that are part of the Target Attributes ResourceGroup or Tags aren't returned.

STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
Show child fields
association_filter_list[]
Show child fields
association_filter_list[].key

The name of the filter.

InstanceId has been deprecated.

association_filter_list[].value

The filter value.

_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
association_id

The ID created by the system when you create an association. An association is a binding between a document and a set of targets with a schedule.

VARCHAR
association_name

The association name.

VARCHAR
association_version

The association version.

VARCHAR
document_version

The version of the document used in the association. If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the apply-only-at-cron-interval parameter.

State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the default version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to default.

VARCHAR
duration

The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.

BIGINT
instance_id

The managed node ID.

VARCHAR
last_execution_date

The date on which the association was last run.

TIMESTAMP_S
name

The name of the SSM document.

VARCHAR
overview

Information about the association.

STRUCT(
"status" VARCHAR,
"detailed_status" VARCHAR,
"association_status_aggregated_count" MAP(VARCHAR, BIGINT)
)
Show child fields
overview.association_status_aggregated_count

Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.

overview.detailed_status

A detailed status of the association.

overview.status

The status of the association. Status can be: Pending, Success, or Failed.

schedule_expression

A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).

VARCHAR
schedule_offset

Number of days to wait after the scheduled day to run an association.

BIGINT
target_maps

A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

MAP(VARCHAR, VARCHAR[])[]
Show child fields
target_maps[]
targets

The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon Web Services account by specifying the InstanceIds key with a value of *.

STRUCT(
"key" VARCHAR,
"values" VARCHAR[]
)[]
Show child fields
targets[]
Show child fields
targets[].key

User-defined criteria for sending commands that target managed nodes that meet the criteria.

targets[].values[]