Class: AWSCDK::IAM::InstanceProfileAttributes

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
iam/instance_profile_attributes.rb

Overview

Attributes of an Instance Profile.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_profile_arn:, role: nil) ⇒ InstanceProfileAttributes

Returns a new instance of InstanceProfileAttributes.

Parameters:

  • instance_profile_arn (String)

    The ARN of the InstanceProfile.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The role associated with the InstanceProfile.



9
10
11
12
13
14
# File 'iam/instance_profile_attributes.rb', line 9

def initialize(instance_profile_arn:, role: nil)
  @instance_profile_arn = instance_profile_arn
  Jsii::Type.check_type(@instance_profile_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceProfileArn")
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
end

Instance Attribute Details

#instance_profile_arnString (readonly)

The ARN of the InstanceProfile.

Format: arn::iam:::instance-profile/

Returns:

  • (String)


21
22
23
# File 'iam/instance_profile_attributes.rb', line 21

def instance_profile_arn
  @instance_profile_arn
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - no role

The role associated with the InstanceProfile.

Returns:



26
27
28
# File 'iam/instance_profile_attributes.rb', line 26

def role
  @role
end

Class Method Details

.jsii_propertiesObject



28
29
30
31
32
33
# File 'iam/instance_profile_attributes.rb', line 28

def self.jsii_properties
  {
    :instance_profile_arn => "instanceProfileArn",
    :role => "role",
  }
end

Instance Method Details

#to_jsiiObject



35
36
37
38
39
40
41
42
# File 'iam/instance_profile_attributes.rb', line 35

def to_jsii
  result = {}
  result.merge!({
    "instanceProfileArn" => @instance_profile_arn,
    "role" => @role,
  })
  result.compact
end