Class: AWSCDK::EC2::CfnLaunchTemplate::IAMInstanceProfileProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::IAMInstanceProfileProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
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 .
Instance Attribute Summary collapse
-
#arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the instance profile.
-
#name ⇒ String?
readonly
The name of the instance profile.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(arn: nil, name: nil) ⇒ IAMInstanceProfileProperty
constructor
A new instance of IAMInstanceProfileProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(arn: nil, name: nil) ⇒ IAMInstanceProfileProperty
Returns a new instance of IAMInstanceProfileProperty.
1492 1493 1494 1495 1496 1497 |
# File 'ec2/cfn_launch_template.rb', line 1492 def initialize(arn: nil, name: nil) @arn = arn Jsii::Type.check_type(@arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arn") unless @arn.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? end |
Instance Attribute Details
#arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the instance profile.
1503 1504 1505 |
# File 'ec2/cfn_launch_template.rb', line 1503 def arn @arn end |
#name ⇒ String? (readonly)
The name of the instance profile.
1508 1509 1510 |
# File 'ec2/cfn_launch_template.rb', line 1508 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
1510 1511 1512 1513 1514 1515 |
# File 'ec2/cfn_launch_template.rb', line 1510 def self.jsii_properties { :arn => "arn", :name => "name", } end |
Instance Method Details
#to_jsii ⇒ Object
1517 1518 1519 1520 1521 1522 1523 1524 |
# File 'ec2/cfn_launch_template.rb', line 1517 def to_jsii result = {} result.merge!({ "arn" => @arn, "name" => @name, }) result.compact end |