Skip to main content

resource_policies

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

Overview​

Nameresource_policies
TypeResource
Idaws.mpa.resource_policies

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
policy_documentstringDocument that contains the contents for the policy.
policy_namestringName of the policy.
policy_typestringThe type of policy (AWS_MANAGED, AWS_RAM)
policy_version_arnstringAmazon Resource Name (ARN) for the policy version.
resource_arnstringAmazon Resource Name (ARN) for the resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_policyselectregionReturns details about a policy for a resource.
list_resource_policiesselectresource_arn, regionMaxResults, NextTokenReturns a list of policies for a resource.

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
regionstringAWS region (default: us-east-1)
resource_arnstringAmazon Resource Name (ARN) for the resource.
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 about a policy for a resource.

SELECT
policy_document,
policy_name,
policy_type,
policy_version_arn,
resource_arn
FROM aws.mpa.resource_policies
WHERE region = '{{ region }}' -- required
;