policy_stores
Creates, updates, deletes or gets a policy_store
resource or lists policy_stores
in a region
Overview
Name | policy_stores |
Type | Resource |
Description | Represents a policy store that you can place schema, policies, and policy templates in to validate authorization requests |
Id | aws.verifiedpermissions.policy_stores |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
description | string | |
policy_store_id | string | |
validation_settings | object | |
schema | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ValidationSettings, 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_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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.verifiedpermissions.policy_stores (
ValidationSettings,
region
)
SELECT
'{{ ValidationSettings }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.verifiedpermissions.policy_stores (
Description,
ValidationSettings,
Schema,
region
)
SELECT
'{{ Description }}',
'{{ ValidationSettings }}',
'{{ Schema }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: policy_store
props:
- name: Description
value: '{{ Description }}'
- name: ValidationSettings
value:
Mode: '{{ Mode }}'
- name: Schema
value:
CedarJson: '{{ CedarJson }}'
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