Skip to main content

policy_stores

Creates, updates, deletes or gets a policy_store resource or lists policy_stores in a region

Overview

Namepolicy_stores
TypeResource
DescriptionRepresents a policy store that you can place schema, policies, and policy templates in to validate authorization requests
Idaws.verifiedpermissions.policy_stores

Fields

NameDatatypeDescription
arnstring
descriptionstring
policy_store_idstring
validation_settingsobject
schemaobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTValidationSettings, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all policy_stores in a region.

SELECT
region,
arn,
description,
policy_store_id,
validation_settings,
schema
FROM aws.verifiedpermissions.policy_stores
WHERE region = 'us-east-1';

Gets all properties from an individual policy_store.

SELECT
region,
arn,
description,
policy_store_id,
validation_settings,
schema
FROM aws.verifiedpermissions.policy_stores
WHERE region = 'us-east-1' AND data__Identifier = '<PolicyStoreId>';

INSERT example

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

/*+ create */
INSERT INTO aws.verifiedpermissions.policy_stores (
ValidationSettings,
region
)
SELECT
'{{ ValidationSettings }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

verifiedpermissions:CreatePolicyStore,
verifiedpermissions:GetPolicyStore,
verifiedpermissions:PutSchema

Read

verifiedpermissions:GetPolicyStore,
verifiedpermissions:GetSchema

Update

verifiedpermissions:UpdatePolicyStore,
verifiedpermissions:GetPolicyStore,
verifiedpermissions:GetSchema,
verifiedpermissions:PutSchema

Delete

verifiedpermissions:DeletePolicyStore,
verifiedpermissions:GetPolicyStore

List

verifiedpermissions:ListPolicyStores,
verifiedpermissions:GetPolicyStore,
verifiedpermissions:GetSchema