auth_policies
Creates, updates, deletes or gets an auth_policy
resource or lists auth_policies
in a region
Overview
Name | auth_policies |
Type | Resource |
Description | Creates or updates the auth policy. |
Id | aws.vpclattice.auth_policies |
Fields
Name | Datatype | Description |
---|---|---|
resource_identifier | string | |
policy | object | |
state | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ResourceIdentifier, Policy, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual auth_policy
.
SELECT
region,
resource_identifier,
policy,
state
FROM aws.vpclattice.auth_policies
WHERE region = 'us-east-1' AND data__Identifier = '<ResourceIdentifier>';
INSERT
example
Use the following StackQL query and manifest file to create a new auth_policy
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.vpclattice.auth_policies (
ResourceIdentifier,
Policy,
region
)
SELECT
'{{ ResourceIdentifier }}',
'{{ Policy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.vpclattice.auth_policies (
ResourceIdentifier,
Policy,
region
)
SELECT
'{{ ResourceIdentifier }}',
'{{ Policy }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: auth_policy
props:
- name: ResourceIdentifier
value: '{{ ResourceIdentifier }}'
- name: Policy
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.vpclattice.auth_policies
WHERE data__Identifier = '<ResourceIdentifier>'
AND region = 'us-east-1';
Permissions
To operate on the auth_policies
resource, the following permissions are required:
Create
vpc-lattice:GetAuthPolicy,
vpc-lattice:PutAuthPolicy
Read
vpc-lattice:GetAuthPolicy
Update
vpc-lattice:GetAuthPolicy,
vpc-lattice:PutAuthPolicy
Delete
vpc-lattice:GetAuthPolicy,
vpc-lattice:DeleteAuthPolicy