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
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 |
description | string | A description of this resource. |
createTime | string | Output only. Time when the ServiceConnectionMap was created. |
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. |
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. |
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 | Output only. Time when the ServiceConnectionMap was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, serviceConnectionPoliciesId | Gets details of a single ServiceConnectionPolicy. |
list | SELECT | locationsId, projectsId | Lists ServiceConnectionPolicies in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new ServiceConnectionPolicy in a given project and location. |
delete | DELETE | locationsId, projectsId, serviceConnectionPoliciesId | Deletes a single ServiceConnectionPolicy. |
patch | UPDATE | locationsId, projectsId, serviceConnectionPoliciesId | Updates 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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: description
value: string
- name: network
value: string
- name: serviceClass
value: string
- name: infrastructure
value: string
- name: pscConfig
value:
- name: subnetworks
value:
- string
- name: limit
value: string
- name: producerInstanceLocation
value: string
- name: allowedGoogleProducersResourceHierarchyLevel
value:
- string
- name: pscConnections
value:
- - name: state
value: string
- name: consumerForwardingRule
value: string
- name: consumerAddress
value: string
- name: errorType
value: string
- name: error
value:
- name: code
value: integer
- name: message
value: string
- name: details
value:
- object
- name: gceOperation
value: string
- name: consumerTargetProject
value: string
- name: pscConnectionId
value: string
- name: errorInfo
value:
- name: reason
value: string
- name: domain
value: string
- name: metadata
value: object
- name: selectedSubnetwork
value: string
- name: producerInstanceId
value: string
- name: etag
value: string
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 }}';