Interface RoleLookupOptions
- All Superinterfaces:
FromRoleArnOptions,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
RoleLookupOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:37.949Z")
@Stability(Stable)
public interface RoleLookupOptions
extends software.amazon.jsii.JsiiSerializable, FromRoleArnOptions
Properties for looking up an existing Role.
Example:
IRole role = Role.fromLookup(this, "Role", RoleLookupOptions.builder()
.roleName("MyExistingRole")
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forRoleLookupOptionsstatic final classAn implementation forRoleLookupOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic RoleLookupOptions.Builderbuilder()The name of the role to lookup.Methods inherited from interface software.amazon.awscdk.services.iam.FromRoleArnOptions
getAddGrantsToResources, getDefaultPolicyName, getMutableMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getRoleName
The name of the role to lookup.If the role you want to lookup is a service role, you need to specify the role name without the 'service-role' prefix. For example, if the role arn is 'arn:aws:iam::123456789012:role/service-role/ExampleServiceExecutionRole', you need to specify the role name as 'ExampleServiceExecutionRole'.
-
builder
- Returns:
- a
RoleLookupOptions.BuilderofRoleLookupOptions
-