CfnResourcePolicyPropsMixin
- class aws_cdk.mixins_preview.aws_kinesis.mixins.CfnResourcePolicyPropsMixin(props, *, strategy=None)
Bases:
MixinAttaches 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
PutResourcePolicypermissions on the specified Kinesis Data Streams resource and belong to the owner’s account in order to use this operation. If you don’t havePutResourcePolicypermissions, Amazon Kinesis Data Streams returns a403 Access Denied error. If you receive aResourceNotFoundException, 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:
- 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:
props (
Union[CfnResourcePolicyMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental