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

NameDatatypeDescription
namestringIdentifier. Name of the ServiceBinding resource. It matches pattern projects/*/locations/global/serviceBindings/service_binding_name.
descriptionstringOptional. A free-text description of the resource. Max length 1024 characters.
createTimestringOutput only. The timestamp when the resource was created.
labelsobjectOptional. Set of label tags associated with the ServiceBinding resource.
servicestringRequired. The full Service Directory Service name of the format projects//locations//namespaces//services/
serviceIdstringOutput only. The unique identifier of the Service Directory Service against which the Service Binding 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.
updateTimestringOutput only. The timestamp when the resource was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, serviceBindingsIdGets details of a single ServiceBinding.
listSELECTlocationsId, projectsIdLists ServiceBinding in a given project and location.
createINSERTlocationsId, projectsIdCreates a new ServiceBinding in a given project and location.
deleteDELETElocationsId, projectsId, serviceBindingsIdDeletes a single ServiceBinding.

SELECT examples

Lists ServiceBinding in a given project and location.

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

INSERT example

Use the following StackQL query and manifest file to create a new service_bindings resource.

/*+ create */
INSERT INTO google.networkservices.service_bindings (
locationsId,
projectsId,
name,
description,
service,
labels
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ service }}',
'{{ labels }}'
;

DELETE example

Deletes the specified service_bindings resource.

/*+ delete */
DELETE FROM google.networkservices.service_bindings
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serviceBindingsId = '{{ serviceBindingsId }}';