Class: Google::Apis::ComputeAlpha::AutoscalingPolicyQueueBasedScalingCloudPubSub

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

Overview

Configuration parameters for scaling based on Cloud Pub/Sub subscription queue.

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

Returns a new instance of AutoscalingPolicyQueueBasedScalingCloudPubSub.



2457
2458
2459
# File 'generated/google/apis/compute_alpha/classes.rb', line 2457

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

Instance Attribute Details

#subscriptionString

Cloud Pub/Sub subscription used for scaling. Provide the partial URL (starting with projects/) or just the subscription name. The subscription must be assigned to the topic specified in topicName and must be in a pull configuration. The subscription must belong to the same project as the Autoscaler. Corresponds to the JSON property subscription

Returns:

  • (String)


2448
2449
2450
# File 'generated/google/apis/compute_alpha/classes.rb', line 2448

def subscription
  @subscription
end

#topicString

Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial URL ( starting with projects/) or just the topic name. The topic must belong to the same project as the Autoscaler resource. Corresponds to the JSON property topic

Returns:

  • (String)


2455
2456
2457
# File 'generated/google/apis/compute_alpha/classes.rb', line 2455

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2462
2463
2464
2465
# File 'generated/google/apis/compute_alpha/classes.rb', line 2462

def update!(**args)
  @subscription = args[:subscription] if args.key?(:subscription)
  @topic = args[:topic] if args.key?(:topic)
end