Table of Contents

Interface IAddToResourcePolicyResult

Namespace
Amazon.CDK.AWS.IAM
Assembly
Amazon.CDK.AWS.IAM.dll

Result of calling addToResourcePolicy.

public interface IAddToResourcePolicyResult

Examples

var bucket = Bucket.FromBucketName(this, "existingBucket", "bucket-name");

            // No policy statement will be added to the resource
            var result = bucket.AddToResourcePolicy(new PolicyStatement(new PolicyStatementProps {
                Actions = new [] { "s3:GetObject" },
                Resources = new [] { bucket.ArnForObjects("file.txt") },
                Principals = new [] { new AccountRootPrincipal() }
            }));

Remarks

ExampleMetadata: infused

Properties

PolicyDependable

Dependable which allows depending on the policy change being applied.

IDependable? PolicyDependable { get; }

Property Value

IDependable

Remarks

Default: - If statementAdded is true, the resource object itself. Otherwise, no dependable.

StatementAdded

Whether the statement was added.

bool StatementAdded { get; }

Property Value

bool