Interface ResourcePolicyProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ResourcePolicyProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2025-01-07T10:36:08.676Z") @Stability(Stable) public interface ResourcePolicyProps extends software.amazon.jsii.JsiiSerializable
Properties to associate a data stream with a policy.

Example:

 Stream stream = new Stream(this, "MyStream");
 // create a custom policy document
 PolicyDocument policyDocument = PolicyDocument.Builder.create()
         .assignSids(true)
         .statements(List.of(
             PolicyStatement.Builder.create()
                     .actions(List.of("kinesis:GetRecords"))
                     .resources(List.of(stream.getStreamArn()))
                     .principals(List.of(new AnyPrincipal()))
                     .build()))
         .build();
 // create a resource policy manually
 // create a resource policy manually
 ResourcePolicy.Builder.create(this, "ResourcePolicy")
         .stream(stream)
         .policyDocument(policyDocument)
         .build();