Class: OCI::CloudMigrations::Models::LaunchInstanceDetails
- Inherits:
-
Object
- Object
- OCI::CloudMigrations::Models::LaunchInstanceDetails
- Defined in:
- lib/oci/cloud_migrations/models/launch_instance_details.rb
Overview
Instance launch details. Use the sourceDetails
parameter to specify whether a boot volume or an image should be used to launch a new instance.
Instance Attribute Summary collapse
- #agent_config ⇒ OCI::CloudMigrations::Models::LaunchInstanceAgentConfigDetails
-
#availability_domain ⇒ String
The availability domain of the instance.
-
#capacity_reservation_id ⇒ String
The OCID of the compute capacity reservation under which this instance is launched.
-
#compartment_id ⇒ String
The OCID of the compartment.
- #create_vnic_details ⇒ OCI::CloudMigrations::Models::CreateVnicDetails
-
#dedicated_vm_host_id ⇒ String
The OCID of the dedicated VM host.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#fault_domain ⇒ String
A fault domain is a grouping of hardware and infrastructure within an availability domain.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#hostname_label ⇒ String
Deprecated.
- #instance_options ⇒ OCI::CloudMigrations::Models::InstanceOptions
-
#ipxe_script ⇒ String
This is an advanced option.
-
#is_pv_encryption_in_transit_enabled ⇒ BOOLEAN
Whether to enable in-transit encryption for the data volume's paravirtualized attachment.
- #preemptible_instance_config ⇒ OCI::CloudMigrations::Models::PreemptibleInstanceConfigDetails
-
#shape ⇒ String
The shape of an instance.
- #shape_config ⇒ OCI::CloudMigrations::Models::LaunchInstanceShapeConfigDetails
- #source_details ⇒ OCI::CloudMigrations::Models::InstanceSourceDetails
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ LaunchInstanceDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ LaunchInstanceDetails
Initializes the object
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 219 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain'] raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain') self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain'] self.capacity_reservation_id = attributes[:'capacityReservationId'] if attributes[:'capacityReservationId'] raise 'You cannot provide both :capacityReservationId and :capacity_reservation_id' if attributes.key?(:'capacityReservationId') && attributes.key?(:'capacity_reservation_id') self.capacity_reservation_id = attributes[:'capacity_reservation_id'] if attributes[:'capacity_reservation_id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.create_vnic_details = attributes[:'createVnicDetails'] if attributes[:'createVnicDetails'] raise 'You cannot provide both :createVnicDetails and :create_vnic_details' if attributes.key?(:'createVnicDetails') && attributes.key?(:'create_vnic_details') self.create_vnic_details = attributes[:'create_vnic_details'] if attributes[:'create_vnic_details'] self.dedicated_vm_host_id = attributes[:'dedicatedVmHostId'] if attributes[:'dedicatedVmHostId'] raise 'You cannot provide both :dedicatedVmHostId and :dedicated_vm_host_id' if attributes.key?(:'dedicatedVmHostId') && attributes.key?(:'dedicated_vm_host_id') self.dedicated_vm_host_id = attributes[:'dedicated_vm_host_id'] if attributes[:'dedicated_vm_host_id'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.fault_domain = attributes[:'faultDomain'] if attributes[:'faultDomain'] raise 'You cannot provide both :faultDomain and :fault_domain' if attributes.key?(:'faultDomain') && attributes.key?(:'fault_domain') self.fault_domain = attributes[:'fault_domain'] if attributes[:'fault_domain'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.hostname_label = attributes[:'hostnameLabel'] if attributes[:'hostnameLabel'] raise 'You cannot provide both :hostnameLabel and :hostname_label' if attributes.key?(:'hostnameLabel') && attributes.key?(:'hostname_label') self.hostname_label = attributes[:'hostname_label'] if attributes[:'hostname_label'] self.ipxe_script = attributes[:'ipxeScript'] if attributes[:'ipxeScript'] raise 'You cannot provide both :ipxeScript and :ipxe_script' if attributes.key?(:'ipxeScript') && attributes.key?(:'ipxe_script') self.ipxe_script = attributes[:'ipxe_script'] if attributes[:'ipxe_script'] self. = attributes[:'instanceOptions'] if attributes[:'instanceOptions'] raise 'You cannot provide both :instanceOptions and :instance_options' if attributes.key?(:'instanceOptions') && attributes.key?(:'instance_options') self. = attributes[:'instance_options'] if attributes[:'instance_options'] self.preemptible_instance_config = attributes[:'preemptibleInstanceConfig'] if attributes[:'preemptibleInstanceConfig'] raise 'You cannot provide both :preemptibleInstanceConfig and :preemptible_instance_config' if attributes.key?(:'preemptibleInstanceConfig') && attributes.key?(:'preemptible_instance_config') self.preemptible_instance_config = attributes[:'preemptible_instance_config'] if attributes[:'preemptible_instance_config'] self.agent_config = attributes[:'agentConfig'] if attributes[:'agentConfig'] raise 'You cannot provide both :agentConfig and :agent_config' if attributes.key?(:'agentConfig') && attributes.key?(:'agent_config') self.agent_config = attributes[:'agent_config'] if attributes[:'agent_config'] self.shape = attributes[:'shape'] if attributes[:'shape'] self.shape_config = attributes[:'shapeConfig'] if attributes[:'shapeConfig'] raise 'You cannot provide both :shapeConfig and :shape_config' if attributes.key?(:'shapeConfig') && attributes.key?(:'shape_config') self.shape_config = attributes[:'shape_config'] if attributes[:'shape_config'] self.source_details = attributes[:'sourceDetails'] if attributes[:'sourceDetails'] raise 'You cannot provide both :sourceDetails and :source_details' if attributes.key?(:'sourceDetails') && attributes.key?(:'source_details') self.source_details = attributes[:'source_details'] if attributes[:'source_details'] self.is_pv_encryption_in_transit_enabled = attributes[:'isPvEncryptionInTransitEnabled'] unless attributes[:'isPvEncryptionInTransitEnabled'].nil? raise 'You cannot provide both :isPvEncryptionInTransitEnabled and :is_pv_encryption_in_transit_enabled' if attributes.key?(:'isPvEncryptionInTransitEnabled') && attributes.key?(:'is_pv_encryption_in_transit_enabled') self.is_pv_encryption_in_transit_enabled = attributes[:'is_pv_encryption_in_transit_enabled'] unless attributes[:'is_pv_encryption_in_transit_enabled'].nil? end |
Instance Attribute Details
#agent_config ⇒ OCI::CloudMigrations::Models::LaunchInstanceAgentConfigDetails
123 124 125 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 123 def agent_config @agent_config end |
#availability_domain ⇒ String
The availability domain of the instance.
Example: Uocm:PHX-AD-1
18 19 20 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 18 def availability_domain @availability_domain end |
#capacity_reservation_id ⇒ String
The OCID of the compute capacity reservation under which this instance is launched. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see Capacity Reservations.
25 26 27 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 25 def capacity_reservation_id @capacity_reservation_id end |
#compartment_id ⇒ String
The OCID of the compartment.
29 30 31 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 29 def compartment_id @compartment_id end |
#create_vnic_details ⇒ OCI::CloudMigrations::Models::CreateVnicDetails
32 33 34 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 32 def create_vnic_details @create_vnic_details end |
#dedicated_vm_host_id ⇒ String
The OCID of the dedicated VM host.
37 38 39 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 37 def dedicated_vm_host_id @dedicated_vm_host_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
43 44 45 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 43 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
49 50 51 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 49 def display_name @display_name end |
#fault_domain ⇒ String
A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains lets you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains.
If you do not specify the fault domain, the system selects one for you.
To get a list of fault domains, use the list_fault_domains operation in the Identity and Access Management Service API.
Example: FAULT-DOMAIN-1
67 68 69 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 67 def fault_domain @fault_domain end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example: {\"bar-key\": \"value\"}
73 74 75 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 73 def @freeform_tags end |
#hostname_label ⇒ String
Deprecated. Instead use hostnameLabel
in CreateVnicDetails. If you provide both, the values must match.
80 81 82 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 80 def hostname_label @hostname_label end |
#instance_options ⇒ OCI::CloudMigrations::Models::InstanceOptions
117 118 119 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 117 def @instance_options end |
#ipxe_script ⇒ String
This is an advanced option.
When a bare metal or virtual machine instance boots, the iPXE firmware that runs on the instance is configured to run an iPXE script to continue the boot process.
If you want more control over the boot process, you can provide your own custom iPXE script that will run when the instance boots. Be aware that the same iPXE script will run every time an instance boots, not only after the initial LaunchInstance call.
By default, the iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI in the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot.
If your instance boot volume type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume type is paravirtualized and you use custom iPXE to perform network-boot into your instance, the primary boot volume is attached as a data volume through the virtio-scsi drive.
For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see Bring Your Own Image.
For more information about iPXE, see ipxe.org.
114 115 116 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 114 def ipxe_script @ipxe_script end |
#is_pv_encryption_in_transit_enabled ⇒ BOOLEAN
Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. By default, the value is false.
141 142 143 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 141 def is_pv_encryption_in_transit_enabled @is_pv_encryption_in_transit_enabled end |
#preemptible_instance_config ⇒ OCI::CloudMigrations::Models::PreemptibleInstanceConfigDetails
120 121 122 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 120 def preemptible_instance_config @preemptible_instance_config end |
#shape ⇒ String
The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
You can enumerate all available shapes by calling list_shapes.
131 132 133 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 131 def shape @shape end |
#shape_config ⇒ OCI::CloudMigrations::Models::LaunchInstanceShapeConfigDetails
134 135 136 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 134 def shape_config @shape_config end |
#source_details ⇒ OCI::CloudMigrations::Models::InstanceSourceDetails
137 138 139 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 137 def source_details @source_details end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 144 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'availabilityDomain', 'capacity_reservation_id': :'capacityReservationId', 'compartment_id': :'compartmentId', 'create_vnic_details': :'createVnicDetails', 'dedicated_vm_host_id': :'dedicatedVmHostId', 'defined_tags': :'definedTags', 'display_name': :'displayName', 'fault_domain': :'faultDomain', 'freeform_tags': :'freeformTags', 'hostname_label': :'hostnameLabel', 'ipxe_script': :'ipxeScript', 'instance_options': :'instanceOptions', 'preemptible_instance_config': :'preemptibleInstanceConfig', 'agent_config': :'agentConfig', 'shape': :'shape', 'shape_config': :'shapeConfig', 'source_details': :'sourceDetails', 'is_pv_encryption_in_transit_enabled': :'isPvEncryptionInTransitEnabled' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 170 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'String', 'capacity_reservation_id': :'String', 'compartment_id': :'String', 'create_vnic_details': :'OCI::CloudMigrations::Models::CreateVnicDetails', 'dedicated_vm_host_id': :'String', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'display_name': :'String', 'fault_domain': :'String', 'freeform_tags': :'Hash<String, String>', 'hostname_label': :'String', 'ipxe_script': :'String', 'instance_options': :'OCI::CloudMigrations::Models::InstanceOptions', 'preemptible_instance_config': :'OCI::CloudMigrations::Models::PreemptibleInstanceConfigDetails', 'agent_config': :'OCI::CloudMigrations::Models::LaunchInstanceAgentConfigDetails', 'shape': :'String', 'shape_config': :'OCI::CloudMigrations::Models::LaunchInstanceShapeConfigDetails', 'source_details': :'OCI::CloudMigrations::Models::InstanceSourceDetails', 'is_pv_encryption_in_transit_enabled': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 337 def ==(other) return true if equal?(other) self.class == other.class && availability_domain == other.availability_domain && capacity_reservation_id == other.capacity_reservation_id && compartment_id == other.compartment_id && create_vnic_details == other.create_vnic_details && dedicated_vm_host_id == other.dedicated_vm_host_id && == other. && display_name == other.display_name && fault_domain == other.fault_domain && == other. && hostname_label == other.hostname_label && ipxe_script == other.ipxe_script && == other. && preemptible_instance_config == other.preemptible_instance_config && agent_config == other.agent_config && shape == other.shape && shape_config == other.shape_config && source_details == other.source_details && is_pv_encryption_in_transit_enabled == other.is_pv_encryption_in_transit_enabled end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 384 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
364 365 366 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 364 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
373 374 375 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 373 def hash [availability_domain, capacity_reservation_id, compartment_id, create_vnic_details, dedicated_vm_host_id, , display_name, fault_domain, , hostname_label, ipxe_script, , preemptible_instance_config, agent_config, shape, shape_config, source_details, is_pv_encryption_in_transit_enabled].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
417 418 419 420 421 422 423 424 425 426 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 417 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
411 412 413 |
# File 'lib/oci/cloud_migrations/models/launch_instance_details.rb', line 411 def to_s to_hash.to_s end |