policy_versions
Creates, updates, deletes, gets or lists a policy_versions resource.
Overview
| Name | policy_versions |
| Type | Resource |
| Id | aws.mpa.policy_versions |
Fields
The following fields are returned by SELECT queries:
- get_policy_version
- list_policy_versions
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon 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_time | string (date-time) | Timestamp when the policy was created. |
document | string | Document that contains the policy contents. |
is_default | boolean | Determines if the specified policy is the default for the team. |
last_updated_time | string (date-time) | Timestamp when the policy was last updated. |
name | string | Name of the policy. |
policy_arn | string | Amazon 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_type | string | The type of policy. (AWS_MANAGED, AWS_RAM) |
status | string | Status for the policy. For example, if the policy is attachable or deprecated. (ATTACHABLE, DEPRECATED) |
version_id | integer | Verison ID |
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon 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_time | string (date-time) | Timestamp when the policy was created. |
is_default | boolean | Determines if the specified policy is the default for the team. |
last_updated_time | string (date-time) | Timestamp when the policy was last updated. |
name | string | Name of the policy |
policy_arn | string | Amazon 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_type | string | The type of policy. (AWS_MANAGED, AWS_RAM) |
status | string | Status for the policy. For example, if the policy is attachable or deprecated. (ATTACHABLE, DEPRECATED) |
version_id | integer | Version ID for the policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_policy_version | select | policy_version_arn, region | Returns details for the version of a policy. Policies define the permissions for team resources. | |
list_policy_versions | select | policy_arn, region | MaxResults, NextToken | Returns 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.
| Name | Datatype | Description |
|---|---|---|
policy_arn | string | Amazon Resource Name (ARN) for the policy. |
policy_version_arn | string | Amazon Resource Name (ARN) for the policy. |
region | string | AWS region (default: us-east-1) |
MaxResults | integer | The 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. |
NextToken | string | If 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
- get_policy_version
- list_policy_versions
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
;
Returns a list of the versions for policies. Policies define the permissions for team resources.
SELECT
arn,
creation_time,
is_default,
last_updated_time,
name,
policy_arn,
policy_type,
status,
version_id
FROM aws.mpa.policy_versions
WHERE policy_arn = '{{ policy_arn }}' -- required
AND region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;