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 messagegoogle.cloud.networkservices.v1.ServiceLbPolicy
Namespace
Google \ Cloud \ NetworkServices \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. Name of the ServiceLbPolicy resource. It matches patternprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}.
Optional. Configuration to provide isolation support for the associated Backend Service.
getName
Identifier. Name of the ServiceLbPolicy resource. It matches patternprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}.
Returns
Type
Description
string
setName
Identifier. Name of the ServiceLbPolicy resource. It matches patternprojects/{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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Network Services V1 Client - Class ServiceLbPolicy (0.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.6.1 (latest)](/php/docs/reference/cloud-networkservices/latest/V1.ServiceLbPolicy)\n- [0.6.0](/php/docs/reference/cloud-networkservices/0.6.0/V1.ServiceLbPolicy)\n- [0.5.0](/php/docs/reference/cloud-networkservices/0.5.0/V1.ServiceLbPolicy)\n- [0.4.0](/php/docs/reference/cloud-networkservices/0.4.0/V1.ServiceLbPolicy)\n- [0.3.0](/php/docs/reference/cloud-networkservices/0.3.0/V1.ServiceLbPolicy)\n- [0.2.3](/php/docs/reference/cloud-networkservices/0.2.3/V1.ServiceLbPolicy)\n- [0.1.1](/php/docs/reference/cloud-networkservices/0.1.1/V1.ServiceLbPolicy) \nReference documentation and code samples for the Google Cloud Network Services V1 Client class ServiceLbPolicy.\n\nServiceLbPolicy holds global load balancing and traffic distribution\nconfiguration that can be applied to a BackendService.\n\nGenerated from protobuf message `google.cloud.networkservices.v1.ServiceLbPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ NetworkServices \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. Name of the ServiceLbPolicy resource. It matches pattern\n`projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.\n\n### setName\n\nIdentifier. Name of the ServiceLbPolicy resource. It matches pattern\n`projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.\n\n### getCreateTime\n\nOutput only. The timestamp when this resource was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The timestamp when this resource was created.\n\n### getUpdateTime\n\nOutput only. The timestamp when this resource was last updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The timestamp when this resource was last updated.\n\n### getLabels\n\nOptional. Set of label tags associated with the ServiceLbPolicy resource.\n\n### setLabels\n\nOptional. Set of label tags associated with the ServiceLbPolicy resource.\n\n### getDescription\n\nOptional. A free-text description of the resource. Max length 1024\ncharacters.\n\n### setDescription\n\nOptional. A free-text description of the resource. Max length 1024\ncharacters.\n\n### getLoadBalancingAlgorithm\n\nOptional. The type of load balancing algorithm to be used. The default\nbehavior is WATERFALL_BY_REGION.\n\n### setLoadBalancingAlgorithm\n\nOptional. The type of load balancing algorithm to be used. The default\nbehavior is WATERFALL_BY_REGION.\n\n### getAutoCapacityDrain\n\nOptional. Configuration to automatically move traffic away for unhealthy\nIG/NEG for the associated Backend Service.\n\n### hasAutoCapacityDrain\n\n### clearAutoCapacityDrain\n\n### setAutoCapacityDrain\n\nOptional. Configuration to automatically move traffic away for unhealthy\nIG/NEG for the associated Backend Service.\n\n### getFailoverConfig\n\nOptional. Configuration related to health based failover.\n\n### hasFailoverConfig\n\n### clearFailoverConfig\n\n### setFailoverConfig\n\nOptional. Configuration related to health based failover.\n\n### getIsolationConfig\n\nOptional. Configuration to provide isolation support for the associated\nBackend Service.\n\n### hasIsolationConfig\n\n### clearIsolationConfig\n\n### setIsolationConfig\n\nOptional. Configuration to provide isolation support for the associated\nBackend Service."]]