policies
Creates, updates, deletes or gets a policy
resource or lists policies
in a region
Overview
Name | policies |
Type | Resource |
Description | Definition of AWS::VerifiedPermissions::Policy Resource Type |
Id | aws.verifiedpermissions.policies |
Fields
Name | Datatype | Description |
---|---|---|
definition | undefined | |
policy_id | string | |
policy_store_id | string | |
policy_type | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Definition, 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.verifiedpermissions.policies (
Definition,
PolicyStoreId,
region
)
SELECT
'{{ Definition }}',
'{{ PolicyStoreId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.verifiedpermissions.policies (
Definition,
PolicyStoreId,
region
)
SELECT
'{{ Definition }}',
'{{ PolicyStoreId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: policy
props:
- name: Definition
value: null
- name: PolicyStoreId
value: '{{ PolicyStoreId }}'
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