Skip to main content

service_connection_policies

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

Overview

Nameservice_connection_policies
TypeResource
Idgoogle.networkconnectivity.service_connection_policies

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
createTimestring (google-datetime)Output only. Time when the ServiceConnectionPolicy 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.
infrastructurestringOutput only. The type of underlying resources used to create the connection.
labelsobjectUser-defined labels.
networkstringThe resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
pscConfigobjectConfiguration used for Private Service Connect connections. Used when Infrastructure is PSC. (id: PscConfig)
pscConnectionsarrayOutput only. [Output only] Information about each Private Service Connect connection.
serviceClassstringThe service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp or google-cloud. For example, gcp-memorystore-redis or google-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
updateTimestring (google-datetime)Output only. Time when the ServiceConnectionPolicy was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, serviceConnectionPoliciesIdGets details of a single ServiceConnectionPolicy.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists ServiceConnectionPolicies in a given project and location.
createinsertprojectsId, locationsIdserviceConnectionPolicyId, requestIdCreates a new ServiceConnectionPolicy in a given project and location.
patchupdateprojectsId, locationsId, serviceConnectionPoliciesIdupdateMask, requestIdUpdates the parameters of a single ServiceConnectionPolicy.
deletedeleteprojectsId, locationsId, serviceConnectionPoliciesIdrequestId, etagDeletes a single ServiceConnectionPolicy.

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

SELECT examples

Gets details of a single ServiceConnectionPolicy.

SELECT
name,
createTime,
description,
etag,
infrastructure,
labels,
network,
pscConfig,
pscConnections,
serviceClass,
updateTime
FROM google.networkconnectivity.service_connection_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND serviceConnectionPoliciesId = '{{ serviceConnectionPoliciesId }}' -- required;

INSERT examples

Creates a new ServiceConnectionPolicy in a given project and location.

INSERT INTO google.networkconnectivity.service_connection_policies (
data__name,
data__labels,
data__description,
data__network,
data__serviceClass,
data__pscConfig,
data__etag,
projectsId,
locationsId,
serviceConnectionPolicyId,
requestId
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ network }}',
'{{ serviceClass }}',
'{{ pscConfig }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ serviceConnectionPolicyId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single ServiceConnectionPolicy.

UPDATE google.networkconnectivity.service_connection_policies
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__network = '{{ network }}',
data__serviceClass = '{{ serviceClass }}',
data__pscConfig = '{{ pscConfig }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceConnectionPoliciesId = '{{ serviceConnectionPoliciesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single ServiceConnectionPolicy.

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