policy_statements
Creates, updates, deletes or gets a policy_statement
resource or lists policy_statements
in a region
Overview
Name | policy_statements |
Type | Resource |
Description | Policy Statement defined in AWS Entity Resolution Service |
Id | aws.entityresolution.policy_statements |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | Arn of the resource to which the policy statement is being attached. |
statement_id | string | The Statement Id of the policy statement that is being attached. |
effect | string | |
action | array | |
principal | array | |
condition | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Arn, StatementId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all policy_statements
in a region.
SELECT
region,
arn,
statement_id,
effect,
action,
principal,
condition
FROM aws.entityresolution.policy_statements
WHERE region = 'us-east-1';
Gets all properties from an individual policy_statement
.
SELECT
region,
arn,
statement_id,
effect,
action,
principal,
condition
FROM aws.entityresolution.policy_statements
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>|<StatementId>';
INSERT
example
Use the following StackQL query and manifest file to create a new policy_statement
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.entityresolution.policy_statements (
Arn,
StatementId,
region
)
SELECT
'{{ Arn }}',
'{{ StatementId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.entityresolution.policy_statements (
Arn,
StatementId,
Effect,
Action,
Principal,
Condition,
region
)
SELECT
'{{ Arn }}',
'{{ StatementId }}',
'{{ Effect }}',
'{{ Action }}',
'{{ Principal }}',
'{{ Condition }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: policy_statement
props:
- name: Arn
value: '{{ Arn }}'
- name: StatementId
value: '{{ StatementId }}'
- name: Effect
value: '{{ Effect }}'
- name: Action
value:
- '{{ Action[0] }}'
- name: Principal
value:
- '{{ Principal[0] }}'
- name: Condition
value: '{{ Condition }}'
DELETE
example
/*+ delete */
DELETE FROM aws.entityresolution.policy_statements
WHERE data__Identifier = '<Arn|StatementId>'
AND region = 'us-east-1';
Permissions
To operate on the policy_statements
resource, the following permissions are required:
Create
entityresolution:AddPolicyStatement
Read
entityresolution:GetPolicy
Update
entityresolution:AddPolicyStatement,
entityresolution:DeletePolicyStatement
Delete
entityresolution:DeletePolicyStatement,
entityresolution:GetPolicy
List
entityresolution:GetPolicy