Class: OCI::Core::Models::InstanceConfigurationLaunchInstanceDetails
- Inherits:
-
Object
- Object
- OCI::Core::Models::InstanceConfigurationLaunchInstanceDetails
- Defined in:
- lib/oci/core/models/instance_configuration_launch_instance_details.rb
Overview
Instance launch details for creating an instance from an instance configuration. Use the sourceDetails parameter to specify whether a boot volume or an image should be used to launch a new instance.
See LaunchInstanceDetails for more information.
Constant Summary collapse
- LAUNCH_MODE_ENUM =
[ LAUNCH_MODE_NATIVE = 'NATIVE'.freeze, LAUNCH_MODE_EMULATED = 'EMULATED'.freeze, LAUNCH_MODE_PARAVIRTUALIZED = 'PARAVIRTUALIZED'.freeze, LAUNCH_MODE_CUSTOM = 'CUSTOM'.freeze, LAUNCH_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PREFERRED_MAINTENANCE_ACTION_ENUM =
[ PREFERRED_MAINTENANCE_ACTION_LIVE_MIGRATE = 'LIVE_MIGRATE'.freeze, PREFERRED_MAINTENANCE_ACTION_REBOOT = 'REBOOT'.freeze, PREFERRED_MAINTENANCE_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #agent_config ⇒ OCI::Core::Models::InstanceConfigurationLaunchInstanceAgentConfigDetails
-
#availability_config ⇒ OCI::Core::Models::InstanceConfigurationAvailabilityConfig
Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware.
-
#availability_domain ⇒ String
The availability domain of the instance.
-
#compartment_id ⇒ String
The OCID of the compartment.
-
#create_vnic_details ⇒ OCI::Core::Models::InstanceConfigurationCreateVnicDetails
Details for the primary VNIC, which is automatically created and attached when the instance is launched.
-
#dedicated_vm_host_id ⇒ String
The OCID of dedicated VM host.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#extended_metadata ⇒ Hash<String, Object>
Additional metadata key/value pairs that you provide.
-
#fault_domain ⇒ String
A fault domain is a grouping of hardware and infrastructure within an availability domain.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
- #instance_options ⇒ OCI::Core::Models::InstanceConfigurationInstanceOptions
-
#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.
-
#launch_mode ⇒ String
Specifies the configuration mode for launching virtual machine (VM) instances.
-
#launch_options ⇒ OCI::Core::Models::InstanceConfigurationLaunchOptions
Options for tuning the compatibility and performance of VM shapes.
-
#metadata ⇒ Hash<String, String>
Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance.
-
#preferred_maintenance_action ⇒ String
The preferred maintenance action for an instance.
-
#shape ⇒ String
The shape of an instance.
- #shape_config ⇒ OCI::Core::Models::InstanceConfigurationLaunchInstanceShapeConfigDetails
-
#source_details ⇒ OCI::Core::Models::InstanceConfigurationInstanceSourceDetails
Details for creating an instance.
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 = {}) ⇒ InstanceConfigurationLaunchInstanceDetails
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 = {}) ⇒ InstanceConfigurationLaunchInstanceDetails
Initializes the object
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 326 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.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. = 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. = attributes[:'extendedMetadata'] if attributes[:'extendedMetadata'] raise 'You cannot provide both :extendedMetadata and :extended_metadata' if attributes.key?(:'extendedMetadata') && attributes.key?(:'extended_metadata') self. = attributes[:'extended_metadata'] if attributes[:'extended_metadata'] 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.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[:'metadata'] if attributes[:'metadata'] 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.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.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.launch_mode = attributes[:'launchMode'] if attributes[:'launchMode'] raise 'You cannot provide both :launchMode and :launch_mode' if attributes.key?(:'launchMode') && attributes.key?(:'launch_mode') self.launch_mode = attributes[:'launch_mode'] if attributes[:'launch_mode'] self. = attributes[:'launchOptions'] if attributes[:'launchOptions'] raise 'You cannot provide both :launchOptions and :launch_options' if attributes.key?(:'launchOptions') && attributes.key?(:'launch_options') self. = attributes[:'launch_options'] if attributes[:'launch_options'] 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.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? self.preferred_maintenance_action = attributes[:'preferredMaintenanceAction'] if attributes[:'preferredMaintenanceAction'] raise 'You cannot provide both :preferredMaintenanceAction and :preferred_maintenance_action' if attributes.key?(:'preferredMaintenanceAction') && attributes.key?(:'preferred_maintenance_action') self.preferred_maintenance_action = attributes[:'preferred_maintenance_action'] if attributes[:'preferred_maintenance_action'] 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.availability_config = attributes[:'availabilityConfig'] if attributes[:'availabilityConfig'] raise 'You cannot provide both :availabilityConfig and :availability_config' if attributes.key?(:'availabilityConfig') && attributes.key?(:'availability_config') self.availability_config = attributes[:'availability_config'] if attributes[:'availability_config'] end |
Instance Attribute Details
#agent_config ⇒ OCI::Core::Models::InstanceConfigurationLaunchInstanceAgentConfigDetails
220 221 222 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 220 def agent_config @agent_config end |
#availability_config ⇒ OCI::Core::Models::InstanceConfigurationAvailabilityConfig
Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware.
239 240 241 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 239 def availability_config @availability_config end |
#availability_domain ⇒ String
The availability domain of the instance.
Example: Uocm:PHX-AD-1
34 35 36 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 34 def availability_domain @availability_domain end |
#compartment_id ⇒ String
The OCID of the compartment.
38 39 40 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 38 def compartment_id @compartment_id end |
#create_vnic_details ⇒ OCI::Core::Models::InstanceConfigurationCreateVnicDetails
Details for the primary VNIC, which is automatically created and attached when the instance is launched.
44 45 46 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 44 def create_vnic_details @create_vnic_details end |
#dedicated_vm_host_id ⇒ String
The OCID of dedicated VM host.
Dedicated VM hosts can be used when launching individual instances from an instance configuration. They cannot be used to launch instance pools.
203 204 205 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 203 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. For more information, see [Resource Tags](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
Example: ‘{"CostCenter": "42"}`
52 53 54 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 52 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.
Example: ‘My bare metal instance`
60 61 62 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 60 def display_name @display_name end |
#extended_metadata ⇒ Hash<String, Object>
Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the metadata object.
They are distinguished from metadata fields in that these can be nested JSON objects (whereas metadata fields are string/string maps only).
The combined size of the metadata and extendedMetadata objects can be a maximum of 32,000 bytes.
72 73 74 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 72 def @extended_metadata 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 let 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
195 196 197 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 195 def fault_domain @fault_domain end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
Example: ‘"Finance"`
80 81 82 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 80 def @freeform_tags end |
#instance_options ⇒ OCI::Core::Models::InstanceConfigurationInstanceOptions
234 235 236 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 234 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; however, you should be aware that the same iPXE script will run every time an instance boots; not only after the initial LaunchInstance call.
The default 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 the same way as the default iPXE script, you should use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot.
For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image](docs.cloud.oracle.com/Content/Compute/References/bringyourownimage.htm).
For more information about iPXE, see ipxe.org.
108 109 110 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 108 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. The default value is false.
224 225 226 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 224 def is_pv_encryption_in_transit_enabled @is_pv_encryption_in_transit_enabled end |
#launch_mode ⇒ String
Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
-
NATIVE- VM instances launch with iSCSI boot and VFIO devices. The default value for Oracle-provided images. -
EMULATED- VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. -
PARAVIRTUALIZED- VM instances launch with paravirtualized devices using VirtIO drivers. -
CUSTOM- VM instances launch with custom configuration settings specified in theLaunchOptionsparameter.
212 213 214 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 212 def launch_mode @launch_mode end |
#launch_options ⇒ OCI::Core::Models::InstanceConfigurationLaunchOptions
Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
217 218 219 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 217 def @launch_options end |
#metadata ⇒ Hash<String, String>
Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance.
A metadata service runs on every launched instance. The service is an HTTP endpoint listening on 169.254.169.254. You can use the service to:
-
Provide information to [Cloud-Init](cloudinit.readthedocs.org/en/latest/) to be used for various system initialization tasks.
-
Get information about the instance, including the custom metadata that you provide when you launch the instance.
**Providing Cloud-Init Metadata**
You can use the following metadata key names to provide information to
Cloud-Init:
**\"ssh_authorized_keys\"** - Provide one or more public SSH keys to be
included in the `~/.ssh/authorized_keys` file for the default user on the
instance. Use a newline character to separate multiple keys. The SSH
keys must be in the format necessary for the `authorized_keys` file, as shown
in the example below.
**\"user_data\"** - Provide your own base64-encoded data to be used by
Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For
information about how to take advantage of user data, see the
[Cloud-Init Documentation](http://cloudinit.readthedocs.org/en/latest/topics/format.html).
**Metadata Example**
\"metadata\" : {
\"quake_bot_level\" : \"Severe\",
\"ssh_authorized_keys\" : \"ssh-rsa <your_public_SSH_key>== rsa-key-20160227\",
\"user_data\" : \"<your_public_SSH_key>==\"
}
**Getting Metadata on the Instance**
To get information about your instance, connect to the instance using SSH and issue any of the
following GET requests:
curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/
curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/
curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/<any-key-name>
You'll get back a response that includes all the instance information; only the metadata information; or
the metadata information for the specified key name, respectively.
The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes.
160 161 162 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 160 def @metadata end |
#preferred_maintenance_action ⇒ String
The preferred maintenance action for an instance. The default is LIVE_MIGRATE, if live migration is supported.
-
LIVE_MIGRATE- Run maintenance using a live migration. -
REBOOT- Run maintenance using a reboot.
231 232 233 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 231 def preferred_maintenance_action @preferred_maintenance_action 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.
168 169 170 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 168 def shape @shape end |
#shape_config ⇒ OCI::Core::Models::InstanceConfigurationLaunchInstanceShapeConfigDetails
171 172 173 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 171 def shape_config @shape_config end |
#source_details ⇒ OCI::Core::Models::InstanceConfigurationInstanceSourceDetails
Details for creating an instance. Use this parameter to specify whether a boot volume or an image should be used to launch a new instance.
177 178 179 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 177 def source_details @source_details end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 242 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'availabilityDomain', 'compartment_id': :'compartmentId', 'create_vnic_details': :'createVnicDetails', 'defined_tags': :'definedTags', 'display_name': :'displayName', 'extended_metadata': :'extendedMetadata', 'freeform_tags': :'freeformTags', 'ipxe_script': :'ipxeScript', 'metadata': :'metadata', 'shape': :'shape', 'shape_config': :'shapeConfig', 'source_details': :'sourceDetails', 'fault_domain': :'faultDomain', 'dedicated_vm_host_id': :'dedicatedVmHostId', 'launch_mode': :'launchMode', 'launch_options': :'launchOptions', 'agent_config': :'agentConfig', 'is_pv_encryption_in_transit_enabled': :'isPvEncryptionInTransitEnabled', 'preferred_maintenance_action': :'preferredMaintenanceAction', 'instance_options': :'instanceOptions', 'availability_config': :'availabilityConfig' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 271 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'String', 'compartment_id': :'String', 'create_vnic_details': :'OCI::Core::Models::InstanceConfigurationCreateVnicDetails', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'display_name': :'String', 'extended_metadata': :'Hash<String, Object>', 'freeform_tags': :'Hash<String, String>', 'ipxe_script': :'String', 'metadata': :'Hash<String, String>', 'shape': :'String', 'shape_config': :'OCI::Core::Models::InstanceConfigurationLaunchInstanceShapeConfigDetails', 'source_details': :'OCI::Core::Models::InstanceConfigurationInstanceSourceDetails', 'fault_domain': :'String', 'dedicated_vm_host_id': :'String', 'launch_mode': :'String', 'launch_options': :'OCI::Core::Models::InstanceConfigurationLaunchOptions', 'agent_config': :'OCI::Core::Models::InstanceConfigurationLaunchInstanceAgentConfigDetails', 'is_pv_encryption_in_transit_enabled': :'BOOLEAN', 'preferred_maintenance_action': :'String', 'instance_options': :'OCI::Core::Models::InstanceConfigurationInstanceOptions', 'availability_config': :'OCI::Core::Models::InstanceConfigurationAvailabilityConfig' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 484 def ==(other) return true if equal?(other) self.class == other.class && availability_domain == other.availability_domain && compartment_id == other.compartment_id && create_vnic_details == other.create_vnic_details && == other. && display_name == other.display_name && == other. && == other. && ipxe_script == other.ipxe_script && == other. && shape == other.shape && shape_config == other.shape_config && source_details == other.source_details && fault_domain == other.fault_domain && dedicated_vm_host_id == other.dedicated_vm_host_id && launch_mode == other.launch_mode && == other. && agent_config == other.agent_config && is_pv_encryption_in_transit_enabled == other.is_pv_encryption_in_transit_enabled && preferred_maintenance_action == other.preferred_maintenance_action && == other. && availability_config == other.availability_config end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 534 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
514 515 516 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 514 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
523 524 525 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 523 def hash [availability_domain, compartment_id, create_vnic_details, , display_name, , , ipxe_script, , shape, shape_config, source_details, fault_domain, dedicated_vm_host_id, launch_mode, , agent_config, is_pv_encryption_in_transit_enabled, preferred_maintenance_action, , availability_config].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
567 568 569 570 571 572 573 574 575 576 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 567 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
561 562 563 |
# File 'lib/oci/core/models/instance_configuration_launch_instance_details.rb', line 561 def to_s to_hash.to_s end |