Class InstanceProfile
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.iam.InstanceProfile
- All Implemented Interfaces:
IResource
,IInstanceProfile
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:09.284Z")
@Stability(Stable)
public class InstanceProfile
extends Resource
implements IInstanceProfile
IAM Instance Profile.
Example:
Role role = Role.Builder.create(this, "Role") .assumedBy(new ServicePrincipal("ec2.amazonaws.com")) .build(); IInstanceProfile instanceProfile = InstanceProfile.fromInstanceProfileAttributes(this, "ImportedInstanceProfile", InstanceProfileAttributes.builder() .instanceProfileArn("arn:aws:iam::account-id:instance-profile/MyInstanceProfile") .role(role) .build());
-
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
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IInstanceProfile
IInstanceProfile.Jsii$Default, IInstanceProfile.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
InstanceProfile
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
InstanceProfile
(software.amazon.jsii.JsiiObjectRef objRef) InstanceProfile
(software.constructs.Construct scope, String id) InstanceProfile
(software.constructs.Construct scope, String id, InstanceProfileProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IInstanceProfile
fromInstanceProfileArn
(software.constructs.Construct scope, String id, String instanceProfileArn) Import an existing InstanceProfile from an InstanceProfile ARN.static IInstanceProfile
fromInstanceProfileAttributes
(software.constructs.Construct scope, String id, InstanceProfileAttributes attrs) Import an existing InstanceProfile from given InstanceProfile attributes.static IInstanceProfile
fromInstanceProfileName
(software.constructs.Construct scope, String id, String instanceProfileName) Import an existing InstanceProfile from an InstanceProfile name.Returns the ARN of this InstanceProfile.Returns the name of this InstanceProfile.getRole()
Returns the role associated with this InstanceProfile.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
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, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
InstanceProfile
protected InstanceProfile(software.amazon.jsii.JsiiObjectRef objRef) -
InstanceProfile
protected InstanceProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
InstanceProfile
@Stability(Stable) public InstanceProfile(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable InstanceProfileProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
InstanceProfile
@Stability(Stable) public InstanceProfile(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
fromInstanceProfileArn
@Stability(Stable) @NotNull public static IInstanceProfile fromInstanceProfileArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String instanceProfileArn) Import an existing InstanceProfile from an InstanceProfile ARN.If the ARN comes from a Token, the InstanceProfile cannot have a path; if so, any attempt to reference its instanceProfileName will fail.
- Parameters:
scope
- construct scope. This parameter is required.id
- construct id. This parameter is required.instanceProfileArn
- the ARN of the exiting InstanceProfile to import. This parameter is required.
-
fromInstanceProfileAttributes
@Stability(Stable) @NotNull public static IInstanceProfile fromInstanceProfileAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull InstanceProfileAttributes attrs) Import an existing InstanceProfile from given InstanceProfile attributes.If the ARN comes from a Token, the InstanceProfile cannot have a path; if so, any attempt to reference its instanceProfileName will fail.
- Parameters:
scope
- construct scope. This parameter is required.id
- construct id. This parameter is required.attrs
- the attributes of the InstanceProfile to import. This parameter is required.
-
fromInstanceProfileName
@Stability(Stable) @NotNull public static IInstanceProfile fromInstanceProfileName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String instanceProfileName) Import an existing InstanceProfile from an InstanceProfile name.- Parameters:
scope
- construct scope. This parameter is required.id
- construct id. This parameter is required.instanceProfileName
- the name of the existing InstanceProfile to import. This parameter is required.
-
getInstanceProfileArn
Returns the ARN of this InstanceProfile.- Specified by:
getInstanceProfileArn
in interfaceIInstanceProfile
-
getInstanceProfileName
Returns the name of this InstanceProfile.- Specified by:
getInstanceProfileName
in interfaceIInstanceProfile
-
getRole
Returns the role associated with this InstanceProfile.- Specified by:
getRole
in interfaceIInstanceProfile
-