interface ResourcePolicyProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Kinesis.ResourcePolicyProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awskinesis#ResourcePolicyProps |
Java | software.amazon.awscdk.services.kinesis.ResourcePolicyProps |
Python | aws_cdk.aws_kinesis.ResourcePolicyProps |
TypeScript (source) | aws-cdk-lib » aws_kinesis » ResourcePolicyProps |
Properties to associate a data stream with a policy.
Example
const stream = new kinesis.Stream(this, 'MyStream');
// create a custom policy document
const policyDocument = new iam.PolicyDocument({
assignSids: true,
statements: [
new iam.PolicyStatement({
actions: ['kinesis:GetRecords'],
resources: [stream.streamArn],
principals: [new iam.AnyPrincipal()],
}),
],
});
// create a resource policy manually
new kinesis.ResourcePolicy(this, 'ResourcePolicy', {
stream,
policyDocument,
});
Properties
Name | Type | Description |
---|---|---|
stream | IStream | The stream this policy applies to. |
policy | Policy | IAM policy document to apply to a data stream. |
stream
Type:
IStream
The stream this policy applies to.
policyDocument?
Type:
Policy
(optional, default: empty policy document)
IAM policy document to apply to a data stream.