CfnResourcePolicyPropsMixin

class aws_cdk.mixins_preview.aws_kinesis.mixins.CfnResourcePolicyPropsMixin(props, *, strategy=None)

Bases: Mixin

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 AWS 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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-resourcepolicy.html

CloudformationResource:

AWS::Kinesis::ResourcePolicy

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_kinesis import mixins as kinesis_mixins

# resource_policy: Any

cfn_resource_policy_props_mixin = kinesis_mixins.CfnResourcePolicyPropsMixin(kinesis_mixins.CfnResourcePolicyMixinProps(
    resource_arn="resourceArn",
    resource_policy=resource_policy
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Kinesis::ResourcePolicy.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['resourceArn', 'resourcePolicy']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental