Skip to main content

policy_versions

Creates, updates, deletes, gets or lists a policy_versions resource.

Overview

Namepolicy_versions
TypeResource
Idaws.mpa.policy_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringAmazon Resource Name (ARN) for the team. (pattern: <code>arn:.{1,63}:mpa:::aws:policy/[a-zA-Z0-9_.-]{1,1023}/[a-zA-Z0-9_.-]{1,1023}/(?:[\d]+|$DEFAULT)</code>)
creation_timestring (date-time)Timestamp when the policy was created.
documentstringDocument that contains the policy contents.
is_defaultbooleanDetermines if the specified policy is the default for the team.
last_updated_timestring (date-time)Timestamp when the policy was last updated.
namestringName of the policy.
policy_arnstringAmazon Resource Name (ARN) for the policy. (pattern: <code>arn:.{1,63}:mpa:::aws:policy/[a-zA-Z0-9_.-]{1,1023}/[a-zA-Z0-9_.-]{1,1023}</code>)
policy_typestringThe type of policy. (AWS_MANAGED, AWS_RAM)
statusstringStatus for the policy. For example, if the policy is attachable or deprecated. (ATTACHABLE, DEPRECATED)
version_idintegerVerison ID

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_policy_versionselectpolicy_version_arn, regionReturns details for the version of a policy. Policies define the permissions for team resources.
list_policy_versionsselectpolicy_arn, regionMaxResults, NextTokenReturns a list of the versions for policies. Policies define the permissions for team resources.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
policy_arnstringAmazon Resource Name (ARN) for the policy.
policy_version_arnstringAmazon Resource Name (ARN) for the policy.
regionstringAWS region (default: us-east-1)
MaxResultsintegerThe maximum number of items to return in the response. If more results exist than the specified MaxResults value, a token is included in the response so that you can retrieve the remaining results.
NextTokenstringIf present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a next call to the operation to get more output. You can repeat this until the NextToken response element returns null.

SELECT examples

Returns details for the version of a policy. Policies define the permissions for team resources.

SELECT
arn,
creation_time,
document,
is_default,
last_updated_time,
name,
policy_arn,
policy_type,
status,
version_id
FROM aws.mpa.policy_versions
WHERE policy_version_arn = '{{ policy_version_arn }}' -- required
AND region = '{{ region }}' -- required
;