Skip to main content

resource_policies

Creates, updates, deletes, gets or lists a resource_policies resource.

Overview

Nameresource_policies
TypeResource
Idaws.osis.resource_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policystringThe resource-based policy document in JSON format.
resource_arnstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_policyselectresource_arn, regionRetrieves the resource-based policy attached to an OpenSearch Ingestion resource.
put_resource_policyreplaceresource_arn, regionAttaches a resource-based policy to an OpenSearch Ingestion resource. Resource-based policies grant permissions to principals to perform actions on the resource.
delete_resource_policydeleteresource_arn, regionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
resource_arnstringThe Amazon Resource Name (ARN) of the resource from which to delete the policy.

SELECT examples

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

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

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
;