resource_policies
Creates, updates, deletes, gets or lists a resource_policies resource.
Overview
| Name | resource_policies |
| Type | Resource |
| Id | aws.billing.resource_policies |
Fields
The following fields are returned by SELECT queries:
- get_resource_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | The resource-based policy document attached to the resource in JSON format. |
resource_arn | string | The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to. (pattern: <code>arn:aws[a-z-]*:(billing)::[0-9]{12}:[a-zA-Z0-9/:_+=.@-]{0,70}[a-zA-Z0-9]</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_policy | select | region | Returns the resource-based policy document attached to the resource in JSON format. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_resource_policy
Returns the resource-based policy document attached to the resource in JSON format.
SELECT
policy,
resource_arn
FROM aws.billing.resource_policies
WHERE region = '{{ region }}' -- required
;