Class: OCI::Datacc::Models::CreateVmInstanceDetails
- Inherits:
-
Object
- Object
- OCI::Datacc::Models::CreateVmInstanceDetails
- Defined in:
- lib/oci/datacc/models/create_vm_instance_details.rb
Overview
Create VM instance details.
Instance Attribute Summary collapse
-
#boot_storage_size_in_gbs ⇒ Float
Boot storage memory to be allocated in GBs.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the VM instance.
-
#cpus_enabled ⇒ Integer
[Required] The number of CPU cores enabled for each VM instance.
-
#data_storage_size_in_gbs ⇒ Float
Data storage to be allocated in GBs.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
VM instance description.
-
#display_name ⇒ String
VM instance display name.
-
#dns_servers ⇒ Array<String>
The list of DNS server IP addresses.
-
#domain_name ⇒ String
The domain name of the VM instance.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#gateway ⇒ String
The gateway IP address of the VM instance network.
-
#hostname ⇒ String
The host name of the instance.
-
#image_id ⇒ String
The OCID of the VM custom instance uploaded.
-
#infrastructure_id ⇒ String
[Required] The OCID of the Database Infrastructure.
-
#ip_address ⇒ String
The IP address of the instance.
-
#memory_size_in_gbs ⇒ Float
The memory to be allocated in GBs.
-
#metadata ⇒ Hash<String, String>
Custom metadata key/value pairs which can be used to: - Provide information to Cloud-Init to be used for various system initialization tasks.
-
#netmask ⇒ String
The netmask of the VM instance network.
-
#ntp_servers ⇒ Array<String>
The list of NTP server IP addresses.
-
#server_id ⇒ String
The OCID of the compute node on which VM instance should be launched.
-
#ssh_public_keys ⇒ Array<String>
[Required] List of public key used for SSH access to the VM instance.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
-
#time_zone ⇒ String
The time zone to use for the VM instance.
-
#userdata ⇒ String
Base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration.
-
#vlan_id ⇒ String
The network VLAN ID.
-
#vm_network_id ⇒ String
The OCID of the VM Network.
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 = {}) ⇒ CreateVmInstanceDetails
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 = {}) ⇒ CreateVmInstanceDetails
Initializes the object
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 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 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 229 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.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.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.description = attributes[:'description'] if attributes[:'description'] self.infrastructure_id = attributes[:'infrastructureId'] if attributes[:'infrastructureId'] raise 'You cannot provide both :infrastructureId and :infrastructure_id' if attributes.key?(:'infrastructureId') && attributes.key?(:'infrastructure_id') self.infrastructure_id = attributes[:'infrastructure_id'] if attributes[:'infrastructure_id'] self.cpus_enabled = attributes[:'cpusEnabled'] if attributes[:'cpusEnabled'] raise 'You cannot provide both :cpusEnabled and :cpus_enabled' if attributes.key?(:'cpusEnabled') && attributes.key?(:'cpus_enabled') self.cpus_enabled = attributes[:'cpus_enabled'] if attributes[:'cpus_enabled'] self.memory_size_in_gbs = attributes[:'memorySizeInGBs'] if attributes[:'memorySizeInGBs'] raise 'You cannot provide both :memorySizeInGBs and :memory_size_in_gbs' if attributes.key?(:'memorySizeInGBs') && attributes.key?(:'memory_size_in_gbs') self.memory_size_in_gbs = attributes[:'memory_size_in_gbs'] if attributes[:'memory_size_in_gbs'] self.boot_storage_size_in_gbs = attributes[:'bootStorageSizeInGBs'] if attributes[:'bootStorageSizeInGBs'] raise 'You cannot provide both :bootStorageSizeInGBs and :boot_storage_size_in_gbs' if attributes.key?(:'bootStorageSizeInGBs') && attributes.key?(:'boot_storage_size_in_gbs') self.boot_storage_size_in_gbs = attributes[:'boot_storage_size_in_gbs'] if attributes[:'boot_storage_size_in_gbs'] self.data_storage_size_in_gbs = attributes[:'dataStorageSizeInGBs'] if attributes[:'dataStorageSizeInGBs'] raise 'You cannot provide both :dataStorageSizeInGBs and :data_storage_size_in_gbs' if attributes.key?(:'dataStorageSizeInGBs') && attributes.key?(:'data_storage_size_in_gbs') self.data_storage_size_in_gbs = attributes[:'data_storage_size_in_gbs'] if attributes[:'data_storage_size_in_gbs'] self.image_id = attributes[:'imageId'] if attributes[:'imageId'] raise 'You cannot provide both :imageId and :image_id' if attributes.key?(:'imageId') && attributes.key?(:'image_id') self.image_id = attributes[:'image_id'] if attributes[:'image_id'] self.server_id = attributes[:'serverId'] if attributes[:'serverId'] raise 'You cannot provide both :serverId and :server_id' if attributes.key?(:'serverId') && attributes.key?(:'server_id') self.server_id = attributes[:'server_id'] if attributes[:'server_id'] self.ssh_public_keys = attributes[:'sshPublicKeys'] if attributes[:'sshPublicKeys'] raise 'You cannot provide both :sshPublicKeys and :ssh_public_keys' if attributes.key?(:'sshPublicKeys') && attributes.key?(:'ssh_public_keys') self.ssh_public_keys = attributes[:'ssh_public_keys'] if attributes[:'ssh_public_keys'] self.domain_name = attributes[:'domainName'] if attributes[:'domainName'] raise 'You cannot provide both :domainName and :domain_name' if attributes.key?(:'domainName') && attributes.key?(:'domain_name') self.domain_name = attributes[:'domain_name'] if attributes[:'domain_name'] self.time_zone = attributes[:'timeZone'] if attributes[:'timeZone'] raise 'You cannot provide both :timeZone and :time_zone' if attributes.key?(:'timeZone') && attributes.key?(:'time_zone') self.time_zone = attributes[:'time_zone'] if attributes[:'time_zone'] self.dns_servers = attributes[:'dnsServers'] if attributes[:'dnsServers'] raise 'You cannot provide both :dnsServers and :dns_servers' if attributes.key?(:'dnsServers') && attributes.key?(:'dns_servers') self.dns_servers = attributes[:'dns_servers'] if attributes[:'dns_servers'] self.ntp_servers = attributes[:'ntpServers'] if attributes[:'ntpServers'] raise 'You cannot provide both :ntpServers and :ntp_servers' if attributes.key?(:'ntpServers') && attributes.key?(:'ntp_servers') self.ntp_servers = attributes[:'ntp_servers'] if attributes[:'ntp_servers'] self.hostname = attributes[:'hostname'] if attributes[:'hostname'] self.ip_address = attributes[:'ipAddress'] if attributes[:'ipAddress'] raise 'You cannot provide both :ipAddress and :ip_address' if attributes.key?(:'ipAddress') && attributes.key?(:'ip_address') self.ip_address = attributes[:'ip_address'] if attributes[:'ip_address'] self.netmask = attributes[:'netmask'] if attributes[:'netmask'] self.gateway = attributes[:'gateway'] if attributes[:'gateway'] self.vlan_id = attributes[:'vlanId'] if attributes[:'vlanId'] raise 'You cannot provide both :vlanId and :vlan_id' if attributes.key?(:'vlanId') && attributes.key?(:'vlan_id') self.vlan_id = attributes[:'vlan_id'] if attributes[:'vlan_id'] self.userdata = attributes[:'userdata'] if attributes[:'userdata'] self. = attributes[:'metadata'] if attributes[:'metadata'] self.vm_network_id = attributes[:'vmNetworkId'] if attributes[:'vmNetworkId'] raise 'You cannot provide both :vmNetworkId and :vm_network_id' if attributes.key?(:'vmNetworkId') && attributes.key?(:'vm_network_id') self.vm_network_id = attributes[:'vm_network_id'] if attributes[:'vm_network_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. = 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. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#boot_storage_size_in_gbs ⇒ Float
Boot storage memory to be allocated in GBs.
40 41 42 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 40 def boot_storage_size_in_gbs @boot_storage_size_in_gbs end |
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the VM instance.
15 16 17 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 15 def compartment_id @compartment_id end |
#cpus_enabled ⇒ Integer
[Required] The number of CPU cores enabled for each VM instance.
32 33 34 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 32 def cpus_enabled @cpus_enabled end |
#data_storage_size_in_gbs ⇒ Float
Data storage to be allocated in GBs.
44 45 46 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 44 def data_storage_size_in_gbs @data_storage_size_in_gbs 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\"}}
115 116 117 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 115 def @defined_tags end |
#description ⇒ String
VM instance description.
24 25 26 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 24 def description @description end |
#display_name ⇒ String
VM instance display name. This name does not have to be unique, and is changeable.
20 21 22 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 20 def display_name @display_name end |
#dns_servers ⇒ Array<String>
The list of DNS server IP addresses. Maximum of 3 allowed.
68 69 70 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 68 def dns_servers @dns_servers end |
#domain_name ⇒ String
The domain name of the VM instance.
60 61 62 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 60 def domain_name @domain_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
121 122 123 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 121 def @freeform_tags end |
#gateway ⇒ String
The gateway IP address of the VM instance network
88 89 90 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 88 def gateway @gateway end |
#hostname ⇒ String
The host name of the instance.
76 77 78 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 76 def hostname @hostname end |
#image_id ⇒ String
The OCID of the VM custom instance uploaded.
48 49 50 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 48 def image_id @image_id end |
#infrastructure_id ⇒ String
[Required] The OCID of the Database Infrastructure.
28 29 30 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 28 def infrastructure_id @infrastructure_id end |
#ip_address ⇒ String
The IP address of the instance.
80 81 82 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 80 def ip_address @ip_address end |
#memory_size_in_gbs ⇒ Float
The memory to be allocated in GBs.
36 37 38 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 36 def memory_size_in_gbs @memory_size_in_gbs end |
#metadata ⇒ Hash<String, String>
Custom metadata key/value pairs which can be used to: - Provide information to Cloud-Init to be used for various system initialization tasks. - Provide additional information which is exposed inside the instance context and can be queried or referenced by user-data scripts for dynamic configuration.
105 106 107 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 105 def @metadata end |
#netmask ⇒ String
The netmask of the VM instance network.
84 85 86 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 84 def netmask @netmask end |
#ntp_servers ⇒ Array<String>
The list of NTP server IP addresses. Maximum of 3 allowed.
72 73 74 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 72 def ntp_servers @ntp_servers end |
#server_id ⇒ String
The OCID of the compute node on which VM instance should be launched.
52 53 54 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 52 def server_id @server_id end |
#ssh_public_keys ⇒ Array<String>
[Required] List of public key used for SSH access to the VM instance.
56 57 58 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 56 def ssh_public_keys @ssh_public_keys end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: { \"orcl-cloud\": { \"free-tier-retained\": \"true\" } }
127 128 129 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 127 def @system_tags end |
#time_zone ⇒ String
The time zone to use for the VM instance.
64 65 66 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 64 def time_zone @time_zone end |
#userdata ⇒ String
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.
98 99 100 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 98 def userdata @userdata end |
#vlan_id ⇒ String
The network VLAN ID.
92 93 94 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 92 def vlan_id @vlan_id end |
#vm_network_id ⇒ String
The OCID of the VM Network.
109 110 111 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 109 def vm_network_id @vm_network_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 130 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'compartmentId', 'display_name': :'displayName', 'description': :'description', 'infrastructure_id': :'infrastructureId', 'cpus_enabled': :'cpusEnabled', 'memory_size_in_gbs': :'memorySizeInGBs', 'boot_storage_size_in_gbs': :'bootStorageSizeInGBs', 'data_storage_size_in_gbs': :'dataStorageSizeInGBs', 'image_id': :'imageId', 'server_id': :'serverId', 'ssh_public_keys': :'sshPublicKeys', 'domain_name': :'domainName', 'time_zone': :'timeZone', 'dns_servers': :'dnsServers', 'ntp_servers': :'ntpServers', 'hostname': :'hostname', 'ip_address': :'ipAddress', 'netmask': :'netmask', 'gateway': :'gateway', 'vlan_id': :'vlanId', 'userdata': :'userdata', 'metadata': :'metadata', 'vm_network_id': :'vmNetworkId', 'defined_tags': :'definedTags', 'freeform_tags': :'freeformTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 164 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'String', 'display_name': :'String', 'description': :'String', 'infrastructure_id': :'String', 'cpus_enabled': :'Integer', 'memory_size_in_gbs': :'Float', 'boot_storage_size_in_gbs': :'Float', 'data_storage_size_in_gbs': :'Float', 'image_id': :'String', 'server_id': :'String', 'ssh_public_keys': :'Array<String>', 'domain_name': :'String', 'time_zone': :'String', 'dns_servers': :'Array<String>', 'ntp_servers': :'Array<String>', 'hostname': :'String', 'ip_address': :'String', 'netmask': :'String', 'gateway': :'String', 'vlan_id': :'String', 'userdata': :'String', 'metadata': :'Hash<String, String>', 'vm_network_id': :'String', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'freeform_tags': :'Hash<String, String>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 375 def ==(other) return true if equal?(other) self.class == other.class && compartment_id == other.compartment_id && display_name == other.display_name && description == other.description && infrastructure_id == other.infrastructure_id && cpus_enabled == other.cpus_enabled && memory_size_in_gbs == other.memory_size_in_gbs && boot_storage_size_in_gbs == other.boot_storage_size_in_gbs && data_storage_size_in_gbs == other.data_storage_size_in_gbs && image_id == other.image_id && server_id == other.server_id && ssh_public_keys == other.ssh_public_keys && domain_name == other.domain_name && time_zone == other.time_zone && dns_servers == other.dns_servers && ntp_servers == other.ntp_servers && hostname == other.hostname && ip_address == other.ip_address && netmask == other.netmask && gateway == other.gateway && vlan_id == other.vlan_id && userdata == other.userdata && == other. && vm_network_id == other.vm_network_id && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 430 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
410 411 412 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 410 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
419 420 421 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 419 def hash [compartment_id, display_name, description, infrastructure_id, cpus_enabled, memory_size_in_gbs, boot_storage_size_in_gbs, data_storage_size_in_gbs, image_id, server_id, ssh_public_keys, domain_name, time_zone, dns_servers, ntp_servers, hostname, ip_address, netmask, gateway, vlan_id, userdata, , vm_network_id, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
463 464 465 466 467 468 469 470 471 472 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 463 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
457 458 459 |
# File 'lib/oci/datacc/models/create_vm_instance_details.rb', line 457 def to_s to_hash.to_s end |