Skip to main content

service_connection_tokens

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

Overview

Nameservice_connection_tokens
TypeResource
Idgoogle.networkconnectivity.service_connection_tokens

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. The name of a ServiceConnectionToken. Format: projects/{project}/locations/{location}/ServiceConnectionTokens/{service_connection_token} See: https://google.aip.dev/122#fields-representing-resource-names
createTimestring (google-datetime)Output only. Time when the ServiceConnectionToken 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.
expireTimestring (google-datetime)Output only. The time to which this token is valid.
labelsobjectUser-defined labels.
networkstringThe resource path of the network associated with this token. Example: projects/{projectNumOrId}/global/networks/{resourceId}.
tokenstringOutput only. The token generated by Automation.
updateTimestring (google-datetime)Output only. Time when the ServiceConnectionToken was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, serviceConnectionTokensIdGets details of a single ServiceConnectionToken.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists ServiceConnectionTokens in a given project and location.
createinsertprojectsId, locationsIdserviceConnectionTokenId, requestIdCreates a new ServiceConnectionToken in a given project and location.
deletedeleteprojectsId, locationsId, serviceConnectionTokensIdrequestId, etagDeletes a single ServiceConnectionToken.

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
serviceConnectionTokensIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
serviceConnectionTokenIdstring

SELECT examples

Gets details of a single ServiceConnectionToken.

SELECT
name,
createTime,
description,
etag,
expireTime,
labels,
network,
token,
updateTime
FROM google.networkconnectivity.service_connection_tokens
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND serviceConnectionTokensId = '{{ serviceConnectionTokensId }}' -- required;

INSERT examples

Creates a new ServiceConnectionToken in a given project and location.

INSERT INTO google.networkconnectivity.service_connection_tokens (
data__name,
data__labels,
data__description,
data__network,
data__etag,
projectsId,
locationsId,
serviceConnectionTokenId,
requestId
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ network }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ serviceConnectionTokenId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes a single ServiceConnectionToken.

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