Class: Google::Apis::AutoscalerV1beta2::Autoscaler

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

Overview

Cloud Autoscaler resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Autoscaler

Returns a new instance of Autoscaler.



71
72
73
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 71

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

Instance Attribute Details

#autoscaling_policyGoogle::Apis::AutoscalerV1beta2::AutoscalingPolicy

Cloud Autoscaler policy. Corresponds to the JSON property autoscalingPolicy



32
33
34
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 32

def autoscaling_policy
  @autoscaling_policy
end

#creation_timestampString

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

Returns:

  • (String)


37
38
39
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 37

def creation_timestamp
  @creation_timestamp
end

#descriptionString

An optional textual description of the resource provided by the client. Corresponds to the JSON property description

Returns:

  • (String)


42
43
44
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 42

def description
  @description
end

#idString

[Output Only] Unique identifier for the resource; defined by the server. Corresponds to the JSON property id

Returns:

  • (String)


47
48
49
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 47

def id
  @id
end

#kindString

Type of resource. Corresponds to the JSON property kind

Returns:

  • (String)


52
53
54
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 52

def kind
  @kind
end

#nameString

Name of the Autoscaler resource. Must be unique per project and zone. Corresponds to the JSON property name

Returns:

  • (String)


57
58
59
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 57

def name
  @name
end

[Output Only] A self-link to the Autoscaler configuration resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


62
63
64
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 62

def self_link
  @self_link
end

#targetString

URL to the entity which will be autoscaled. Currently the only supported value is ReplicaPool?s URL. Note: it is illegal to specify multiple Autoscalers for the same target. Corresponds to the JSON property target

Returns:

  • (String)


69
70
71
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 69

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



76
77
78
79
80
81
82
83
84
85
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 76

def update!(**args)
  @autoscaling_policy = args[:autoscaling_policy] if args.key?(:autoscaling_policy)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @description = args[:description] if args.key?(:description)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @self_link = args[:self_link] if args.key?(:self_link)
  @target = args[:target] if args.key?(:target)
end