Class: Google::Apis::ComputeV1::InstanceProperties

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/google/apis/compute_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ InstanceProperties

Returns a new instance of InstanceProperties



8482
8483
8484
# File 'generated/google/apis/compute_v1/classes.rb', line 8482

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#can_ip_forwardBoolean Also known as: can_ip_forward?

Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information. Corresponds to the JSON property canIpForward

Returns:

  • (Boolean)


8415
8416
8417
# File 'generated/google/apis/compute_v1/classes.rb', line 8415

def can_ip_forward
  @can_ip_forward
end

#descriptionString

An optional text description for the instances that are created from this instance template. Corresponds to the JSON property description

Returns:

  • (String)


8422
8423
8424
# File 'generated/google/apis/compute_v1/classes.rb', line 8422

def description
  @description
end

#disksArray<Google::Apis::ComputeV1::AttachedDisk>

An array of disks that are associated with the instances that are created from this template. Corresponds to the JSON property disks



8428
8429
8430
# File 'generated/google/apis/compute_v1/classes.rb', line 8428

def disks
  @disks
end

#guest_acceleratorsArray<Google::Apis::ComputeV1::AcceleratorConfig>

A list of guest accelerator cards' type and count to use for instances created from the instance template. Corresponds to the JSON property guestAccelerators



8434
8435
8436
# File 'generated/google/apis/compute_v1/classes.rb', line 8434

def guest_accelerators
  @guest_accelerators
end

#labelsHash<String,String>

Labels to apply to instances that are created from this template. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


8439
8440
8441
# File 'generated/google/apis/compute_v1/classes.rb', line 8439

def labels
  @labels
end

#machine_typeString

The machine type to use for instances that are created from this template. Corresponds to the JSON property machineType

Returns:

  • (String)


8444
8445
8446
# File 'generated/google/apis/compute_v1/classes.rb', line 8444

def machine_type
  @machine_type
end

#metadataGoogle::Apis::ComputeV1::Metadata

A metadata key/value entry. Corresponds to the JSON property metadata



8449
8450
8451
# File 'generated/google/apis/compute_v1/classes.rb', line 8449

def 
  @metadata
end

#min_cpu_platformString

Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform. Corresponds to the JSON property minCpuPlatform

Returns:

  • (String)


8458
8459
8460
# File 'generated/google/apis/compute_v1/classes.rb', line 8458

def min_cpu_platform
  @min_cpu_platform
end

#network_interfacesArray<Google::Apis::ComputeV1::NetworkInterface>

An array of network access configurations for this interface. Corresponds to the JSON property networkInterfaces



8463
8464
8465
# File 'generated/google/apis/compute_v1/classes.rb', line 8463

def network_interfaces
  @network_interfaces
end

#schedulingGoogle::Apis::ComputeV1::Scheduling

Sets the scheduling options for an Instance. Corresponds to the JSON property scheduling



8468
8469
8470
# File 'generated/google/apis/compute_v1/classes.rb', line 8468

def scheduling
  @scheduling
end

#service_accountsArray<Google::Apis::ComputeV1::ServiceAccount>

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances. Corresponds to the JSON property serviceAccounts



8475
8476
8477
# File 'generated/google/apis/compute_v1/classes.rb', line 8475

def service_accounts
  @service_accounts
end

#tagsGoogle::Apis::ComputeV1::Tags

A set of instance tags. Corresponds to the JSON property tags



8480
8481
8482
# File 'generated/google/apis/compute_v1/classes.rb', line 8480

def tags
  @tags
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
# File 'generated/google/apis/compute_v1/classes.rb', line 8487

def update!(**args)
  @can_ip_forward = args[:can_ip_forward] if args.key?(:can_ip_forward)
  @description = args[:description] if args.key?(:description)
  @disks = args[:disks] if args.key?(:disks)
  @guest_accelerators = args[:guest_accelerators] if args.key?(:guest_accelerators)
  @labels = args[:labels] if args.key?(:labels)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
  @metadata = args[:metadata] if args.key?(:metadata)
  @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform)
  @network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces)
  @scheduling = args[:scheduling] if args.key?(:scheduling)
  @service_accounts = args[:service_accounts] if args.key?(:service_accounts)
  @tags = args[:tags] if args.key?(:tags)
end