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="2024-11-06T23:25:11.748Z")
@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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forResourcePolicyPropsstatic final classAn implementation forResourcePolicyProps -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourcePolicyProps.Builderbuilder()default PolicyDocumentIAM policy document to apply to a data stream.The stream this policy applies to.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getStream
The stream this policy applies to. -
getPolicyDocument
IAM policy document to apply to a data stream.Default: - empty policy document
-
builder
- Returns:
- a
ResourcePolicyProps.BuilderofResourcePolicyProps
-