Class AccountRootPrincipal
Use the AWS account into which a stack is deployed as the principal entity in a policy.
public class AccountRootPrincipal : AccountPrincipal, IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
- Inheritance
-
AccountRootPrincipal
- Implements
- Inherited Members
Examples
var bucket = new Bucket(this, "MyBucket");
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
AccountRootPrincipal()
public AccountRootPrincipal()
Methods
ToString()
Returns a string representation of an object.
public override string ToString()