Class: AWSCDK::IAM::CfnVirtualMFADeviceProps

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

Overview

Properties for defining a CfnVirtualMFADevice.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(users:, path: nil, tags: nil, virtual_mfa_device_name: nil) ⇒ CfnVirtualMFADeviceProps

Returns a new instance of CfnVirtualMFADeviceProps.

Parameters:

  • users (Array<String>)

    The IAM user associated with this virtual MFA device.

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

    The path for the virtual MFA device.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    A list of tags that you want to attach to the new IAM virtual MFA device.

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

    The name of the virtual MFA device, which must be unique.



13
14
15
16
17
18
19
20
21
22
# File 'iam/cfn_virtual_mfa_device_props.rb', line 13

def initialize(users:, path: nil, tags: nil, virtual_mfa_device_name: nil)
  @users = users
  Jsii::Type.check_type(@users, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "users")
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @virtual_mfa_device_name = virtual_mfa_device_name
  Jsii::Type.check_type(@virtual_mfa_device_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "virtualMfaDeviceName") unless @virtual_mfa_device_name.nil?
end

Instance Attribute Details

#pathString? (readonly)

The path for the virtual MFA device.

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.



39
40
41
# File 'iam/cfn_virtual_mfa_device_props.rb', line 39

def path
  @path
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of tags that you want to attach to the new IAM virtual MFA device.

Each tag consists of a key name and an associated value. For more information about tagging, see Tagging IAM resources in the IAM User Guide .

If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.



48
49
50
# File 'iam/cfn_virtual_mfa_device_props.rb', line 48

def tags
  @tags
end

#usersArray<String> (readonly)

The IAM user associated with this virtual MFA device.



28
29
30
# File 'iam/cfn_virtual_mfa_device_props.rb', line 28

def users
  @users
end

#virtual_mfa_device_nameString? (readonly)

The name of the virtual MFA device, which must be unique.

Use with path to uniquely identify a virtual MFA device.

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: _+=,.@-



57
58
59
# File 'iam/cfn_virtual_mfa_device_props.rb', line 57

def virtual_mfa_device_name
  @virtual_mfa_device_name
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
# File 'iam/cfn_virtual_mfa_device_props.rb', line 59

def self.jsii_properties
  {
    :users => "users",
    :path => "path",
    :tags => "tags",
    :virtual_mfa_device_name => "virtualMfaDeviceName",
  }
end

Instance Method Details

#to_jsiiObject



68
69
70
71
72
73
74
75
76
77
# File 'iam/cfn_virtual_mfa_device_props.rb', line 68

def to_jsii
  result = {}
  result.merge!({
    "users" => @users,
    "path" => @path,
    "tags" => @tags,
    "virtualMfaDeviceName" => @virtual_mfa_device_name,
  })
  result.compact
end