Class: AWSCDK::EC2::CfnHostProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_host_props.rb

Overview

Properties for defining a CfnHost.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(availability_zone:, asset_id: nil, auto_placement: nil, host_maintenance: nil, host_recovery: nil, instance_family: nil, instance_type: nil, outpost_arn: nil, tags: nil) ⇒ CfnHostProps

Returns a new instance of CfnHostProps.

Parameters:

  • availability_zone (String)

    The Availability Zone in which to allocate the Dedicated Host.

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

    The ID of the Outpost hardware asset on which the Dedicated Host is allocated.

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

    Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID.

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

    Indicates whether host maintenance is enabled or disabled for the Dedicated Host.

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

    Indicates whether to enable or disable host recovery for the Dedicated Host.

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

    The instance family supported by the Dedicated Host.

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

    Specifies the instance type to be supported by the Dedicated Hosts.

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

    The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.

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

    Any tags assigned to the Dedicated Host.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'ec2/cfn_host_props.rb', line 18

def initialize(availability_zone:, asset_id: nil, auto_placement: nil, host_maintenance: nil, host_recovery: nil, instance_family: nil, instance_type: nil, outpost_arn: nil, tags: nil)
  @availability_zone = availability_zone
  Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone")
  @asset_id = asset_id
  Jsii::Type.check_type(@asset_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetId") unless @asset_id.nil?
  @auto_placement = auto_placement
  Jsii::Type.check_type(@auto_placement, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "autoPlacement") unless @auto_placement.nil?
  @host_maintenance = host_maintenance
  Jsii::Type.check_type(@host_maintenance, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostMaintenance") unless @host_maintenance.nil?
  @host_recovery = host_recovery
  Jsii::Type.check_type(@host_recovery, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostRecovery") unless @host_recovery.nil?
  @instance_family = instance_family
  Jsii::Type.check_type(@instance_family, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceFamily") unless @instance_family.nil?
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") unless @instance_type.nil?
  @outpost_arn = outpost_arn
  Jsii::Type.check_type(@outpost_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outpostArn") unless @outpost_arn.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?
end

Instance Attribute Details

#asset_idString? (readonly)

The ID of the Outpost hardware asset on which the Dedicated Host is allocated.



48
49
50
# File 'ec2/cfn_host_props.rb', line 48

def asset_id
  @asset_id
end

#auto_placementString? (readonly)

Note:

Default: - "on"

Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID.

For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide .

Default: off



58
59
60
# File 'ec2/cfn_host_props.rb', line 58

def auto_placement
  @auto_placement
end

#availability_zoneString (readonly)

The Availability Zone in which to allocate the Dedicated Host.



43
44
45
# File 'ec2/cfn_host_props.rb', line 43

def availability_zone
  @availability_zone
end

#host_maintenanceString? (readonly)

Note:

Default: - "off"

Indicates whether host maintenance is enabled or disabled for the Dedicated Host.



64
65
66
# File 'ec2/cfn_host_props.rb', line 64

def host_maintenance
  @host_maintenance
end

#host_recoveryString? (readonly)

Note:

Default: - "off"

Indicates whether to enable or disable host recovery for the Dedicated Host.

Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide .

Default: off



74
75
76
# File 'ec2/cfn_host_props.rb', line 74

def host_recovery
  @host_recovery
end

#instance_familyString? (readonly)

The instance family supported by the Dedicated Host.

For example, m5 .



81
82
83
# File 'ec2/cfn_host_props.rb', line 81

def instance_family
  @instance_family
end

#instance_typeString? (readonly)

Specifies the instance type to be supported by the Dedicated Hosts.

If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.



88
89
90
# File 'ec2/cfn_host_props.rb', line 88

def instance_type
  @instance_type
end

#outpost_arnString? (readonly)

The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.



93
94
95
# File 'ec2/cfn_host_props.rb', line 93

def outpost_arn
  @outpost_arn
end

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

Any tags assigned to the Dedicated Host.



98
99
100
# File 'ec2/cfn_host_props.rb', line 98

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'ec2/cfn_host_props.rb', line 100

def self.jsii_properties
  {
    :availability_zone => "availabilityZone",
    :asset_id => "assetId",
    :auto_placement => "autoPlacement",
    :host_maintenance => "hostMaintenance",
    :host_recovery => "hostRecovery",
    :instance_family => "instanceFamily",
    :instance_type => "instanceType",
    :outpost_arn => "outpostArn",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'ec2/cfn_host_props.rb', line 114

def to_jsii
  result = {}
  result.merge!({
    "availabilityZone" => @availability_zone,
    "assetId" => @asset_id,
    "autoPlacement" => @auto_placement,
    "hostMaintenance" => @host_maintenance,
    "hostRecovery" => @host_recovery,
    "instanceFamily" => @instance_family,
    "instanceType" => @instance_type,
    "outpostArn" => @outpost_arn,
    "tags" => @tags,
  })
  result.compact
end