resource_policies
Creates, updates, deletes, gets or lists a resource_policies resource.
Overview
| Name | resource_policies |
| Type | Resource |
| Id | aws.schemas.resource_policies |
Fields
The following fields are returned by SELECT queries:
- get_resource_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | The resource-based policy. |
revision_id | string | The revision ID. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_policy | select | region | registryName | Retrieves the resource-based policy attached to a given registry. |
put_resource_policy | replace | region | registryName | The name of the policy. |
delete_resource_policy | delete | region | registryName | Delete the resource-based policy attached to the specified registry. |
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) |
registryName | string | The name of the registry. |
SELECT examples
- get_resource_policy
Retrieves the resource-based policy attached to a given registry.
SELECT
policy,
revision_id
FROM aws.schemas.resource_policies
WHERE region = '{{ region }}' -- required
AND registryName = '{{ registryName }}'
;
REPLACE examples
- put_resource_policy
The name of the policy.
REPLACE aws.schemas.resource_policies
SET
Policy = '{{ Policy }}',
RevisionId = '{{ RevisionId }}'
WHERE
region = '{{ region }}' --required
AND registryName = '{{ registryName}}'
RETURNING
policy,
revision_id;
DELETE examples
- delete_resource_policy
Delete the resource-based policy attached to the specified registry.
DELETE FROM aws.schemas.resource_policies
WHERE region = '{{ region }}' --required
AND registryName = '{{ registryName }}'
;