Interface IRole.Jsii$Default
- All Superinterfaces:
IConstruct
,software.constructs.IConstruct
,IConstruct.Jsii$Default
,software.constructs.IConstruct.Jsii$Default
,IDependable
,IDependable.Jsii$Default
,IGrantable
,IGrantable.Jsii$Default
,IIdentity
,IIdentity.Jsii$Default
,IPrincipal
,IPrincipal.Jsii$Default
,IResource
,IResource.Jsii$Default
,IRole
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
IRole.Jsii$Proxy
- Enclosing interface:
- IRole
IRole
.-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
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.amazon.awscdk.core.IDependable
IDependable.Jsii$Default, 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.core.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
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
addManagedPolicy
(IManagedPolicy policy) Attaches a managed policy to this principal.default Boolean
addToPolicy
(PolicyStatement statement) Deprecated.default AddToPrincipalPolicyResult
addToPrincipalPolicy
(PolicyStatement statement) Add to the policy of this principal.default void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.default void
attachInlinePolicy
(Policy policy) Attaches an inline policy to this principal.default String
When this Principal is used in an AssumeRole policy, the action to use.default ResourceEnvironment
getEnv()
The environment this resource belongs to.default IPrincipal
The principal to grant permissions to.default ConstructNode
getNode()
The construct tree node for this construct.default PrincipalPolicyFragment
Return the policy fragment that identifies this principal in a Policy.default String
The AWS account ID of this principal.default String
Returns the ARN of this role.default String
Returns the name of this role.default Stack
getStack()
The stack in which this resource is defined.default Grant
grant
(IPrincipal grantee, @NotNull String... actions) Grant the actions defined in actions to the identity Principal on this resource.default Grant
grantAssumeRole
(IPrincipal grantee) Grant permissions to the given principal to assume this role.default Grant
grantPassRole
(IPrincipal grantee) Grant permissions to the given principal to pass this role.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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
-
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
-
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
-
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
-
getNode
The construct tree node for this construct.- Specified by:
getNode
in interfaceIConstruct
- Specified by:
getNode
in interfaceIConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIIdentity.Jsii$Default
- Specified by:
getNode
in interfaceIResource.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
-
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
-
getRoleArn
Returns the ARN of this role.- Specified by:
getRoleArn
in interfaceIRole
-
getRoleName
Returns the name of this role.- Specified by:
getRoleName
in interfaceIRole
-
addToPolicy
@Stability(Deprecated) @Deprecated @NotNull default Boolean addToPolicy(@NotNull PolicyStatement statement) Deprecated.UseaddToPrincipalPolicy
instead.(deprecated) Add to the policy of this principal.- Specified by:
addToPolicy
in interfaceIIdentity.Jsii$Default
- Specified by:
addToPolicy
in interfaceIPrincipal
- Specified by:
addToPolicy
in interfaceIPrincipal.Jsii$Default
- Parameters:
statement
- This parameter is required.- Returns:
- true if the statement was added, false if the principal in question does not have a policy document to add the statement to.
-
addToPrincipalPolicy
@Stability(Stable) @NotNull default 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
- 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
- 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
- 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
- Parameters:
policy
- The policy resource to attach to this principal [disable-awslint:ref-via-interface]. This parameter is required.
-
grant
@Stability(Stable) @NotNull default Grant grant(@NotNull IPrincipal grantee, @NotNull @NotNull String... actions) Grant the actions defined in actions to the identity Principal on this resource. -
grantAssumeRole
Grant permissions to the given principal to assume this role.- Specified by:
grantAssumeRole
in interfaceIRole
- Parameters:
grantee
- This parameter is required.
-
grantPassRole
Grant permissions to the given principal to pass this role.- Specified by:
grantPassRole
in interfaceIRole
- Parameters:
grantee
- This parameter is required.
-
addToPrincipalPolicy
instead.