Skip to main content

policies

Creates, updates, deletes or gets a policy resource or lists policies in a region

Overview

Namepolicies
TypeResource
DescriptionDefinition of AWS::VerifiedPermissions::Policy Resource Type
Idaws.verifiedpermissions.policies

Fields

NameDatatypeDescription
definitionundefined
policy_idstring
policy_store_idstring
policy_typestring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTDefinition, PolicyStoreId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all policies in a region.

SELECT
region,
definition,
policy_id,
policy_store_id,
policy_type
FROM aws.verifiedpermissions.policies
WHERE region = 'us-east-1';

Gets all properties from an individual policy.

SELECT
region,
definition,
policy_id,
policy_store_id,
policy_type
FROM aws.verifiedpermissions.policies
WHERE region = 'us-east-1' AND data__Identifier = '<PolicyId>|<PolicyStoreId>';

INSERT example

Use the following StackQL query and manifest file to create a new policy resource, using stack-deploy.

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

DELETE example

/*+ delete */
DELETE FROM aws.verifiedpermissions.policies
WHERE data__Identifier = '<PolicyId|PolicyStoreId>'
AND region = 'us-east-1';

Permissions

To operate on the policies resource, the following permissions are required:

Create

verifiedpermissions:CreatePolicy,
verifiedpermissions:GetPolicy

Read

verifiedpermissions:GetPolicy

Update

verifiedpermissions:UpdatePolicy,
verifiedpermissions:GetPolicy

Delete

verifiedpermissions:DeletePolicy,
verifiedpermissions:GetPolicy

List

verifiedpermissions:ListPolicies,
verifiedpermissions:GetPolicy