Class: Google::Apis::ComputeV1::MachineType

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

Overview

Represents a Machine Type resource. You can use specific machine types for your VM instances based on performance and pricing requirements. For more information, read Machine Types. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)

Defined Under Namespace

Classes: ScratchDisk

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) ⇒ MachineType

Returns a new instance of MachineType



12527
12528
12529
# File 'generated/google/apis/compute_v1/classes.rb', line 12527

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

Instance Attribute Details

#creation_timestampString

[Output Only] Creation timestamp in RFC3339 text format. Corresponds to the JSON property creationTimestamp

Returns:

  • (String)


12448
12449
12450
# File 'generated/google/apis/compute_v1/classes.rb', line 12448

def creation_timestamp
  @creation_timestamp
end

#deprecatedGoogle::Apis::ComputeV1::DeprecationStatus

Deprecation status for a public resource. Corresponds to the JSON property deprecated



12453
12454
12455
# File 'generated/google/apis/compute_v1/classes.rb', line 12453

def deprecated
  @deprecated
end

#descriptionString

[Output Only] An optional textual description of the resource. Corresponds to the JSON property description

Returns:

  • (String)


12458
12459
12460
# File 'generated/google/apis/compute_v1/classes.rb', line 12458

def description
  @description
end

#guest_cpusFixnum

[Output Only] The number of virtual CPUs that are available to the instance. Corresponds to the JSON property guestCpus

Returns:

  • (Fixnum)


12463
12464
12465
# File 'generated/google/apis/compute_v1/classes.rb', line 12463

def guest_cpus
  @guest_cpus
end

#idFixnum

[Output Only] The unique identifier for the resource. This identifier is defined by the server. Corresponds to the JSON property id

Returns:

  • (Fixnum)


12469
12470
12471
# File 'generated/google/apis/compute_v1/classes.rb', line 12469

def id
  @id
end

#image_space_gbFixnum

[Deprecated] This property is deprecated and will never be populated with any relevant values. Corresponds to the JSON property imageSpaceGb

Returns:

  • (Fixnum)


12475
12476
12477
# File 'generated/google/apis/compute_v1/classes.rb', line 12475

def image_space_gb
  @image_space_gb
end

#is_shared_cpuBoolean Also known as: is_shared_cpu?

[Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information. Corresponds to the JSON property isSharedCpu

Returns:

  • (Boolean)


12481
12482
12483
# File 'generated/google/apis/compute_v1/classes.rb', line 12481

def is_shared_cpu
  @is_shared_cpu
end

#kindString

[Output Only] The type of the resource. Always compute#machineType for machine types. Corresponds to the JSON property kind

Returns:

  • (String)


12488
12489
12490
# File 'generated/google/apis/compute_v1/classes.rb', line 12488

def kind
  @kind
end

#maximum_persistent_disksFixnum

[Output Only] Maximum persistent disks allowed. Corresponds to the JSON property maximumPersistentDisks

Returns:

  • (Fixnum)


12493
12494
12495
# File 'generated/google/apis/compute_v1/classes.rb', line 12493

def maximum_persistent_disks
  @maximum_persistent_disks
end

#maximum_persistent_disks_size_gbFixnum

[Output Only] Maximum total persistent disks size (GB) allowed. Corresponds to the JSON property maximumPersistentDisksSizeGb

Returns:

  • (Fixnum)


12498
12499
12500
# File 'generated/google/apis/compute_v1/classes.rb', line 12498

def maximum_persistent_disks_size_gb
  @maximum_persistent_disks_size_gb
end

#memory_mbFixnum

[Output Only] The amount of physical memory available to the instance, defined in MB. Corresponds to the JSON property memoryMb

Returns:

  • (Fixnum)


12504
12505
12506
# File 'generated/google/apis/compute_v1/classes.rb', line 12504

def memory_mb
  @memory_mb
end

#nameString

[Output Only] Name of the resource. Corresponds to the JSON property name

Returns:

  • (String)


12509
12510
12511
# File 'generated/google/apis/compute_v1/classes.rb', line 12509

def name
  @name
end

#scratch_disksArray<Google::Apis::ComputeV1::MachineType::ScratchDisk>

[Output Only] A list of extended scratch disks assigned to the instance. Corresponds to the JSON property scratchDisks



12514
12515
12516
# File 'generated/google/apis/compute_v1/classes.rb', line 12514

def scratch_disks
  @scratch_disks
end

[Output Only] Server-defined URL for the resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


12519
12520
12521
# File 'generated/google/apis/compute_v1/classes.rb', line 12519

def self_link
  @self_link
end

#zoneString

[Output Only] The name of the zone where the machine type resides, such as us- central1-a. Corresponds to the JSON property zone

Returns:

  • (String)


12525
12526
12527
# File 'generated/google/apis/compute_v1/classes.rb', line 12525

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
# File 'generated/google/apis/compute_v1/classes.rb', line 12532

def update!(**args)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @deprecated = args[:deprecated] if args.key?(:deprecated)
  @description = args[:description] if args.key?(:description)
  @guest_cpus = args[:guest_cpus] if args.key?(:guest_cpus)
  @id = args[:id] if args.key?(:id)
  @image_space_gb = args[:image_space_gb] if args.key?(:image_space_gb)
  @is_shared_cpu = args[:is_shared_cpu] if args.key?(:is_shared_cpu)
  @kind = args[:kind] if args.key?(:kind)
  @maximum_persistent_disks = args[:maximum_persistent_disks] if args.key?(:maximum_persistent_disks)
  @maximum_persistent_disks_size_gb = args[:maximum_persistent_disks_size_gb] if args.key?(:maximum_persistent_disks_size_gb)
  @memory_mb = args[:memory_mb] if args.key?(:memory_mb)
  @name = args[:name] if args.key?(:name)
  @scratch_disks = args[:scratch_disks] if args.key?(:scratch_disks)
  @self_link = args[:self_link] if args.key?(:self_link)
  @zone = args[:zone] if args.key?(:zone)
end