service_connection_policies
Creates, updates, deletes, gets or lists a service_connection_policies resource.
Overview
| Name | service_connection_policies |
| Type | Resource |
| Id | google.networkconnectivity.service_connection_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names |
autoCreatedSubnetInfo | object | Output only. Information for the automatically created subnetwork and its associated IR. (id: AutoCreatedSubnetworkInfo) |
createTime | string (google-datetime) | Output only. Time when the ServiceConnectionPolicy was created. |
description | string | A description of this resource. |
etag | string | Optional. 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. |
infrastructure | string | Output only. The type of underlying resources used to create the connection. (INFRASTRUCTURE_UNSPECIFIED, PSC) |
labels | object | User-defined labels. |
network | string | The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}. |
pscConfig | object | Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. (id: PscConfig) |
pscConnections | array | Output only. [Output only] Information about each Private Service Connect connection. |
serviceClass | string | The 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. |
updateTime | string (google-datetime) | Output only. Time when the ServiceConnectionPolicy was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names |
autoCreatedSubnetInfo | object | Output only. Information for the automatically created subnetwork and its associated IR. (id: AutoCreatedSubnetworkInfo) |
createTime | string (google-datetime) | Output only. Time when the ServiceConnectionPolicy was created. |
description | string | A description of this resource. |
etag | string | Optional. 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. |
infrastructure | string | Output only. The type of underlying resources used to create the connection. (INFRASTRUCTURE_UNSPECIFIED, PSC) |
labels | object | User-defined labels. |
network | string | The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}. |
pscConfig | object | Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. (id: PscConfig) |
pscConnections | array | Output only. [Output only] Information about each Private Service Connect connection. |
serviceClass | string | The 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. |
updateTime | string (google-datetime) | Output only. Time when the ServiceConnectionPolicy was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, serviceConnectionPoliciesId | Gets details of a single ServiceConnectionPolicy. | |
list | select | projectsId, locationsId | pageSize, pageToken, filter, orderBy | Lists ServiceConnectionPolicies in a given project and location. |
create | insert | projectsId, locationsId | requestId, autoSubnetworkConfig.allocRangeSpace, subnetworkMode, autoSubnetworkConfig.ipStack, autoSubnetworkConfig.prefixLength, serviceConnectionPolicyId | Creates a new ServiceConnectionPolicy in a given project and location. |
patch | update | projectsId, locationsId, serviceConnectionPoliciesId | requestId, updateMask | Updates the parameters of a single ServiceConnectionPolicy. |
delete | delete | projectsId, locationsId, serviceConnectionPoliciesId | etag, requestId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
locationsId | string | |
projectsId | string | |
serviceConnectionPoliciesId | string | |
autoSubnetworkConfig.allocRangeSpace | string | |
autoSubnetworkConfig.ipStack | string | |
autoSubnetworkConfig.prefixLength | integer (int32) | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
serviceConnectionPolicyId | string | |
subnetworkMode | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single ServiceConnectionPolicy.
SELECT
name,
autoCreatedSubnetInfo,
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
;
Lists ServiceConnectionPolicies in a given project and location.
SELECT
name,
autoCreatedSubnetInfo,
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- create
- Manifest
Creates a new ServiceConnectionPolicy in a given project and location.
INSERT INTO google.networkconnectivity.service_connection_policies (
data__name,
data__network,
data__pscConfig,
data__description,
data__labels,
data__serviceClass,
data__etag,
projectsId,
locationsId,
requestId,
autoSubnetworkConfig.allocRangeSpace,
subnetworkMode,
autoSubnetworkConfig.ipStack,
autoSubnetworkConfig.prefixLength,
serviceConnectionPolicyId
)
SELECT
'{{ name }}',
'{{ network }}',
'{{ pscConfig }}',
'{{ description }}',
'{{ labels }}',
'{{ serviceClass }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ autoSubnetworkConfig.allocRangeSpace }}',
'{{ subnetworkMode }}',
'{{ autoSubnetworkConfig.ipStack }}',
'{{ autoSubnetworkConfig.prefixLength }}',
'{{ serviceConnectionPolicyId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: service_connection_policies
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the service_connection_policies resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the service_connection_policies resource.
- name: name
value: "{{ name }}"
description: |
Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- name: network
value: "{{ network }}"
description: |
The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- name: pscConfig
description: |
Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.
value:
limit: "{{ limit }}"
producerInstanceLocation: "{{ producerInstanceLocation }}"
allowedGoogleProducersResourceHierarchyLevel:
- "{{ allowedGoogleProducersResourceHierarchyLevel }}"
subnetworks:
- "{{ subnetworks }}"
- name: description
value: "{{ description }}"
description: |
A description of this resource.
- name: labels
value: "{{ labels }}"
description: |
User-defined labels.
- name: serviceClass
value: "{{ serviceClass }}"
description: |
The 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.
- name: etag
value: "{{ etag }}"
description: |
Optional. 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.
- name: requestId
value: "{{ requestId }}"
- name: autoSubnetworkConfig.allocRangeSpace
value: "{{ autoSubnetworkConfig.allocRangeSpace }}"
- name: subnetworkMode
value: "{{ subnetworkMode }}"
- name: autoSubnetworkConfig.ipStack
value: "{{ autoSubnetworkConfig.ipStack }}"
- name: autoSubnetworkConfig.prefixLength
value: "{{ autoSubnetworkConfig.prefixLength }}"
- name: serviceConnectionPolicyId
value: "{{ serviceConnectionPolicyId }}"
UPDATE examples
- patch
Updates the parameters of a single ServiceConnectionPolicy.
UPDATE google.networkconnectivity.service_connection_policies
SET
data__name = '{{ name }}',
data__network = '{{ network }}',
data__pscConfig = '{{ pscConfig }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__serviceClass = '{{ serviceClass }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceConnectionPoliciesId = '{{ serviceConnectionPoliciesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single ServiceConnectionPolicy.
DELETE FROM google.networkconnectivity.service_connection_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND serviceConnectionPoliciesId = '{{ serviceConnectionPoliciesId }}' --required
AND etag = '{{ etag }}'
AND requestId = '{{ requestId }}'
;