Class IRole.Jsii$Proxy
- All Implemented Interfaces:
IResource
,IResource.Jsii$Default
,IGrantable
,IGrantable.Jsii$Default
,IIdentity
,IIdentity.Jsii$Default
,IPrincipal
,IPrincipal.Jsii$Default
,IRole
,IRole.Jsii$Default
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IConstruct.Jsii$Default
,software.constructs.IDependable
,software.constructs.IDependable.Jsii$Default
- Enclosing interface:
IRole
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IGrantable
IGrantable.Jsii$Default, IGrantable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IIdentity
IIdentity.Jsii$Default, IIdentity.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IPrincipal
IPrincipal.Jsii$Default, IPrincipal.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IRole
IRole.Jsii$Default, IRole.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addManagedPolicy
(IManagedPolicy policy) Attaches a managed policy to this principal.addToPrincipalPolicy
(PolicyStatement statement) Add to the policy of this principal.final void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.final void
attachInlinePolicy
(Policy policy) Attaches an inline policy to this principal.final String
When this Principal is used in an AssumeRole policy, the action to use.final ResourceEnvironment
getEnv()
The environment this resource belongs to.final IPrincipal
The principal to grant permissions to.final software.constructs.Node
getNode()
The tree node.final PrincipalPolicyFragment
Return the policy fragment that identifies this principal in a Policy.final String
The AWS account ID of this principal.final String
Returns the ARN of this role.final String
Returns the name of this role.final Stack
getStack()
The stack in which this resource is defined.final Grant
grant
(IPrincipal grantee, @NotNull String... actions) Grant the actions defined in actions to the identity Principal on this resource.final Grant
grantAssumeRole
(IPrincipal grantee) Grant permissions to the given principal to assume this role.final Grant
grantPassRole
(IPrincipal grantee) Grant permissions to the given principal to pass this role.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
-
-
Method Details
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipal
in interfaceIGrantable
- Specified by:
getGrantPrincipal
in interfaceIGrantable.Jsii$Default
- Specified by:
getGrantPrincipal
in interfaceIIdentity.Jsii$Default
- Specified by:
getGrantPrincipal
in interfaceIPrincipal.Jsii$Default
- Specified by:
getGrantPrincipal
in interfaceIRole.Jsii$Default
-
getAssumeRoleAction
When this Principal is used in an AssumeRole policy, the action to use.- Specified by:
getAssumeRoleAction
in interfaceIIdentity.Jsii$Default
- Specified by:
getAssumeRoleAction
in interfaceIPrincipal
- Specified by:
getAssumeRoleAction
in interfaceIPrincipal.Jsii$Default
- Specified by:
getAssumeRoleAction
in interfaceIRole.Jsii$Default
-
getPolicyFragment
Return the policy fragment that identifies this principal in a Policy.- Specified by:
getPolicyFragment
in interfaceIIdentity.Jsii$Default
- Specified by:
getPolicyFragment
in interfaceIPrincipal
- Specified by:
getPolicyFragment
in interfaceIPrincipal.Jsii$Default
- Specified by:
getPolicyFragment
in interfaceIRole.Jsii$Default
-
getPrincipalAccount
The AWS account ID of this principal.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.
- Specified by:
getPrincipalAccount
in interfaceIIdentity.Jsii$Default
- Specified by:
getPrincipalAccount
in interfaceIPrincipal
- Specified by:
getPrincipalAccount
in interfaceIPrincipal.Jsii$Default
- Specified by:
getPrincipalAccount
in interfaceIRole.Jsii$Default
-
getNode
@Stability(Stable) @NotNull public final software.constructs.Node getNode()The tree node.- Specified by:
getNode
in interfacesoftware.constructs.IConstruct
- Specified by:
getNode
in interfacesoftware.constructs.IConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIIdentity.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
- Specified by:
getNode
in interfaceIRole.Jsii$Default
-
getEnv
The environment this resource belongs to.For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
- Specified by:
getEnv
in interfaceIIdentity.Jsii$Default
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
- Specified by:
getEnv
in interfaceIRole.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIIdentity.Jsii$Default
- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
- Specified by:
getStack
in interfaceIRole.Jsii$Default
-
getRoleArn
Returns the ARN of this role.- Specified by:
getRoleArn
in interfaceIRole
- Specified by:
getRoleArn
in interfaceIRole.Jsii$Default
-
getRoleName
Returns the name of this role.- Specified by:
getRoleName
in interfaceIRole
- Specified by:
getRoleName
in interfaceIRole.Jsii$Default
-
addToPrincipalPolicy
@Stability(Stable) @NotNull public final AddToPrincipalPolicyResult addToPrincipalPolicy(@NotNull PolicyStatement statement) Add to the policy of this principal.- Specified by:
addToPrincipalPolicy
in interfaceIIdentity.Jsii$Default
- Specified by:
addToPrincipalPolicy
in interfaceIPrincipal
- Specified by:
addToPrincipalPolicy
in interfaceIPrincipal.Jsii$Default
- Specified by:
addToPrincipalPolicy
in interfaceIRole.Jsii$Default
- Parameters:
statement
- This parameter is required.
-
applyRemovalPolicy
Apply the given removal policy to this resource.The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Specified by:
applyRemovalPolicy
in interfaceIIdentity.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIRole.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
addManagedPolicy
Attaches a managed policy to this principal.- Specified by:
addManagedPolicy
in interfaceIIdentity
- Specified by:
addManagedPolicy
in interfaceIIdentity.Jsii$Default
- Specified by:
addManagedPolicy
in interfaceIRole.Jsii$Default
- Parameters:
policy
- The managed policy. This parameter is required.
-
attachInlinePolicy
Attaches an inline policy to this principal.This is the same as calling
policy.addToXxx(principal)
.- Specified by:
attachInlinePolicy
in interfaceIIdentity
- Specified by:
attachInlinePolicy
in interfaceIIdentity.Jsii$Default
- Specified by:
attachInlinePolicy
in interfaceIRole.Jsii$Default
- Parameters:
policy
- The policy resource to attach to this principal [disable-awslint:ref-via-interface]. This parameter is required.
-
grant
@Stability(Stable) @NotNull public final Grant grant(@NotNull IPrincipal grantee, @NotNull @NotNull String... actions) Grant the actions defined in actions to the identity Principal on this resource.- Specified by:
grant
in interfaceIRole
- Specified by:
grant
in interfaceIRole.Jsii$Default
- Parameters:
grantee
- This parameter is required.actions
- This parameter is required.
-
grantAssumeRole
Grant permissions to the given principal to assume this role.- Specified by:
grantAssumeRole
in interfaceIRole
- Specified by:
grantAssumeRole
in interfaceIRole.Jsii$Default
- Parameters:
grantee
- This parameter is required.
-
grantPassRole
Grant permissions to the given principal to pass this role.- Specified by:
grantPassRole
in interfaceIRole
- Specified by:
grantPassRole
in interfaceIRole.Jsii$Default
- Parameters:
grantee
- This parameter is required.
-