@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.719Z") @Stability(value=Stable) public class CfnInstanceProfile extends CfnResource implements IInspectable
Creates a new instance profile. For information about instance profiles, see Using instance profiles .
For information about the number of instance profiles you can create, see IAM object quotas in the IAM User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iam.*;
CfnInstanceProfile cfnInstanceProfile = CfnInstanceProfile.Builder.create(this, "MyCfnInstanceProfile")
.roles(List.of("roles"))
// the properties below are optional
.instanceProfileName("instanceProfileName")
.path("path")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnInstanceProfile.Builder
A fluent builder for
CfnInstanceProfile. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnInstanceProfile(software.constructs.Construct scope,
String id,
CfnInstanceProfileProps props)
Create a new `AWS::IAM::InstanceProfile`.
|
protected |
CfnInstanceProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnInstanceProfile(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
Returns the Amazon Resource Name (ARN) for the instance profile.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getInstanceProfileName()
The name of the instance profile to create.
|
String |
getPath()
The path to the instance profile.
|
List<String> |
getRoles()
The name of the role to associate with the instance profile.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setInstanceProfileName(String value)
The name of the instance profile to create.
|
void |
setPath(String value)
The path to the instance profile.
|
void |
setRoles(List<String> value)
The name of the role to associate with the instance profile.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnInstanceProfile(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInstanceProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnInstanceProfile(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnInstanceProfileProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
{"Fn::GetAtt" : ["MyProfile", "Arn"] }
This returns a value such as arn:aws:iam::1234567890:instance-profile/MyProfile-ASDNSDLKJ .
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public List<String> getRoles()
Only one role can be assigned to an EC2 instance at a time, and all applications on the instance share the same role and permissions.
@Stability(value=Stable)
public void setRoles(@NotNull
List<String> value)
Only one role can be assigned to an EC2 instance at a time, and all applications on the instance share the same role and permissions.
@Stability(value=Stable) @Nullable public String getInstanceProfileName()
This parameter allows (through its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
@Stability(value=Stable)
public void setInstanceProfileName(@Nullable
String value)
This parameter allows (through its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
@Stability(value=Stable) @Nullable public String getPath()
For more information about paths, see IAM Identifiers in the IAM User Guide .
This parameter is optional. If it is not included, it defaults to a slash (/).
This parameter allows (through its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! ( \ u0021 ) through the DEL character ( \ u007F ), including most punctuation characters, digits, and upper and lowercased letters.
@Stability(value=Stable)
public void setPath(@Nullable
String value)
For more information about paths, see IAM Identifiers in the IAM User Guide .
This parameter is optional. If it is not included, it defaults to a slash (/).
This parameter allows (through its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! ( \ u0021 ) through the DEL character ( \ u007F ), including most punctuation characters, digits, and upper and lowercased letters.
Copyright © 2022. All rights reserved.