Class: Google::Apis::ComputeAlpha::Backend

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

Message containing information of one individual backend.

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

Returns a new instance of Backend



2826
2827
2828
# File 'generated/google/apis/compute_alpha/classes.rb', line 2826

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

Instance Attribute Details

#balancing_modeString

Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL). For Internal Load Balancing, the default and only supported mode is CONNECTION. Corresponds to the JSON property balancingMode

Returns:

  • (String)


2723
2724
2725
# File 'generated/google/apis/compute_alpha/classes.rb', line 2723

def balancing_mode
  @balancing_mode
end

#capacity_scalerFloat

A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. This cannot be used for internal load balancing. Corresponds to the JSON property capacityScaler

Returns:

  • (Float)


2733
2734
2735
# File 'generated/google/apis/compute_alpha/classes.rb', line 2733

def capacity_scaler
  @capacity_scaler
end

#descriptionString

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

Returns:

  • (String)


2739
2740
2741
# File 'generated/google/apis/compute_alpha/classes.rb', line 2739

def description
  @description
end

#failoverBoolean Also known as: failover?

This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService. Corresponds to the JSON property failover

Returns:

  • (Boolean)


2745
2746
2747
# File 'generated/google/apis/compute_alpha/classes.rb', line 2745

def failover
  @failover
end

#groupString

The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend service can not contain mix of Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme. Corresponds to the JSON property group

Returns:

  • (String)


2765
2766
2767
# File 'generated/google/apis/compute_alpha/classes.rb', line 2765

def group
  @group
end

#max_connectionsFixnum

The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. This cannot be used for internal load balancing. Corresponds to the JSON property maxConnections

Returns:

  • (Fixnum)


2773
2774
2775
# File 'generated/google/apis/compute_alpha/classes.rb', line 2773

def max_connections
  @max_connections
end

#max_connections_per_endpointFixnum

The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. This cannot be used for internal load balancing. Corresponds to the JSON property maxConnectionsPerEndpoint

Returns:

  • (Fixnum)


2782
2783
2784
# File 'generated/google/apis/compute_alpha/classes.rb', line 2782

def max_connections_per_endpoint
  @max_connections_per_endpoint
end

#max_connections_per_instanceFixnum

The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. This cannot be used for internal load balancing. Corresponds to the JSON property maxConnectionsPerInstance

Returns:

  • (Fixnum)


2791
2792
2793
# File 'generated/google/apis/compute_alpha/classes.rb', line 2791

def max_connections_per_instance
  @max_connections_per_instance
end

#max_rateFixnum

The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set. This cannot be used for internal load balancing. Corresponds to the JSON property maxRate

Returns:

  • (Fixnum)


2799
2800
2801
# File 'generated/google/apis/compute_alpha/classes.rb', line 2799

def max_rate
  @max_rate
end

#max_rate_per_endpointFloat

The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. This cannot be used for internal load balancing. Corresponds to the JSON property maxRatePerEndpoint

Returns:

  • (Float)


2808
2809
2810
# File 'generated/google/apis/compute_alpha/classes.rb', line 2808

def max_rate_per_endpoint
  @max_rate_per_endpoint
end

#max_rate_per_instanceFloat

The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. This cannot be used for internal load balancing. Corresponds to the JSON property maxRatePerInstance

Returns:

  • (Float)


2817
2818
2819
# File 'generated/google/apis/compute_alpha/classes.rb', line 2817

def max_rate_per_instance
  @max_rate_per_instance
end

#max_utilizationFloat

Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0]. This cannot be used for internal load balancing. Corresponds to the JSON property maxUtilization

Returns:

  • (Float)


2824
2825
2826
# File 'generated/google/apis/compute_alpha/classes.rb', line 2824

def max_utilization
  @max_utilization
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
# File 'generated/google/apis/compute_alpha/classes.rb', line 2831

def update!(**args)
  @balancing_mode = args[:balancing_mode] if args.key?(:balancing_mode)
  @capacity_scaler = args[:capacity_scaler] if args.key?(:capacity_scaler)
  @description = args[:description] if args.key?(:description)
  @failover = args[:failover] if args.key?(:failover)
  @group = args[:group] if args.key?(:group)
  @max_connections = args[:max_connections] if args.key?(:max_connections)
  @max_connections_per_endpoint = args[:max_connections_per_endpoint] if args.key?(:max_connections_per_endpoint)
  @max_connections_per_instance = args[:max_connections_per_instance] if args.key?(:max_connections_per_instance)
  @max_rate = args[:max_rate] if args.key?(:max_rate)
  @max_rate_per_endpoint = args[:max_rate_per_endpoint] if args.key?(:max_rate_per_endpoint)
  @max_rate_per_instance = args[:max_rate_per_instance] if args.key?(:max_rate_per_instance)
  @max_utilization = args[:max_utilization] if args.key?(:max_utilization)
end