Class: Google::Apis::ComputeV1::NodeTemplate

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

Overview

Represent a sole-tenant Node Template resource. You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for $ api_version.nodeTemplates ==)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NodeTemplate

Returns a new instance of NodeTemplate.



20673
20674
20675
# File 'lib/google/apis/compute_v1/classes.rb', line 20673

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

Instance Attribute Details

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

Corresponds to the JSON property accelerators



20577
20578
20579
# File 'lib/google/apis/compute_v1/classes.rb', line 20577

def accelerators
  @accelerators
end

#cpu_overcommit_typeString

CPU overcommit. Corresponds to the JSON property cpuOvercommitType

Returns:

  • (String)


20582
20583
20584
# File 'lib/google/apis/compute_v1/classes.rb', line 20582

def cpu_overcommit_type
  @cpu_overcommit_type
end

#creation_timestampString

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

Returns:

  • (String)


20587
20588
20589
# File 'lib/google/apis/compute_v1/classes.rb', line 20587

def creation_timestamp
  @creation_timestamp
end

#descriptionString

An optional description of this resource. Provide this property when you create the resource. Corresponds to the JSON property description

Returns:

  • (String)


20593
20594
20595
# File 'lib/google/apis/compute_v1/classes.rb', line 20593

def description
  @description
end

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

Corresponds to the JSON property disks



20598
20599
20600
# File 'lib/google/apis/compute_v1/classes.rb', line 20598

def disks
  @disks
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)


20604
20605
20606
# File 'lib/google/apis/compute_v1/classes.rb', line 20604

def id
  @id
end

#kindString

[Output Only] The type of the resource. Always compute#nodeTemplate for node templates. Corresponds to the JSON property kind

Returns:

  • (String)


20610
20611
20612
# File 'lib/google/apis/compute_v1/classes.rb', line 20610

def kind
  @kind
end

#nameString

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Corresponds to the JSON property name

Returns:

  • (String)


20621
20622
20623
# File 'lib/google/apis/compute_v1/classes.rb', line 20621

def name
  @name
end

#node_affinity_labelsHash<String,String>

Labels to use for node affinity, which will be used in instance scheduling. Corresponds to the JSON property nodeAffinityLabels

Returns:

  • (Hash<String,String>)


20626
20627
20628
# File 'lib/google/apis/compute_v1/classes.rb', line 20626

def node_affinity_labels
  @node_affinity_labels
end

#node_typeString

The node type to use for nodes group that are created from this template. Corresponds to the JSON property nodeType

Returns:

  • (String)


20631
20632
20633
# File 'lib/google/apis/compute_v1/classes.rb', line 20631

def node_type
  @node_type
end

#node_type_flexibilityGoogle::Apis::ComputeV1::NodeTemplateNodeTypeFlexibility

The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. This field is mutually exclusive with the node_type property; you can only define one or the other, but not both. Corresponds to the JSON property nodeTypeFlexibility



20639
20640
20641
# File 'lib/google/apis/compute_v1/classes.rb', line 20639

def node_type_flexibility
  @node_type_flexibility
end

#regionString

[Output Only] The name of the region where the node template resides, such as us-central1. Corresponds to the JSON property region

Returns:

  • (String)


20645
20646
20647
# File 'lib/google/apis/compute_v1/classes.rb', line 20645

def region
  @region
end

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

Returns:

  • (String)


20650
20651
20652
# File 'lib/google/apis/compute_v1/classes.rb', line 20650

def self_link
  @self_link
end

#server_bindingGoogle::Apis::ComputeV1::ServerBinding

Sets the binding properties for the physical server. Valid values include:

  • [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server
  • RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. Corresponds to the JSON property serverBinding


20660
20661
20662
# File 'lib/google/apis/compute_v1/classes.rb', line 20660

def server_binding
  @server_binding
end

#statusString

[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. Corresponds to the JSON property status

Returns:

  • (String)


20666
20667
20668
# File 'lib/google/apis/compute_v1/classes.rb', line 20666

def status
  @status
end

#status_messageString

[Output Only] An optional, human-readable explanation of the status. Corresponds to the JSON property statusMessage

Returns:

  • (String)


20671
20672
20673
# File 'lib/google/apis/compute_v1/classes.rb', line 20671

def status_message
  @status_message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
# File 'lib/google/apis/compute_v1/classes.rb', line 20678

def update!(**args)
  @accelerators = args[:accelerators] if args.key?(:accelerators)
  @cpu_overcommit_type = args[:cpu_overcommit_type] if args.key?(:cpu_overcommit_type)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @description = args[:description] if args.key?(:description)
  @disks = args[:disks] if args.key?(:disks)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @node_affinity_labels = args[:node_affinity_labels] if args.key?(:node_affinity_labels)
  @node_type = args[:node_type] if args.key?(:node_type)
  @node_type_flexibility = args[:node_type_flexibility] if args.key?(:node_type_flexibility)
  @region = args[:region] if args.key?(:region)
  @self_link = args[:self_link] if args.key?(:self_link)
  @server_binding = args[:server_binding] if args.key?(:server_binding)
  @status = args[:status] if args.key?(:status)
  @status_message = args[:status_message] if args.key?(:status_message)
end