interface InstanceProfileAttributes
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.IAM.InstanceProfileAttributes |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsiam#InstanceProfileAttributes |
![]() | software.amazon.awscdk.services.iam.InstanceProfileAttributes |
![]() | aws_cdk.aws_iam.InstanceProfileAttributes |
![]() | aws-cdk-lib » aws_iam » InstanceProfileAttributes |
Attributes of an Instance Profile.
Example
const role = new iam.Role(this, 'Role', {
assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
});
const instanceProfile = iam.InstanceProfile.fromInstanceProfileAttributes(this, 'ImportedInstanceProfile', {
instanceProfileArn: 'arn:aws:iam::account-id:instance-profile/MyInstanceProfile',
role,
});
Properties
Name | Type | Description |
---|---|---|
instance | string | The ARN of the InstanceProfile. |
role? | IRole | The role associated with the InstanceProfile. |
instanceProfileArn
Type:
string
The ARN of the InstanceProfile.
Format: arn:<partition>:iam::<account-id>:instance-profile/<instance-profile-name-with-path>
role?
Type:
IRole
(optional, default: no role)
The role associated with the InstanceProfile.