interface IamInstanceProfileProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.CfnLaunchTemplate.IamInstanceProfileProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnLaunchTemplate_IamInstanceProfileProperty |
Java | software.amazon.awscdk.services.ec2.CfnLaunchTemplate.IamInstanceProfileProperty |
Python | aws_cdk.aws_ec2.CfnLaunchTemplate.IamInstanceProfileProperty |
TypeScript | aws-cdk-lib » aws_ec2 » CfnLaunchTemplate » IamInstanceProfileProperty |
Specifies an IAM instance profile, which is a container for an IAM role for your instance.
You can use an IAM role to distribute your AWS credentials to your instances.
If you are creating the launch template for use with an Amazon EC2 Auto Scaling group, you can specify either the name or the ARN of the instance profile, but not both.
IamInstanceProfile
is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const iamInstanceProfileProperty: ec2.CfnLaunchTemplate.IamInstanceProfileProperty = {
arn: 'arn',
name: 'name',
};
Properties
Name | Type | Description |
---|---|---|
arn? | string | The Amazon Resource Name (ARN) of the instance profile. |
name? | string | The name of the instance profile. |
arn?
Type:
string
(optional)
The Amazon Resource Name (ARN) of the instance profile.
name?
Type:
string
(optional)
The name of the instance profile.