service_lb_policies
Creates, updates, deletes, gets or lists a service_lb_policies
resource.
Overview
Name | service_lb_policies |
Type | Resource |
Id | google.networkservices.service_lb_policies |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the ServiceLbPolicy resource. It matches pattern projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name} . |
autoCapacityDrain | object | Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service. (id: ServiceLbPolicyAutoCapacityDrain) |
createTime | string (google-datetime) | Output only. The timestamp when this resource was created. |
description | string | Optional. A free-text description of the resource. Max length 1024 characters. |
failoverConfig | object | Optional. Configuration related to health based failover. (id: ServiceLbPolicyFailoverConfig) |
isolationConfig | object | Optional. Configuration to provide isolation support for the associated Backend Service. (id: ServiceLbPolicyIsolationConfig) |
labels | object | Optional. Set of label tags associated with the ServiceLbPolicy resource. |
loadBalancingAlgorithm | string | Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION. |
updateTime | string (google-datetime) | Output only. The timestamp when this resource was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the ServiceLbPolicy resource. It matches pattern projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name} . |
autoCapacityDrain | object | Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service. (id: ServiceLbPolicyAutoCapacityDrain) |
createTime | string (google-datetime) | Output only. The timestamp when this resource was created. |
description | string | Optional. A free-text description of the resource. Max length 1024 characters. |
failoverConfig | object | Optional. Configuration related to health based failover. (id: ServiceLbPolicyFailoverConfig) |
isolationConfig | object | Optional. Configuration to provide isolation support for the associated Backend Service. (id: ServiceLbPolicyIsolationConfig) |
labels | object | Optional. Set of label tags associated with the ServiceLbPolicy resource. |
loadBalancingAlgorithm | string | Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION. |
updateTime | string (google-datetime) | Output only. The timestamp when this resource was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , serviceLbPoliciesId | Gets details of a single ServiceLbPolicy. | |
list | select | projectsId , locationsId | pageSize , pageToken | Lists ServiceLbPolicies in a given project and location. |
create | insert | projectsId , locationsId | serviceLbPolicyId | Creates a new ServiceLbPolicy in a given project and location. |
patch | update | projectsId , locationsId , serviceLbPoliciesId | updateMask | Updates the parameters of a single ServiceLbPolicy. |
delete | delete | projectsId , locationsId , serviceLbPoliciesId | Deletes a single ServiceLbPolicy. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
serviceLbPoliciesId | string | |
pageSize | integer (int32) | |
pageToken | string | |
serviceLbPolicyId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets details of a single ServiceLbPolicy.
SELECT
name,
autoCapacityDrain,
createTime,
description,
failoverConfig,
isolationConfig,
labels,
loadBalancingAlgorithm,
updateTime
FROM google.networkservices.service_lb_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND serviceLbPoliciesId = '{{ serviceLbPoliciesId }}' -- required;
Lists ServiceLbPolicies in a given project and location.
SELECT
name,
autoCapacityDrain,
createTime,
description,
failoverConfig,
isolationConfig,
labels,
loadBalancingAlgorithm,
updateTime
FROM google.networkservices.service_lb_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a new ServiceLbPolicy in a given project and location.
INSERT INTO google.networkservices.service_lb_policies (
data__name,
data__labels,
data__description,
data__loadBalancingAlgorithm,
data__autoCapacityDrain,
data__failoverConfig,
data__isolationConfig,
projectsId,
locationsId,
serviceLbPolicyId
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ loadBalancingAlgorithm }}',
'{{ autoCapacityDrain }}',
'{{ failoverConfig }}',
'{{ isolationConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ serviceLbPolicyId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: service_lb_policies
props:
- name: projectsId
value: string
description: Required parameter for the service_lb_policies resource.
- name: locationsId
value: string
description: Required parameter for the service_lb_policies resource.
- name: name
value: string
description: >
Identifier. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.
- name: labels
value: object
description: >
Optional. Set of label tags associated with the ServiceLbPolicy resource.
- name: description
value: string
description: >
Optional. A free-text description of the resource. Max length 1024 characters.
- name: loadBalancingAlgorithm
value: string
description: >
Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.
valid_values: ['LOAD_BALANCING_ALGORITHM_UNSPECIFIED', 'SPRAY_TO_WORLD', 'SPRAY_TO_REGION', 'WATERFALL_BY_REGION', 'WATERFALL_BY_ZONE']
- name: autoCapacityDrain
value: object
description: >
Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service.
- name: failoverConfig
value: object
description: >
Optional. Configuration related to health based failover.
- name: isolationConfig
value: object
description: >
Optional. Configuration to provide isolation support for the associated Backend Service.
- name: serviceLbPolicyId
value: string
UPDATE
examples
- patch
Updates the parameters of a single ServiceLbPolicy.
UPDATE google.networkservices.service_lb_policies
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__loadBalancingAlgorithm = '{{ loadBalancingAlgorithm }}',
data__autoCapacityDrain = '{{ autoCapacityDrain }}',
data__failoverConfig = '{{ failoverConfig }}',
data__isolationConfig = '{{ isolationConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceLbPoliciesId = '{{ serviceLbPoliciesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a single ServiceLbPolicy.
DELETE FROM google.networkservices.service_lb_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceLbPoliciesId = '{{ serviceLbPoliciesId }}' --required;