Class AddToResourcePolicyResult
Result of calling addToResourcePolicy.
public class AddToResourcePolicyResult : IAddToResourcePolicyResult
- Inheritance
-
AddToResourcePolicyResult
- Implements
- Inherited Members
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
Constructors
AddToResourcePolicyResult()
public AddToResourcePolicyResult()
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; }