Interface IResourcePolicyProps
Properties to associate a data stream with a policy.
Namespace: Amazon.CDK.AWS.Kinesis
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IResourcePolicyProps
Syntax (vb)
Public Interface IResourcePolicyProps
Remarks
ExampleMetadata: infused
Examples
var stream = new Stream(this, "MyStream");
// create a custom policy document
var policyDocument = new PolicyDocument(new PolicyDocumentProps {
AssignSids = true,
Statements = new [] {
new PolicyStatement(new PolicyStatementProps {
Actions = new [] { "kinesis:GetRecords" },
Resources = new [] { stream.StreamArn },
Principals = new [] { new AnyPrincipal() }
}) }
});
// create a resource policy manually
// create a resource policy manually
new ResourcePolicy(this, "ResourcePolicy", new ResourcePolicyProps {
Stream = stream,
PolicyDocument = policyDocument
});
Synopsis
Properties
PolicyDocument | IAM policy document to apply to a data stream. |
Stream | The stream this policy applies to. |
Properties
PolicyDocument
IAM policy document to apply to a data stream.
virtual PolicyDocument PolicyDocument { get; }
Property Value
Remarks
Default: - empty policy document