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
Name | Datatype | Description |
---|---|---|
name | string | Required. Name of the ServiceLbPolicy resource. It matches pattern projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name} . |
description | string | Optional. A free-text description of the resource. Max length 1024 characters. |
autoCapacityDrain | object | Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing. |
createTime | string | Output only. The timestamp when this resource was created. |
failoverConfig | object | Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy. |
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 | Output only. The timestamp when this resource was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, serviceLbPoliciesId | Gets details of a single ServiceLbPolicy. |
list | SELECT | locationsId, projectsId | Lists ServiceLbPolicies in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new ServiceLbPolicy in a given project and location. |
delete | DELETE | locationsId, projectsId, serviceLbPoliciesId | Deletes a single ServiceLbPolicy. |
patch | UPDATE | locationsId, projectsId, serviceLbPoliciesId | Updates the parameters of a single ServiceLbPolicy. |
SELECT
examples
Lists ServiceLbPolicies in a given project and location.
SELECT
name,
description,
autoCapacityDrain,
createTime,
failoverConfig,
labels,
loadBalancingAlgorithm,
updateTime
FROM google.networkservices.service_lb_policies
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new service_lb_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.networkservices.service_lb_policies (
locationsId,
projectsId,
name,
labels,
description,
loadBalancingAlgorithm,
autoCapacityDrain,
failoverConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ loadBalancingAlgorithm }}',
'{{ autoCapacityDrain }}',
'{{ failoverConfig }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: description
value: string
- name: loadBalancingAlgorithm
value: string
- name: autoCapacityDrain
value:
- name: enable
value: boolean
- name: failoverConfig
value:
- name: failoverHealthThreshold
value: integer
UPDATE
example
Updates a service_lb_policies
resource.
/*+ update */
UPDATE google.networkservices.service_lb_policies
SET
name = '{{ name }}',
labels = '{{ labels }}',
description = '{{ description }}',
loadBalancingAlgorithm = '{{ loadBalancingAlgorithm }}',
autoCapacityDrain = '{{ autoCapacityDrain }}',
failoverConfig = '{{ failoverConfig }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serviceLbPoliciesId = '{{ serviceLbPoliciesId }}';
DELETE
example
Deletes the specified service_lb_policies
resource.
/*+ delete */
DELETE FROM google.networkservices.service_lb_policies
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serviceLbPoliciesId = '{{ serviceLbPoliciesId }}';