policy_templates
Creates, updates, deletes or gets a policy_template
resource or lists policy_templates
in a region
Overview
Name | policy_templates |
Type | Resource |
Description | Definition of AWS::VerifiedPermissions::PolicyTemplate Resource Type |
Id | aws.verifiedpermissions.policy_templates |
Fields
Name | Datatype | Description |
---|---|---|
description | string | |
policy_store_id | string | |
policy_template_id | string | |
statement | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Statement, PolicyStoreId, 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_templates
in a region.
SELECT
region,
description,
policy_store_id,
policy_template_id,
statement
FROM aws.verifiedpermissions.policy_templates
WHERE region = 'us-east-1';
Gets all properties from an individual policy_template
.
SELECT
region,
description,
policy_store_id,
policy_template_id,
statement
FROM aws.verifiedpermissions.policy_templates
WHERE region = 'us-east-1' AND data__Identifier = '<PolicyStoreId>|<PolicyTemplateId>';
INSERT
example
Use the following StackQL query and manifest file to create a new policy_template
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.verifiedpermissions.policy_templates (
PolicyStoreId,
Statement,
region
)
SELECT
'{{ PolicyStoreId }}',
'{{ Statement }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.verifiedpermissions.policy_templates (
Description,
PolicyStoreId,
Statement,
region
)
SELECT
'{{ Description }}',
'{{ PolicyStoreId }}',
'{{ Statement }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: policy_template
props:
- name: Description
value: '{{ Description }}'
- name: PolicyStoreId
value: '{{ PolicyStoreId }}'
- name: Statement
value: '{{ Statement }}'
DELETE
example
/*+ delete */
DELETE FROM aws.verifiedpermissions.policy_templates
WHERE data__Identifier = '<PolicyStoreId|PolicyTemplateId>'
AND region = 'us-east-1';
Permissions
To operate on the policy_templates
resource, the following permissions are required:
Create
verifiedpermissions:CreatePolicyTemplate,
verifiedpermissions:GetPolicyTemplate
Read
verifiedpermissions:GetPolicyTemplate
Update
verifiedpermissions:UpdatePolicyTemplate,
verifiedpermissions:GetPolicyTemplate
Delete
verifiedpermissions:DeletePolicyTemplate,
verifiedpermissions:GetPolicyTemplate
List
verifiedpermissions:ListPolicyTemplates,
verifiedpermissions:GetPolicyTemplate