Skip to main content

service_bindings

Creates, updates, deletes, gets or lists a service_bindings resource.

Overview

Nameservice_bindings
TypeResource
Idgoogle.networkservices.service_bindings

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of the ServiceBinding resource. It matches pattern projects/*/locations/*/serviceBindings/.
createTimestring (google-datetime)Output only. The timestamp when the resource was created.
descriptionstringOptional. A free-text description of the resource. Max length 1024 characters.
labelsobjectOptional. Set of label tags associated with the ServiceBinding resource.
servicestringOptional. The full Service Directory Service name of the format projects/*/locations/*/namespaces/*/services/*. This field is for Service Directory integration which will be deprecated soon.
serviceIdstringOutput only. The unique identifier of the Service Directory Service against which the ServiceBinding resource is validated. This is populated when the Service Binding resource is used in another resource (like Backend Service). This is of the UUID4 format. This field is for Service Directory integration which will be deprecated soon.
updateTimestring (google-datetime)Output only. The timestamp when the resource was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, serviceBindingsIdGets details of a single ServiceBinding.
listselectprojectsId, locationsIdpageSize, pageTokenLists ServiceBinding in a given project and location.
createinsertprojectsId, locationsIdserviceBindingIdCreates a new ServiceBinding in a given project and location.
patchupdateprojectsId, locationsId, serviceBindingsIdupdateMaskUpdates the parameters of a single ServiceBinding.
deletedeleteprojectsId, locationsId, serviceBindingsIdDeletes a single ServiceBinding.

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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
serviceBindingsIdstring
pageSizeinteger (int32)
pageTokenstring
serviceBindingIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single ServiceBinding.

SELECT
name,
createTime,
description,
labels,
service,
serviceId,
updateTime
FROM google.networkservices.service_bindings
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND serviceBindingsId = '{{ serviceBindingsId }}' -- required;

INSERT examples

Creates a new ServiceBinding in a given project and location.

INSERT INTO google.networkservices.service_bindings (
data__name,
data__description,
data__service,
data__labels,
projectsId,
locationsId,
serviceBindingId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ service }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ serviceBindingId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single ServiceBinding.

UPDATE google.networkservices.service_bindings
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__service = '{{ service }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceBindingsId = '{{ serviceBindingsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single ServiceBinding.

DELETE FROM google.networkservices.service_bindings
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceBindingsId = '{{ serviceBindingsId }}' --required;