Class: AWSCDK::IAM::CfnInstanceProfileProps

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

Overview

Properties for defining a CfnInstanceProfile.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(roles:, instance_profile_name: nil, path: nil) ⇒ CfnInstanceProfileProps

Returns a new instance of CfnInstanceProfileProps.

Parameters:

  • roles (Array<String, AWSCDK::Interfaces::AWSIAM::IRoleRef>)

    The name of the role to associate with the instance profile.

  • instance_profile_name (String, nil) (defaults to: nil)

    The name of the instance profile to create.

  • path (String, nil) (defaults to: nil)

    The path to the instance profile.



12
13
14
15
16
17
18
19
# File 'iam/cfn_instance_profile_props.rb', line 12

def initialize(roles:, instance_profile_name: nil, path: nil)
  @roles = roles
  Jsii::Type.check_type(@roles, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2lhbS5JUm9sZVJlZiJ9XX19LCJraW5kIjoiYXJyYXkifX0=")), "roles")
  @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?
end

Instance Attribute Details

#instance_profile_nameString? (readonly)

The name of the instance profile to create.

This parameter allows (through its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-



34
35
36
# File 'iam/cfn_instance_profile_props.rb', line 34

def instance_profile_name
  @instance_profile_name
end

#pathString? (readonly)

The path to the instance profile.

For more information about paths, see IAM Identifiers in the IAM User Guide .

This parameter is optional. If it is not included, it defaults to a slash (/).

This parameter allows (through its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), including most punctuation characters, digits, and upper and lowercased letters.



45
46
47
# File 'iam/cfn_instance_profile_props.rb', line 45

def path
  @path
end

#rolesArray<String, AWSCDK::Interfaces::AWSIAM::IRoleRef> (readonly)

The name of the role to associate with the instance profile.

Only one role can be assigned to an EC2 instance at a time, and all applications on the instance share the same role and permissions.



27
28
29
# File 'iam/cfn_instance_profile_props.rb', line 27

def roles
  @roles
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
# File 'iam/cfn_instance_profile_props.rb', line 47

def self.jsii_properties
  {
    :roles => "roles",
    :instance_profile_name => "instanceProfileName",
    :path => "path",
  }
end

Instance Method Details

#to_jsiiObject



55
56
57
58
59
60
61
62
63
# File 'iam/cfn_instance_profile_props.rb', line 55

def to_jsii
  result = {}
  result.merge!({
    "roles" => @roles,
    "instanceProfileName" => @instance_profile_name,
    "path" => @path,
  })
  result.compact
end