Skip to main content

resource_policies

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

Overview

Nameresource_policies
TypeResource
Idaws.kinesis.resource_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policystringDetails of the resource policy. This is formatted as a JSON string.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_policyselectregionReturns a policy attached to the specified data stream or consumer. Request patterns can be one of the following: Data stream pattern: arn:aws.:kinesis:.:\d{12}:.stream/\S+ Consumer pattern: ^(arn):aws.:kinesis:.*:\d{12}:.*stream/[a-zA-Z0-9_.-]+/consumer/[a-zA-Z0-9_.-]+:[0-9]+
put_resource_policyreplaceregion, ResourceARNAttaches a resource-based policy to a data stream or registered consumer. If you are using an identity other than the root user of the Amazon Web Services account that owns the resource, the calling identity must have the PutResourcePolicy permissions on the specified Kinesis Data Streams resource and belong to the owner's account in order to use this operation. If you don't have PutResourcePolicy permissions, Amazon Kinesis Data Streams returns a 403 Access Denied error. If you receive a ResourceNotFoundException, check to see if you passed a valid stream or consumer resource. Request patterns can be one of the following: Data stream pattern: arn:aws.:kinesis:.:\d{12}:.stream/\S+ Consumer pattern: ^(arn):aws.:kinesis:.*:\d{12}:.*stream/[a-zA-Z0-9_.-]+/consumer/[a-zA-Z0-9_.-]+:[0-9]+ For more information, see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM.
delete_resource_policydeleteregionDelete a policy for the specified data stream or consumer. Request patterns can be one of the following: Data stream pattern: arn:aws.:kinesis:.:\d{12}:.stream/\S+ Consumer pattern: ^(arn):aws.:kinesis:.*:\d{12}:.*stream/[a-zA-Z0-9_.-]+/consumer/[a-zA-Z0-9_.-]+:[0-9]+

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)

SELECT examples

Returns a policy attached to the specified data stream or consumer. Request patterns can be one of the following: Data stream pattern: arn:aws.:kinesis:.:\d{12}:.stream/\S+ Consumer pattern: ^(arn):aws.:kinesis:.*:\d{12}:.*stream/[a-zA-Z0-9_.-]+/consumer/[a-zA-Z0-9_.-]+:[0-9]+

SELECT
policy
FROM aws.kinesis.resource_policies
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Attaches a resource-based policy to a data stream or registered consumer. If you are using an identity other than the root user of the Amazon Web Services account that owns the resource, the calling identity must have the PutResourcePolicy permissions on the specified Kinesis Data Streams resource and belong to the owner's account in order to use this operation. If you don't have PutResourcePolicy permissions, Amazon Kinesis Data Streams returns a 403 Access Denied error. If you receive a ResourceNotFoundException, check to see if you passed a valid stream or consumer resource. Request patterns can be one of the following: Data stream pattern: arn:aws.:kinesis:.:\d{12}:.stream/\S+ Consumer pattern: ^(arn):aws.:kinesis:.*:\d{12}:.*stream/[a-zA-Z0-9_.-]+/consumer/[a-zA-Z0-9_.-]+:[0-9]+ For more information, see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM.

REPLACE aws.kinesis.resource_policies
SET
ResourceARN = '{{ ResourceARN }}',
StreamId = '{{ StreamId }}',
Policy = '{{ Policy }}'
WHERE
region = '{{ region }}' --required
AND ResourceARN = '{{ ResourceARN }}' --required;

DELETE examples

Delete a policy for the specified data stream or consumer. Request patterns can be one of the following: Data stream pattern: arn:aws.:kinesis:.:\d{12}:.stream/\S+ Consumer pattern: ^(arn):aws.:kinesis:.*:\d{12}:.*stream/[a-zA-Z0-9_.-]+/consumer/[a-zA-Z0-9_.-]+:[0-9]+

DELETE FROM aws.kinesis.resource_policies
WHERE region = '{{ region }}' --required
;