Skip to main content

resource_policies

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

Overview

Nameresource_policies
TypeResource
Idaws.schemas.resource_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policystringThe resource-based policy.
revision_idstringThe revision ID.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_policyselectregionregistryNameRetrieves the resource-based policy attached to a given registry.
put_resource_policyreplaceregionregistryNameThe name of the policy.
delete_resource_policydeleteregionregistryNameDelete 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
registryNamestringThe name of the registry.

SELECT examples

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

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 the resource-based policy attached to the specified registry.

DELETE FROM aws.schemas.resource_policies
WHERE region = '{{ region }}' --required
AND registryName = '{{ registryName }}'
;