Show / Hide Table of Contents

Class AddToResourcePolicyResult

Result of calling addToResourcePolicy.

Inheritance
object
AddToResourcePolicyResult
Implements
IAddToResourcePolicyResult
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AddToResourcePolicyResult : IAddToResourcePolicyResult
Syntax (vb)
Public Class AddToResourcePolicyResult Implements IAddToResourcePolicyResult
Remarks

ExampleMetadata: infused

Examples
var bucket = Bucket.FromBucketName(this, "existingBucket", "amzn-s3-demo-bucket");

            // 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() }
            }));

Synopsis

Constructors

AddToResourcePolicyResult()

Result of calling addToResourcePolicy.

Properties

PolicyDependable

Dependable which allows depending on the policy change being applied.

StatementAdded

Whether the statement was added.

Constructors

AddToResourcePolicyResult()

Result of calling addToResourcePolicy.

public AddToResourcePolicyResult()
Remarks

ExampleMetadata: infused

Examples
var bucket = Bucket.FromBucketName(this, "existingBucket", "amzn-s3-demo-bucket");

            // 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() }
            }));

Properties

PolicyDependable

Dependable which allows depending on the policy change being applied.

public IDependable? PolicyDependable { get; set; }
Property Value

IDependable

Remarks

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

StatementAdded

Whether the statement was added.

public bool StatementAdded { get; set; }
Property Value

bool

Remarks

ExampleMetadata: infused

Implements

IAddToResourcePolicyResult
Back to top Generated by DocFX