Class: AWSCDK::IAM::InstanceProfileProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IAM::InstanceProfileProps
- Defined in:
- iam/instance_profile_props.rb
Overview
Properties of an Instance Profile.
Instance Attribute Summary collapse
-
#instance_profile_name ⇒ String?
readonly
The name of the InstanceProfile to create.
-
#path ⇒ String?
readonly
The path to the InstanceProfile.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role to associate with the instance profile that is used by EC2 instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(instance_profile_name: nil, path: nil, role: nil) ⇒ InstanceProfileProps
constructor
A new instance of InstanceProfileProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_profile_name: nil, path: nil, role: nil) ⇒ InstanceProfileProps
Returns a new instance of InstanceProfileProps.
10 11 12 13 14 15 16 17 |
# File 'iam/instance_profile_props.rb', line 10 def initialize(instance_profile_name: nil, path: nil, role: nil) @instance_profile_name = instance_profile_name Jsii::Type.check_type(@instance_profile_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceProfileName") unless @instance_profile_name.nil? @path = path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? end |
Instance Attribute Details
#instance_profile_name ⇒ String? (readonly)
Note:
Default: - generated by CloudFormation
The name of the InstanceProfile to create.
23 24 25 |
# File 'iam/instance_profile_props.rb', line 23 def instance_profile_name @instance_profile_name end |
#path ⇒ String? (readonly)
Note:
Default: /
The path to the InstanceProfile.
28 29 30 |
# File 'iam/instance_profile_props.rb', line 28 def path @path end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Note:
Default: - a role will be automatically created, it can be accessed via the role property
An IAM role to associate with the instance profile that is used by EC2 instances.
The role must be assumable by the service principal ec2.amazonaws.com:
39 40 41 |
# File 'iam/instance_profile_props.rb', line 39 def role @role end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 |
# File 'iam/instance_profile_props.rb', line 41 def self.jsii_properties { :instance_profile_name => "instanceProfileName", :path => "path", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'iam/instance_profile_props.rb', line 49 def to_jsii result = {} result.merge!({ "instanceProfileName" => @instance_profile_name, "path" => @path, "role" => @role, }) result.compact end |