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:

Successful response

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, locationsIdpageSize, pageToken, filter, orderByLists ServiceClasses in a given project and location.
patchupdateprojectsId, locationsId, serviceClassesIdupdateMask, requestIdUpdates the parameters of a single ServiceClass.
deletedeleteprojectsId, locationsId, serviceClassesIdrequestId, etagDeletes 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__name = '{{ name }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceClassesId = '{{ serviceClassesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
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 requestId = '{{ requestId }}'
AND etag = '{{ etag }}';