Class AccountRootPrincipal
Use the AWS account into which a stack is deployed as the principal entity in a policy.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AccountRootPrincipal : AccountPrincipal, IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Syntax (vb)
Public Class AccountRootPrincipal
Inherits AccountPrincipal
Implements IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Remarks
ExampleMetadata: infused
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() }
}));
Synopsis
Constructors
AccountRootPrincipal() | |
AccountRootPrincipal(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
AccountRootPrincipal(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
ToString() | Returns a string representation of an object. |
Constructors
AccountRootPrincipal()
public AccountRootPrincipal()
AccountRootPrincipal(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected AccountRootPrincipal(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
AccountRootPrincipal(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected AccountRootPrincipal(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
ToString()
Returns a string representation of an object.
public override string ToString()
Returns
System.String