Class: OCI::CloudBridge::Models::AwsEc2Properties
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::AwsEc2Properties
- Defined in:
- lib/oci/cloud_bridge/models/aws_ec2_properties.rb
Overview
AWS virtual machine related properties.
Instance Attribute Summary collapse
-
#architecture ⇒ String
[Required] The architecture of the image.
-
#are_elastic_inference_accelerators_present ⇒ BOOLEAN
Indicates if the elastic inference accelerators attached to an instance.
-
#boot_mode ⇒ String
The boot mode of the instance.
-
#capacity_reservation_key ⇒ String
The ID of the Capacity Reservation.
-
#image_key ⇒ String
The ID of the AMI used to launch the instance.
-
#instance_key ⇒ String
[Required] The ID of the instance.
-
#instance_lifecycle ⇒ String
Indicates whether this is a Spot Instance or a Scheduled Instance.
-
#instance_type ⇒ String
[Required] The instance type.
-
#ip_address ⇒ String
The public IPv4 address, or the Carrier IP address assigned to the instance.
-
#ipv6_address ⇒ String
The IPv6 address assigned to the instance.
-
#is_enclave_options ⇒ BOOLEAN
Indicates whether the instance is enabled for AWS Nitro Enclaves.
-
#is_hibernation_options ⇒ BOOLEAN
Indicates whether the instance is enabled for hibernation.
-
#is_source_dest_check ⇒ BOOLEAN
Indicates whether source/destination checking is enabled.
-
#is_spot_instance ⇒ BOOLEAN
If the request is a Spot Instance request, this value will be true.
-
#kernel_key ⇒ String
The kernel associated with this instance, if applicable.
-
#licenses ⇒ Array<String>
The license configurations for the instance.
-
#maintenance_options ⇒ String
Provides information on the recovery and maintenance options of your instance.
-
#monitoring ⇒ String
The monitoring for the instance.
-
#network_interfaces ⇒ Array<OCI::CloudBridge::Models::InstanceNetworkInterface>
The network interfaces for the instance.
- #placement ⇒ OCI::CloudBridge::Models::Placement
-
#private_dns_name ⇒ String
(IPv4 only) The private DNS hostname name assigned to the instance.
-
#private_ip_address ⇒ String
The private IPv4 address assigned to the instance.
-
#root_device_name ⇒ String
[Required] The device name of the root device volume.
-
#root_device_type ⇒ String
The root device type used by the AMI.
-
#security_groups ⇒ Array<OCI::CloudBridge::Models::GroupIdentifier>
The security groups for the instance.
-
#sriov_net_support ⇒ String
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
-
#state ⇒ OCI::CloudBridge::Models::InstanceState
This attribute is required.
-
#subnet_key ⇒ String
EC2-VPC The ID of the subnet in which the instance is running.
-
#tags ⇒ Array<OCI::CloudBridge::Models::Tag>
Any tags assigned to the instance.
-
#time_launch ⇒ DateTime
The time the instance was launched.
-
#tpm_support ⇒ String
If the instance is configured for NitroTPM support, the value is v2.0.
-
#virtualization_type ⇒ String
The virtualization type of the instance.
-
#vpc_key ⇒ String
EC2-VPC The ID of the VPC in which the instance is running.
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 = {}) ⇒ AwsEc2Properties
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 = {}) ⇒ AwsEc2Properties
Initializes the object
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 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 450 451 452 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 263 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.architecture = attributes[:'architecture'] if attributes[:'architecture'] self.boot_mode = attributes[:'bootMode'] if attributes[:'bootMode'] raise 'You cannot provide both :bootMode and :boot_mode' if attributes.key?(:'bootMode') && attributes.key?(:'boot_mode') self.boot_mode = attributes[:'boot_mode'] if attributes[:'boot_mode'] self.capacity_reservation_key = attributes[:'capacityReservationKey'] if attributes[:'capacityReservationKey'] raise 'You cannot provide both :capacityReservationKey and :capacity_reservation_key' if attributes.key?(:'capacityReservationKey') && attributes.key?(:'capacity_reservation_key') self.capacity_reservation_key = attributes[:'capacity_reservation_key'] if attributes[:'capacity_reservation_key'] self.are_elastic_inference_accelerators_present = attributes[:'areElasticInferenceAcceleratorsPresent'] unless attributes[:'areElasticInferenceAcceleratorsPresent'].nil? self.are_elastic_inference_accelerators_present = false if are_elastic_inference_accelerators_present.nil? && !attributes.key?(:'areElasticInferenceAcceleratorsPresent') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :areElasticInferenceAcceleratorsPresent and :are_elastic_inference_accelerators_present' if attributes.key?(:'areElasticInferenceAcceleratorsPresent') && attributes.key?(:'are_elastic_inference_accelerators_present') self.are_elastic_inference_accelerators_present = attributes[:'are_elastic_inference_accelerators_present'] unless attributes[:'are_elastic_inference_accelerators_present'].nil? self.are_elastic_inference_accelerators_present = false if are_elastic_inference_accelerators_present.nil? && !attributes.key?(:'areElasticInferenceAcceleratorsPresent') && !attributes.key?(:'are_elastic_inference_accelerators_present') # rubocop:disable Style/StringLiterals self. = attributes[:'isEnclaveOptions'] unless attributes[:'isEnclaveOptions'].nil? self. = false if .nil? && !attributes.key?(:'isEnclaveOptions') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isEnclaveOptions and :is_enclave_options' if attributes.key?(:'isEnclaveOptions') && attributes.key?(:'is_enclave_options') self. = attributes[:'is_enclave_options'] unless attributes[:'is_enclave_options'].nil? self. = false if .nil? && !attributes.key?(:'isEnclaveOptions') && !attributes.key?(:'is_enclave_options') # rubocop:disable Style/StringLiterals self. = attributes[:'isHibernationOptions'] unless attributes[:'isHibernationOptions'].nil? self. = false if .nil? && !attributes.key?(:'isHibernationOptions') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isHibernationOptions and :is_hibernation_options' if attributes.key?(:'isHibernationOptions') && attributes.key?(:'is_hibernation_options') self. = attributes[:'is_hibernation_options'] unless attributes[:'is_hibernation_options'].nil? self. = false if .nil? && !attributes.key?(:'isHibernationOptions') && !attributes.key?(:'is_hibernation_options') # rubocop:disable Style/StringLiterals self.image_key = attributes[:'imageKey'] if attributes[:'imageKey'] raise 'You cannot provide both :imageKey and :image_key' if attributes.key?(:'imageKey') && attributes.key?(:'image_key') self.image_key = attributes[:'image_key'] if attributes[:'image_key'] self.instance_key = attributes[:'instanceKey'] if attributes[:'instanceKey'] raise 'You cannot provide both :instanceKey and :instance_key' if attributes.key?(:'instanceKey') && attributes.key?(:'instance_key') self.instance_key = attributes[:'instance_key'] if attributes[:'instance_key'] self.instance_lifecycle = attributes[:'instanceLifecycle'] if attributes[:'instanceLifecycle'] raise 'You cannot provide both :instanceLifecycle and :instance_lifecycle' if attributes.key?(:'instanceLifecycle') && attributes.key?(:'instance_lifecycle') self.instance_lifecycle = attributes[:'instance_lifecycle'] if attributes[:'instance_lifecycle'] self.instance_type = attributes[:'instanceType'] if attributes[:'instanceType'] raise 'You cannot provide both :instanceType and :instance_type' if attributes.key?(:'instanceType') && attributes.key?(:'instance_type') self.instance_type = attributes[:'instance_type'] if attributes[:'instance_type'] 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.ipv6_address = attributes[:'ipv6Address'] if attributes[:'ipv6Address'] raise 'You cannot provide both :ipv6Address and :ipv6_address' if attributes.key?(:'ipv6Address') && attributes.key?(:'ipv6_address') self.ipv6_address = attributes[:'ipv6_address'] if attributes[:'ipv6_address'] self.kernel_key = attributes[:'kernelKey'] if attributes[:'kernelKey'] raise 'You cannot provide both :kernelKey and :kernel_key' if attributes.key?(:'kernelKey') && attributes.key?(:'kernel_key') self.kernel_key = attributes[:'kernel_key'] if attributes[:'kernel_key'] self.time_launch = attributes[:'timeLaunch'] if attributes[:'timeLaunch'] raise 'You cannot provide both :timeLaunch and :time_launch' if attributes.key?(:'timeLaunch') && attributes.key?(:'time_launch') self.time_launch = attributes[:'time_launch'] if attributes[:'time_launch'] self.licenses = attributes[:'licenses'] if attributes[:'licenses'] self. = attributes[:'maintenanceOptions'] if attributes[:'maintenanceOptions'] raise 'You cannot provide both :maintenanceOptions and :maintenance_options' if attributes.key?(:'maintenanceOptions') && attributes.key?(:'maintenance_options') self. = attributes[:'maintenance_options'] if attributes[:'maintenance_options'] self.monitoring = attributes[:'monitoring'] if attributes[:'monitoring'] self.network_interfaces = attributes[:'networkInterfaces'] if attributes[:'networkInterfaces'] raise 'You cannot provide both :networkInterfaces and :network_interfaces' if attributes.key?(:'networkInterfaces') && attributes.key?(:'network_interfaces') self.network_interfaces = attributes[:'network_interfaces'] if attributes[:'network_interfaces'] self.placement = attributes[:'placement'] if attributes[:'placement'] self.private_dns_name = attributes[:'privateDnsName'] if attributes[:'privateDnsName'] raise 'You cannot provide both :privateDnsName and :private_dns_name' if attributes.key?(:'privateDnsName') && attributes.key?(:'private_dns_name') self.private_dns_name = attributes[:'private_dns_name'] if attributes[:'private_dns_name'] self.private_ip_address = attributes[:'privateIpAddress'] if attributes[:'privateIpAddress'] raise 'You cannot provide both :privateIpAddress and :private_ip_address' if attributes.key?(:'privateIpAddress') && attributes.key?(:'private_ip_address') self.private_ip_address = attributes[:'private_ip_address'] if attributes[:'private_ip_address'] self.root_device_name = attributes[:'rootDeviceName'] if attributes[:'rootDeviceName'] raise 'You cannot provide both :rootDeviceName and :root_device_name' if attributes.key?(:'rootDeviceName') && attributes.key?(:'root_device_name') self.root_device_name = attributes[:'root_device_name'] if attributes[:'root_device_name'] self.root_device_type = attributes[:'rootDeviceType'] if attributes[:'rootDeviceType'] raise 'You cannot provide both :rootDeviceType and :root_device_type' if attributes.key?(:'rootDeviceType') && attributes.key?(:'root_device_type') self.root_device_type = attributes[:'root_device_type'] if attributes[:'root_device_type'] self.security_groups = attributes[:'securityGroups'] if attributes[:'securityGroups'] raise 'You cannot provide both :securityGroups and :security_groups' if attributes.key?(:'securityGroups') && attributes.key?(:'security_groups') self.security_groups = attributes[:'security_groups'] if attributes[:'security_groups'] self.is_source_dest_check = attributes[:'isSourceDestCheck'] unless attributes[:'isSourceDestCheck'].nil? self.is_source_dest_check = false if is_source_dest_check.nil? && !attributes.key?(:'isSourceDestCheck') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSourceDestCheck and :is_source_dest_check' if attributes.key?(:'isSourceDestCheck') && attributes.key?(:'is_source_dest_check') self.is_source_dest_check = attributes[:'is_source_dest_check'] unless attributes[:'is_source_dest_check'].nil? self.is_source_dest_check = false if is_source_dest_check.nil? && !attributes.key?(:'isSourceDestCheck') && !attributes.key?(:'is_source_dest_check') # rubocop:disable Style/StringLiterals self.is_spot_instance = attributes[:'isSpotInstance'] unless attributes[:'isSpotInstance'].nil? self.is_spot_instance = false if is_spot_instance.nil? && !attributes.key?(:'isSpotInstance') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSpotInstance and :is_spot_instance' if attributes.key?(:'isSpotInstance') && attributes.key?(:'is_spot_instance') self.is_spot_instance = attributes[:'is_spot_instance'] unless attributes[:'is_spot_instance'].nil? self.is_spot_instance = false if is_spot_instance.nil? && !attributes.key?(:'isSpotInstance') && !attributes.key?(:'is_spot_instance') # rubocop:disable Style/StringLiterals self.sriov_net_support = attributes[:'sriovNetSupport'] if attributes[:'sriovNetSupport'] raise 'You cannot provide both :sriovNetSupport and :sriov_net_support' if attributes.key?(:'sriovNetSupport') && attributes.key?(:'sriov_net_support') self.sriov_net_support = attributes[:'sriov_net_support'] if attributes[:'sriov_net_support'] self.state = attributes[:'state'] if attributes[:'state'] self.subnet_key = attributes[:'subnetKey'] if attributes[:'subnetKey'] raise 'You cannot provide both :subnetKey and :subnet_key' if attributes.key?(:'subnetKey') && attributes.key?(:'subnet_key') self.subnet_key = attributes[:'subnet_key'] if attributes[:'subnet_key'] self. = attributes[:'tags'] if attributes[:'tags'] self.tpm_support = attributes[:'tpmSupport'] if attributes[:'tpmSupport'] raise 'You cannot provide both :tpmSupport and :tpm_support' if attributes.key?(:'tpmSupport') && attributes.key?(:'tpm_support') self.tpm_support = attributes[:'tpm_support'] if attributes[:'tpm_support'] self.virtualization_type = attributes[:'virtualizationType'] if attributes[:'virtualizationType'] raise 'You cannot provide both :virtualizationType and :virtualization_type' if attributes.key?(:'virtualizationType') && attributes.key?(:'virtualization_type') self.virtualization_type = attributes[:'virtualization_type'] if attributes[:'virtualization_type'] self.vpc_key = attributes[:'vpcKey'] if attributes[:'vpcKey'] raise 'You cannot provide both :vpcKey and :vpc_key' if attributes.key?(:'vpcKey') && attributes.key?(:'vpc_key') self.vpc_key = attributes[:'vpc_key'] if attributes[:'vpc_key'] end |
Instance Attribute Details
#architecture ⇒ String
[Required] The architecture of the image.
13 14 15 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 13 def architecture @architecture end |
#are_elastic_inference_accelerators_present ⇒ BOOLEAN
Indicates if the elastic inference accelerators attached to an instance
25 26 27 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 25 def are_elastic_inference_accelerators_present @are_elastic_inference_accelerators_present end |
#boot_mode ⇒ String
The boot mode of the instance.
17 18 19 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 17 def boot_mode @boot_mode end |
#capacity_reservation_key ⇒ String
The ID of the Capacity Reservation.
21 22 23 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 21 def capacity_reservation_key @capacity_reservation_key end |
#image_key ⇒ String
The ID of the AMI used to launch the instance.
37 38 39 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 37 def image_key @image_key end |
#instance_key ⇒ String
[Required] The ID of the instance.
41 42 43 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 41 def instance_key @instance_key end |
#instance_lifecycle ⇒ String
Indicates whether this is a Spot Instance or a Scheduled Instance.
45 46 47 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 45 def instance_lifecycle @instance_lifecycle end |
#instance_type ⇒ String
[Required] The instance type.
49 50 51 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 49 def instance_type @instance_type end |
#ip_address ⇒ String
The public IPv4 address, or the Carrier IP address assigned to the instance.
53 54 55 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 53 def ip_address @ip_address end |
#ipv6_address ⇒ String
The IPv6 address assigned to the instance.
57 58 59 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 57 def ipv6_address @ipv6_address end |
#is_enclave_options ⇒ BOOLEAN
Indicates whether the instance is enabled for AWS Nitro Enclaves.
29 30 31 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 29 def @is_enclave_options end |
#is_hibernation_options ⇒ BOOLEAN
Indicates whether the instance is enabled for hibernation.
33 34 35 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 33 def @is_hibernation_options end |
#is_source_dest_check ⇒ BOOLEAN
Indicates whether source/destination checking is enabled.
108 109 110 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 108 def is_source_dest_check @is_source_dest_check end |
#is_spot_instance ⇒ BOOLEAN
If the request is a Spot Instance request, this value will be true.
112 113 114 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 112 def is_spot_instance @is_spot_instance end |
#kernel_key ⇒ String
The kernel associated with this instance, if applicable.
61 62 63 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 61 def kernel_key @kernel_key end |
#licenses ⇒ Array<String>
The license configurations for the instance.
69 70 71 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 69 def licenses @licenses end |
#maintenance_options ⇒ String
Provides information on the recovery and maintenance options of your instance.
73 74 75 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 73 def @maintenance_options end |
#monitoring ⇒ String
The monitoring for the instance.
77 78 79 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 77 def monitoring @monitoring end |
#network_interfaces ⇒ Array<OCI::CloudBridge::Models::InstanceNetworkInterface>
The network interfaces for the instance.
81 82 83 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 81 def network_interfaces @network_interfaces end |
#placement ⇒ OCI::CloudBridge::Models::Placement
84 85 86 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 84 def placement @placement end |
#private_dns_name ⇒ String
(IPv4 only) The private DNS hostname name assigned to the instance.
88 89 90 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 88 def private_dns_name @private_dns_name end |
#private_ip_address ⇒ String
The private IPv4 address assigned to the instance.
92 93 94 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 92 def private_ip_address @private_ip_address end |
#root_device_name ⇒ String
[Required] The device name of the root device volume.
96 97 98 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 96 def root_device_name @root_device_name end |
#root_device_type ⇒ String
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
100 101 102 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 100 def root_device_type @root_device_type end |
#security_groups ⇒ Array<OCI::CloudBridge::Models::GroupIdentifier>
The security groups for the instance.
104 105 106 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 104 def security_groups @security_groups end |
#sriov_net_support ⇒ String
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
116 117 118 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 116 def sriov_net_support @sriov_net_support end |
#state ⇒ OCI::CloudBridge::Models::InstanceState
This attribute is required.
120 121 122 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 120 def state @state end |
#subnet_key ⇒ String
EC2-VPC The ID of the subnet in which the instance is running.
124 125 126 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 124 def subnet_key @subnet_key end |
#tags ⇒ Array<OCI::CloudBridge::Models::Tag>
Any tags assigned to the instance.
128 129 130 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 128 def @tags end |
#time_launch ⇒ DateTime
The time the instance was launched.
65 66 67 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 65 def time_launch @time_launch end |
#tpm_support ⇒ String
If the instance is configured for NitroTPM support, the value is v2.0.
132 133 134 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 132 def tpm_support @tpm_support end |
#virtualization_type ⇒ String
The virtualization type of the instance.
136 137 138 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 136 def virtualization_type @virtualization_type end |
#vpc_key ⇒ String
EC2-VPC The ID of the VPC in which the instance is running.
140 141 142 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 140 def vpc_key @vpc_key end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 143 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'architecture': :'architecture', 'boot_mode': :'bootMode', 'capacity_reservation_key': :'capacityReservationKey', 'are_elastic_inference_accelerators_present': :'areElasticInferenceAcceleratorsPresent', 'is_enclave_options': :'isEnclaveOptions', 'is_hibernation_options': :'isHibernationOptions', 'image_key': :'imageKey', 'instance_key': :'instanceKey', 'instance_lifecycle': :'instanceLifecycle', 'instance_type': :'instanceType', 'ip_address': :'ipAddress', 'ipv6_address': :'ipv6Address', 'kernel_key': :'kernelKey', 'time_launch': :'timeLaunch', 'licenses': :'licenses', 'maintenance_options': :'maintenanceOptions', 'monitoring': :'monitoring', 'network_interfaces': :'networkInterfaces', 'placement': :'placement', 'private_dns_name': :'privateDnsName', 'private_ip_address': :'privateIpAddress', 'root_device_name': :'rootDeviceName', 'root_device_type': :'rootDeviceType', 'security_groups': :'securityGroups', 'is_source_dest_check': :'isSourceDestCheck', 'is_spot_instance': :'isSpotInstance', 'sriov_net_support': :'sriovNetSupport', 'state': :'state', 'subnet_key': :'subnetKey', 'tags': :'tags', 'tpm_support': :'tpmSupport', 'virtualization_type': :'virtualizationType', 'vpc_key': :'vpcKey' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 184 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'architecture': :'String', 'boot_mode': :'String', 'capacity_reservation_key': :'String', 'are_elastic_inference_accelerators_present': :'BOOLEAN', 'is_enclave_options': :'BOOLEAN', 'is_hibernation_options': :'BOOLEAN', 'image_key': :'String', 'instance_key': :'String', 'instance_lifecycle': :'String', 'instance_type': :'String', 'ip_address': :'String', 'ipv6_address': :'String', 'kernel_key': :'String', 'time_launch': :'DateTime', 'licenses': :'Array<String>', 'maintenance_options': :'String', 'monitoring': :'String', 'network_interfaces': :'Array<OCI::CloudBridge::Models::InstanceNetworkInterface>', 'placement': :'OCI::CloudBridge::Models::Placement', 'private_dns_name': :'String', 'private_ip_address': :'String', 'root_device_name': :'String', 'root_device_type': :'String', 'security_groups': :'Array<OCI::CloudBridge::Models::GroupIdentifier>', 'is_source_dest_check': :'BOOLEAN', 'is_spot_instance': :'BOOLEAN', 'sriov_net_support': :'String', 'state': :'OCI::CloudBridge::Models::InstanceState', 'subnet_key': :'String', 'tags': :'Array<OCI::CloudBridge::Models::Tag>', 'tpm_support': :'String', 'virtualization_type': :'String', 'vpc_key': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 461 def ==(other) return true if equal?(other) self.class == other.class && architecture == other.architecture && boot_mode == other.boot_mode && capacity_reservation_key == other.capacity_reservation_key && are_elastic_inference_accelerators_present == other.are_elastic_inference_accelerators_present && == other. && == other. && image_key == other.image_key && instance_key == other.instance_key && instance_lifecycle == other.instance_lifecycle && instance_type == other.instance_type && ip_address == other.ip_address && ipv6_address == other.ipv6_address && kernel_key == other.kernel_key && time_launch == other.time_launch && licenses == other.licenses && == other. && monitoring == other.monitoring && network_interfaces == other.network_interfaces && placement == other.placement && private_dns_name == other.private_dns_name && private_ip_address == other.private_ip_address && root_device_name == other.root_device_name && root_device_type == other.root_device_type && security_groups == other.security_groups && is_source_dest_check == other.is_source_dest_check && is_spot_instance == other.is_spot_instance && sriov_net_support == other.sriov_net_support && state == other.state && subnet_key == other.subnet_key && == other. && tpm_support == other.tpm_support && virtualization_type == other.virtualization_type && vpc_key == other.vpc_key end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 523 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
503 504 505 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 503 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
512 513 514 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 512 def hash [architecture, boot_mode, capacity_reservation_key, are_elastic_inference_accelerators_present, , , image_key, instance_key, instance_lifecycle, instance_type, ip_address, ipv6_address, kernel_key, time_launch, licenses, , monitoring, network_interfaces, placement, private_dns_name, private_ip_address, root_device_name, root_device_type, security_groups, is_source_dest_check, is_spot_instance, sriov_net_support, state, subnet_key, , tpm_support, virtualization_type, vpc_key].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
556 557 558 559 560 561 562 563 564 565 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 556 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
550 551 552 |
# File 'lib/oci/cloud_bridge/models/aws_ec2_properties.rb', line 550 def to_s to_hash.to_s end |