@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:50.017Z") @Stability(value=Experimental) public class AccountPrincipal extends ArnPrincipal
Example:
DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Cluster")
.vpc(vpc)
.instanceType(InstanceType.R5_LARGE)
.iamAuthentication(true)
.build();
Role role = Role.Builder.create(this, "DBRole").assumedBy(new AccountPrincipal(this.account)).build();
cluster.grantConnect(role);
software.amazon.jsii.JsiiObject.InitializationModeIAssumeRolePrincipal.Jsii$DefaultIComparablePrincipal.Jsii$Default| Modifier | Constructor and Description |
|---|---|
protected |
AccountPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
AccountPrincipal(software.amazon.jsii.JsiiObjectRef objRef) |
|
AccountPrincipal(Object accountId) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAccountId()
(experimental) AWS account ID (i.e.
|
String |
getPrincipalAccount()
(experimental) The AWS account ID of this principal.
|
String |
toString()
(experimental) Returns a string representation of an object.
|
dedupeString, getArn, getPolicyFragment, inOrganizationaddToAssumeRolePolicy, addToPolicy, addToPrincipalPolicy, getAssumeRoleAction, getGrantPrincipal, toJSON, withConditions, withSessionTagsprotected AccountPrincipal(software.amazon.jsii.JsiiObjectRef objRef)
protected AccountPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public AccountPrincipal(@NotNull
Object accountId)
accountId - AWS account ID (i.e. 123456789012). This parameter is required.@Stability(value=Experimental) @NotNull public String toString()
toString in class ArnPrincipal@Stability(value=Experimental) @NotNull public Object getAccountId()
@Stability(value=Experimental) @Nullable public String getPrincipalAccount()
Can be undefined when the account is not known (for example, for service principals). Can be a Token - in that case, it's assumed to be AWS::AccountId.
getPrincipalAccount in interface IPrincipalgetPrincipalAccount in class PrincipalBaseCopyright © 2022. All rights reserved.