Skip to main content

policies

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

Overview​

Namepolicies
TypeResource
Idaws.entityresolution.policies

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Entity Resolution resource ARN. (pattern: <code>arn:(aws|aws-us-gov|aws-cn):entityresolution:[a-z]{2}-[a-z]{1,10}-[0-9]:[0-9]{12}:((schemamapping|matchingworkflow|idmappingworkflow|idnamespace)/[a-zA-Z_0-9-]{1,255})</code>)
policystringThe resource-based policy.
tokenstringA unique identifier for the current revision of the policy. (pattern: <code>[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}</code>)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_policyselectarn, regionReturns the resource-based policy.
add_policy_statementupdatearn, statement_id, region, effect, action, principalAdds a policy statement object. To retrieve a list of existing policy statements, use the GetPolicy API.
put_policyreplacearn, region, policyUpdates the resource-based policy.
delete_policy_statementdeletearn, statement_id, regionDeletes the policy statement.

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
arnstringThe ARN of the resource for which the policy need to be deleted.
regionstringAWS region (default: us-east-1)
statement_idstringA statement identifier that differentiates the statement from others in the same policy.

SELECT examples​

Returns the resource-based policy.

SELECT
arn,
policy,
token
FROM aws.entityresolution.policies
WHERE arn = '{{ arn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples​

Adds a policy statement object. To retrieve a list of existing policy statements, use the GetPolicy API.

UPDATE aws.entityresolution.policies
SET
effect = '{{ effect }}',
action = '{{ action }}',
principal = '{{ principal }}',
condition = '{{ condition }}'
WHERE
arn = '{{ arn }}' --required
AND statement_id = '{{ statement_id }}' --required
AND region = '{{ region }}' --required
AND effect = '{{ effect }}' --required
AND action = '{{ action }}' --required
AND principal = '{{ principal }}' --required
RETURNING
arn,
policy,
token;

REPLACE examples​

Updates the resource-based policy.

REPLACE aws.entityresolution.policies
SET
token = '{{ token }}',
policy = '{{ policy }}'
WHERE
arn = '{{ arn }}' --required
AND region = '{{ region }}' --required
AND policy = '{{ policy }}' --required
RETURNING
arn,
policy,
token;

DELETE examples​

Deletes the policy statement.

DELETE FROM aws.entityresolution.policies
WHERE arn = '{{ arn }}' --required
AND statement_id = '{{ statement_id }}' --required
AND region = '{{ region }}' --required
;