Skip to main content

service_classes

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

Overview​

Nameservice_classes
TypeResource
Idgoogle.networkconnectivity.service_classes

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringImmutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names
createTimestring (google-datetime)Output only. Time when the ServiceClass was created.
descriptionstringA description of this resource.
etagstringOptional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
labelsobjectUser-defined labels.
serviceClassstringOutput only. The generated service class name. Use this name to refer to the Service class in Service Connection Maps and Service Connection Policies.
updateTimestring (google-datetime)Output only. Time when the ServiceClass was updated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, serviceClassesIdGets details of a single ServiceClass.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenLists ServiceClasses in a given project and location.
patchupdateprojectsId, locationsId, serviceClassesIdrequestId, updateMaskUpdates the parameters of a single ServiceClass.
deletedeleteprojectsId, locationsId, serviceClassesIdetag, requestIdDeletes a single ServiceClass.

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
serviceClassesIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples​

Gets details of a single ServiceClass.

SELECT
name,
createTime,
description,
etag,
labels,
serviceClass,
updateTime
FROM google.networkconnectivity.service_classes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND serviceClassesId = '{{ serviceClassesId }}' -- required
;

UPDATE examples​

Updates the parameters of a single ServiceClass.

UPDATE google.networkconnectivity.service_classes
SET
data__description = '{{ description }}',
data__etag = '{{ etag }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceClassesId = '{{ serviceClassesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples​

Deletes a single ServiceClass.

DELETE FROM google.networkconnectivity.service_classes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceClassesId = '{{ serviceClassesId }}' --required
AND etag = '{{ etag }}'
AND requestId = '{{ requestId }}'
;