Reference documentation and code samples for the Google Cloud Network Services V1 Client class ServiceLbPolicy.
ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.
Generated from protobuf message google.cloud.networkservices.v1.ServiceLbPolicy
Namespace
Google \ Cloud \ NetworkServices \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Identifier. Name of the ServiceLbPolicy resource. It matches pattern |
↳ create_time |
Google\Protobuf\Timestamp
Output only. The timestamp when this resource was created. |
↳ update_time |
Google\Protobuf\Timestamp
Output only. The timestamp when this resource was last updated. |
↳ labels |
array|Google\Protobuf\Internal\MapField
Optional. Set of label tags associated with the ServiceLbPolicy resource. |
↳ description |
string
Optional. A free-text description of the resource. Max length 1024 characters. |
↳ load_balancing_algorithm |
int
Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION. |
↳ auto_capacity_drain |
ServiceLbPolicy\AutoCapacityDrain
Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service. |
↳ failover_config |
ServiceLbPolicy\FailoverConfig
Optional. Configuration related to health based failover. |
getName
Identifier. Name of the ServiceLbPolicy resource. It matches pattern
projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}
.
Returns | |
---|---|
Type | Description |
string |
setName
Identifier. Name of the ServiceLbPolicy resource. It matches pattern
projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCreateTime
Output only. The timestamp when this resource was created.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasCreateTime
clearCreateTime
setCreateTime
Output only. The timestamp when this resource was created.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getUpdateTime
Output only. The timestamp when this resource was last updated.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The timestamp when this resource was last updated.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getLabels
Optional. Set of label tags associated with the ServiceLbPolicy resource.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setLabels
Optional. Set of label tags associated with the ServiceLbPolicy resource.
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getDescription
Optional. A free-text description of the resource. Max length 1024 characters.
Returns | |
---|---|
Type | Description |
string |
setDescription
Optional. A free-text description of the resource. Max length 1024 characters.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLoadBalancingAlgorithm
Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.
Returns | |
---|---|
Type | Description |
int |
setLoadBalancingAlgorithm
Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getAutoCapacityDrain
Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service.
Returns | |
---|---|
Type | Description |
ServiceLbPolicy\AutoCapacityDrain|null |
hasAutoCapacityDrain
clearAutoCapacityDrain
setAutoCapacityDrain
Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service.
Parameter | |
---|---|
Name | Description |
var |
ServiceLbPolicy\AutoCapacityDrain
|
Returns | |
---|---|
Type | Description |
$this |
getFailoverConfig
Optional. Configuration related to health based failover.
Returns | |
---|---|
Type | Description |
ServiceLbPolicy\FailoverConfig|null |
hasFailoverConfig
clearFailoverConfig
setFailoverConfig
Optional. Configuration related to health based failover.
Parameter | |
---|---|
Name | Description |
var |
ServiceLbPolicy\FailoverConfig
|
Returns | |
---|---|
Type | Description |
$this |