Skip to content

aws.backup.get_backup_selection

Example SQL Queries

SELECT * FROM
aws.backup.get_backup_selection
WHERE
"backup_plan_id" = 'VALUE'
AND "selection_id" = 'VALUE';

Description

Returns selection metadata and a document in JSON format that specifies a list of resources that are associated with a backup plan.

Table Definition

Column NameColumn Data Type
backup_plan_id Required Input Column

Uniquely identifies a backup plan.

VARCHAR
selection_id Required Input Column

Uniquely identifies the body of a request to assign a set of resources to a backup plan.

VARCHAR
_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
backup_selection

Specifies the body of a request to assign a set of resources to a backup plan.

STRUCT(
"selection_name" VARCHAR,
"iam_role_arn" VARCHAR,
"resources" VARCHAR[],
"list_of_tags" STRUCT(
"condition_type" VARCHAR,
"condition_key" VARCHAR,
"condition_value" VARCHAR
)[],
"not_resources" VARCHAR[],
"conditions" STRUCT(
"string_equals" STRUCT(
"condition_key" VARCHAR,
"condition_value" VARCHAR
)[],
"string_not_equals" STRUCT(
"condition_key" VARCHAR,
"condition_value" VARCHAR
)[],
"string_like" STRUCT(
"condition_key" VARCHAR,
"condition_value" VARCHAR
)[],
"string_not_like" STRUCT(
"condition_key" VARCHAR,
"condition_value" VARCHAR
)[]
)
)
Show child fields
backup_selection.conditions

A list of conditions that you define to assign resources to your backup plans using tags. For example, "StringEquals": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": "true" },. Condition operators are case sensitive.

Conditions differs from ListOfTags as follows:

  • When you specify more than one condition, you only assign the resources that match ALL conditions (using AND logic).

  • Conditions supports StringEquals, StringLike, StringNotEquals, and StringNotLike. ListOfTags only supports StringEquals.

Show child fields
backup_selection.conditions.string_equals[]
Show child fields
backup_selection.conditions.string_equals[].condition_key

The key in a key-value pair. For example, in the tag Department: Accounting, Department is the key.

backup_selection.conditions.string_equals[].condition_value

The value in a key-value pair. For example, in the tag Department: Accounting, Accounting is the value.

backup_selection.conditions.string_like[]
Show child fields
backup_selection.conditions.string_like[].condition_key

The key in a key-value pair. For example, in the tag Department: Accounting, Department is the key.

backup_selection.conditions.string_like[].condition_value

The value in a key-value pair. For example, in the tag Department: Accounting, Accounting is the value.

backup_selection.conditions.string_not_equals[]
Show child fields
backup_selection.conditions.string_not_equals[].condition_key

The key in a key-value pair. For example, in the tag Department: Accounting, Department is the key.

backup_selection.conditions.string_not_equals[].condition_value

The value in a key-value pair. For example, in the tag Department: Accounting, Accounting is the value.

backup_selection.conditions.string_not_like[]
Show child fields
backup_selection.conditions.string_not_like[].condition_key

The key in a key-value pair. For example, in the tag Department: Accounting, Department is the key.

backup_selection.conditions.string_not_like[].condition_value

The value in a key-value pair. For example, in the tag Department: Accounting, Accounting is the value.

backup_selection.iam_role_arn

The ARN of the IAM role that Backup uses to authenticate when backing up the target resource; for example, arn:aws:iam::123456789012:role/S3Access.

backup_selection.list_of_tags[]
Show child fields
backup_selection.list_of_tags[].condition_key

The key in a key-value pair. For example, in the tag Department: Accounting, Department is the key.

backup_selection.list_of_tags[].condition_type

An operation applied to a key-value pair used to assign resources to your backup plan. Condition only supports StringEquals. For more flexible assignment options, including StringLike and the ability to exclude resources from your backup plan, use Conditions (with an "s" on the end) for your BackupSelection .

backup_selection.list_of_tags[].condition_value

The value in a key-value pair. For example, in the tag Department: Accounting, Accounting is the value.

backup_selection.not_resources[]
backup_selection.resources[]
backup_selection.selection_name

The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters.

creation_date

The date and time a backup selection is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

TIMESTAMP_S
creator_request_id

A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.

VARCHAR