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

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
descriptionstringA description of this resource.
createTimestringOutput only. Time when the ServiceConnectionToken was created.
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.
expireTimestringOutput 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.
updateTimestringOutput only. Time when the ServiceConnectionToken was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, serviceConnectionTokensIdGets details of a single ServiceConnectionToken.
listSELECTlocationsId, projectsIdLists ServiceConnectionTokens in a given project and location.
createINSERTlocationsId, projectsIdCreates a new ServiceConnectionToken in a given project and location.
deleteDELETElocationsId, projectsId, serviceConnectionTokensIdDeletes a single ServiceConnectionToken.

SELECT examples

Lists ServiceConnectionTokens in a given project and location.

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

INSERT example

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

/*+ create */
INSERT INTO google.networkconnectivity.service_connection_tokens (
locationsId,
projectsId,
name,
labels,
description,
network,
etag
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ network }}',
'{{ etag }}'
;

DELETE example

Deletes the specified service_connection_tokens resource.

/*+ delete */
DELETE FROM google.networkconnectivity.service_connection_tokens
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serviceConnectionTokensId = '{{ serviceConnectionTokensId }}';