resource_policies
Creates, updates, deletes, gets or lists a resource_policies resource.
Overview
| Name | resource_policies |
| Type | Resource |
| Id | aws.osis.resource_policies |
Fields
The following fields are returned by SELECT queries:
- get_resource_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | The resource-based policy document in JSON format. |
resource_arn | string | The Amazon Resource Name (ARN) of the resource. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):osis:.+:pipeline/.+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_policy | select | resource_arn, region | Retrieves the resource-based policy attached to an OpenSearch Ingestion resource. | |
put_resource_policy | replace | resource_arn, region | Attaches a resource-based policy to an OpenSearch Ingestion resource. Resource-based policies grant permissions to principals to perform actions on the resource. | |
delete_resource_policy | delete | resource_arn, region | Deletes a resource-based policy from an OpenSearch Ingestion resource. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_arn | string | The Amazon Resource Name (ARN) of the resource from which to delete the policy. |
SELECT examples
- get_resource_policy
Retrieves the resource-based policy attached to an OpenSearch Ingestion resource.
SELECT
policy,
resource_arn
FROM aws.osis.resource_policies
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_resource_policy
Attaches a resource-based policy to an OpenSearch Ingestion resource. Resource-based policies grant permissions to principals to perform actions on the resource.
REPLACE aws.osis.resource_policies
SET
Policy = '{{ Policy }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
RETURNING
policy,
resource_arn;
DELETE examples
- delete_resource_policy
Deletes a resource-based policy from an OpenSearch Ingestion resource.
DELETE FROM aws.osis.resource_policies
WHERE resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
;