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 | awscc.vpclattice.auth_policies |
Fields
| Name | Datatype | Description |
|---|---|---|
resource_identifier | string | |
policy | object | |
state | string | |
region | string | AWS region. |
For more information, see AWS::VpcLattice::AuthPolicy.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ResourceIdentifier, Policy, region |
delete_resource | DELETE | Identifier, region |
update_resource | UPDATE | Identifier, PatchDocument, region |
get_resource | SELECT | Identifier, region |
SELECT examples
Gets all properties from an individual auth_policy.
SELECT
region,
resource_identifier,
policy,
state
FROM awscc.vpclattice.auth_policies
WHERE
region = 'us-east-1' AND
Identifier = '{{ resource_identifier }}';
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 awscc.vpclattice.auth_policies (
ResourceIdentifier,
Policy,
region
)
SELECT
'{{ resource_identifier }}',
'{{ policy }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.vpclattice.auth_policies (
ResourceIdentifier,
Policy,
region
)
SELECT
'{{ resource_identifier }}',
'{{ 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: resource_identifier
value: '{{ resource_identifier }}'
- name: policy
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a auth_policy resource, using stack-deploy.
/*+ update */
UPDATE awscc.vpclattice.auth_policies
SET PatchDocument = string('{{ {
"Policy": policy
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ resource_identifier }}';
DELETE example
/*+ delete */
DELETE FROM awscc.vpclattice.auth_policies
WHERE
Identifier = '{{ resource_identifier }}' AND
region = 'us-east-1';
Permissions
To operate on the auth_policies resource, the following permissions are required:
- Create
- Read
- Update
- Delete
vpc-lattice:GetAuthPolicy,
vpc-lattice:PutAuthPolicy
vpc-lattice:GetAuthPolicy
vpc-lattice:GetAuthPolicy,
vpc-lattice:PutAuthPolicy
vpc-lattice:GetAuthPolicy,
vpc-lattice:DeleteAuthPolicy