Class: Google::Apis::ComputeBeta::BackendCustomMetric

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

Overview

Custom Metrics are used for CUSTOM_METRICS balancing_mode.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BackendCustomMetric

Returns a new instance of BackendCustomMetric.



4451
4452
4453
# File 'lib/google/apis/compute_beta/classes.rb', line 4451

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

Instance Attribute Details

#dry_runBoolean Also known as: dry_run?

If true, the metric data is collected and reported to Cloud Monitoring, but is not used for load balancing. Corresponds to the JSON property dryRun

Returns:

  • (Boolean)


4428
4429
4430
# File 'lib/google/apis/compute_beta/classes.rb', line 4428

def dry_run
  @dry_run
end

#max_utilizationFloat

Optional parameter to define a target utilization for the Custom Metrics balancing mode. The valid range is [0.0, 1.0]. Corresponds to the JSON property maxUtilization

Returns:

  • (Float)


4435
4436
4437
# File 'lib/google/apis/compute_beta/classes.rb', line 4435

def max_utilization
  @max_utilization
end

#nameString

Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED INTERNAL_SELF_MANAGED. Corresponds to the JSON property name

Returns:

  • (String)


4449
4450
4451
# File 'lib/google/apis/compute_beta/classes.rb', line 4449

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4456
4457
4458
4459
4460
# File 'lib/google/apis/compute_beta/classes.rb', line 4456

def update!(**args)
  @dry_run = args[:dry_run] if args.key?(:dry_run)
  @max_utilization = args[:max_utilization] if args.key?(:max_utilization)
  @name = args[:name] if args.key?(:name)
end