Skip to content

aws.ram.get_permission

Example SQL Queries

SELECT * FROM
aws.ram.get_permission
WHERE
"permission_arn" = 'VALUE';

Description

Retrieves the contents of a managed permission in JSON format.

Table Definition

Column NameColumn Data Type
permission_arn Required Input Column

Specifies the Amazon Resource Name (ARN) of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.

VARCHAR
permission_version Input Column

Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.

To see the list of available versions, use ListPermissionVersions.

BIGINT
_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
permission

An object with details about the permission.

STRUCT(
"arn" VARCHAR,
"version" VARCHAR,
"default_version" BOOLEAN,
"name" VARCHAR,
"resource_type" VARCHAR,
"permission" VARCHAR,
"creation_time" TIMESTAMP_S,
"last_updated_time" TIMESTAMP_S,
"is_resource_type_default" BOOLEAN,
"permission_type" VARCHAR,
"feature_set" VARCHAR,
"status" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)
Show child fields
permission.arn

The Amazon Resource Name (ARN) of this RAM managed permission.

permission.creation_time

The date and time when the permission was created.

permission.default_version

Specifies whether the version of the permission represented in this response is the default version for this permission.

permission.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.

permission.is_resource_type_default

Specifies whether the version of the permission represented in this response is the default version for all resources of this resource type.

permission.last_updated_time

The date and time when the permission was last updated.

permission.name

The name of this permission.

permission.permission

The permission's effect and actions in JSON format. The effect indicates whether the specified actions are allowed or denied. The actions list the operations to which the principal is granted or denied access.

permission.permission_type

The type of managed permission. This can be one of the following values:

  • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

  • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

permission.resource_type

The resource type to which this permission applies.

permission.status

The current status of the association between the permission and the resource share. The following are the possible values:

  • ATTACHABLE – This permission or version can be associated with resource shares.

  • UNATTACHABLE – This permission or version can't currently be associated with resource shares.

  • DELETING – This permission or version is in the process of being deleted.

  • DELETED – This permission or version is deleted.

permission.tags[]
Show child fields
permission.tags[].key

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

permission.tags[].value

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

permission.version

The version of the permission described in this response.