access_policies
Creates, updates, deletes or gets an access_policy
resource or lists access_policies
in a region
Overview
Name | access_policies |
Type | Resource |
Description | Amazon OpenSearchServerless access policy resource |
Id | aws.opensearchserverless.access_policies |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the policy |
type | string | The possible types for the access policy |
description | string | The description of the policy |
policy | string | The JSON policy document that is the content for the policy |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Type, Name, Policy, 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 access_policies
in a region.
SELECT
region,
name,
type,
description,
policy
FROM aws.opensearchserverless.access_policies
WHERE region = 'us-east-1';
Gets all properties from an individual access_policy
.
SELECT
region,
name,
type,
description,
policy
FROM aws.opensearchserverless.access_policies
WHERE region = 'us-east-1' AND data__Identifier = '<Type>|<Name>';
INSERT
example
Use the following StackQL query and manifest file to create a new access_policy
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.opensearchserverless.access_policies (
Name,
Type,
Policy,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ Policy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.opensearchserverless.access_policies (
Name,
Type,
Description,
Policy,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ Description }}',
'{{ Policy }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: access_policy
props:
- name: Name
value: '{{ Name }}'
- name: Type
value: '{{ Type }}'
- name: Description
value: '{{ Description }}'
- name: Policy
value: '{{ Policy }}'
DELETE
example
/*+ delete */
DELETE FROM aws.opensearchserverless.access_policies
WHERE data__Identifier = '<Type|Name>'
AND region = 'us-east-1';
Permissions
To operate on the access_policies
resource, the following permissions are required:
Create
aoss:CreateAccessPolicy,
aoss:GetAccessPolicy
Read
aoss:GetAccessPolicy
Update
aoss:UpdateAccessPolicy,
aoss:GetAccessPolicy
Delete
aoss:DeleteAccessPolicy,
aoss:GetAccessPolicy
List
aoss:ListAccessPolicies