@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:36.551Z") 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 . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnInstanceProfile(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getAttrArn()
Returns the Amazon Resource Name (ARN) for the instance profile.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getInstanceProfileName()
The name of the instance profile to create.
|
java.lang.String |
getPath()
The path to the instance profile.
|
java.util.List<java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setInstanceProfileName(java.lang.String value)
The name of the instance profile to create.
|
void |
setPath(java.lang.String value)
The path to the instance profile.
|
void |
setRoles(java.util.List<java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnInstanceProfile(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInstanceProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnInstanceProfile(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
{"Fn::GetAtt" : ["MyProfile", "Arn"] }
This returns a value such as arn:aws:iam::1234567890:instance-profile/MyProfile-ASDNSDLKJ
.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.util.List<java.lang.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.
public void setRoles(java.util.List<java.lang.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.
public java.lang.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: _+=,.@-
public void setInstanceProfileName(java.lang.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: _+=,.@-
public java.lang.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.
public void setPath(java.lang.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.