resource_policies
Creates, updates, deletes, gets or lists a resource_policies resource.
Overview
| Name | resource_policies |
| Type | Resource |
| Id | aws.kinesis.resource_policies |
Fields
The following fields are returned by SELECT queries:
- get_resource_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | Details of the resource policy. This is formatted as a JSON string. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_policy | select | region | 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]+ | |
put_resource_policy | replace | region, ResourceARN | 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. | |
delete_resource_policy | delete | region | 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]+ |
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) |
SELECT examples
- get_resource_policy
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
- put_resource_policy
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_resource_policy
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
;