Skip to content

aws.ram.get_resource_shares

Example SQL Queries

SELECT * FROM
aws.ram.get_resource_shares
WHERE
"resource_owner" = 'VALUE';

Description

Retrieves details about the resource shares that you own or that are shared with you.

Table Definition

Column NameColumn Data Type
resource_owner Required Input Column

Specifies that you want to retrieve details of only those resource shares that match the following:

  • SELF – resource shares that your account shares with other accounts

  • OTHER-ACCOUNTS – resource shares that other accounts share with your account

VARCHAR
name Input Column

The name of the resource share.

VARCHAR
permission_arn Input Column

Specifies that you want to retrieve details of only those resource shares that use the managed permission with this Amazon Resource Name (ARN).

VARCHAR
permission_version Input Column

Specifies that you want to retrieve details for only those resource shares that use the specified version of the managed permission.

BIGINT
resource_share_arns Input Column

Specifies the Amazon Resource Names (ARNs) of individual resource shares that you want information about.

VARCHAR[]
Show child fields
resource_share_arns[]
resource_share_status Input Column

Specifies that you want to retrieve details of only those resource shares that have this status.

VARCHAR
tag_filters Input Column

Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.

STRUCT(
"tag_key" VARCHAR,
"tag_values" VARCHAR[]
)[]
Show child fields
tag_filters[]
Show child fields
tag_filters[].tag_key

The tag key. This must have a valid string value and can't be empty.

tag_filters[].tag_values[]
_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
allow_external_principals

Indicates whether principals outside your organization in Organizations can be associated with a resource share.

  • True – the resource share can be shared with any Amazon Web Services account.

  • False – the resource share can be shared with only accounts in the same organization as the account that owns the resource share.

BOOLEAN
creation_time

The date and time when the resource share was created.

TIMESTAMP_S
feature_set

Indicates what features are available for this resource share. This parameter can have one of the following values:

  • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

  • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

  • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

VARCHAR
last_updated_time

The date and time when the resource share was last updated.

TIMESTAMP_S
owning_account_id

The ID of the Amazon Web Services account that owns the resource share.

VARCHAR
resource_share_arn

The Amazon Resource Name (ARN) of the resource share

VARCHAR
status

The current status of the resource share.

VARCHAR
status_message

A message about the status of the resource share.

VARCHAR
tags

The tag key and value pairs attached to the resource share.

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

The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

tags[].value

The string value attached to the tag. The value can be an empty string. Key values are case sensitive.