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

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

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, serviceConnectionPoliciesIdGets details of a single ServiceConnectionPolicy.
listSELECTlocationsId, projectsIdLists ServiceConnectionPolicies in a given project and location.
createINSERTlocationsId, projectsIdCreates a new ServiceConnectionPolicy in a given project and location.
deleteDELETElocationsId, projectsId, serviceConnectionPoliciesIdDeletes a single ServiceConnectionPolicy.
patchUPDATElocationsId, projectsId, serviceConnectionPoliciesIdUpdates the parameters of a single ServiceConnectionPolicy.

SELECT examples

Lists ServiceConnectionPolicies in a given project and location.

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

INSERT example

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

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

UPDATE example

Updates a service_connection_policies resource.

/*+ update */
UPDATE google.networkconnectivity.service_connection_policies
SET
name = '{{ name }}',
labels = '{{ labels }}',
description = '{{ description }}',
network = '{{ network }}',
serviceClass = '{{ serviceClass }}',
pscConfig = '{{ pscConfig }}',
etag = '{{ etag }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND serviceConnectionPoliciesId = '{{ serviceConnectionPoliciesId }}';

DELETE example

Deletes the specified service_connection_policies resource.

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