Skip to main content

policy_templates

Creates, updates, deletes or gets a policy_template resource or lists policy_templates in a region

Overview

Namepolicy_templates
TypeResource
DescriptionDefinition of AWS::VerifiedPermissions::PolicyTemplate Resource Type
Idaws.verifiedpermissions.policy_templates

Fields

NameDatatypeDescription
descriptionstring
policy_store_idstring
policy_template_idstring
statementstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTStatement, PolicyStoreId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.verifiedpermissions.policy_templates (
PolicyStoreId,
Statement,
region
)
SELECT
'{{ PolicyStoreId }}',
'{{ Statement }}',
'{{ region }}';

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