private_connections
Creates, updates, deletes, gets or lists a private_connections
resource.
Overview
Name | private_connections |
Type | Resource |
Id | google.datamigration.private_connections |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the resource. |
createTime | string | Output only. The create time of the resource. |
displayName | string | The private connection display name. |
error | object | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. |
labels | object | The resource labels for private connections to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of "key": "value" pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } . |
state | string | Output only. The state of the private connection. |
updateTime | string | Output only. The last update time of the resource. |
vpcPeeringConfig | object | The VPC peering configuration is used to create VPC peering with the consumer's VPC. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, privateConnectionsId, projectsId | Gets details of a single private connection. |
list | SELECT | locationsId, projectsId | Retrieves a list of private connections in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new private connection in a given project and location. |
delete | DELETE | locationsId, privateConnectionsId, projectsId | Deletes a single Database Migration Service private connection. |
SELECT
examples
Retrieves a list of private connections in a given project and location.
SELECT
name,
createTime,
displayName,
error,
labels,
state,
updateTime,
vpcPeeringConfig
FROM google.datamigration.private_connections
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new private_connections
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.datamigration.private_connections (
locationsId,
projectsId,
name,
labels,
displayName,
vpcPeeringConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ displayName }}',
'{{ vpcPeeringConfig }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: displayName
value: string
- name: state
value: string
- name: error
value:
- name: code
value: integer
- name: message
value: string
- name: details
value:
- object
- name: vpcPeeringConfig
value:
- name: vpcName
value: string
- name: subnet
value: string
DELETE
example
Deletes the specified private_connections
resource.
/*+ delete */
DELETE FROM google.datamigration.private_connections
WHERE locationsId = '{{ locationsId }}'
AND privateConnectionsId = '{{ privateConnectionsId }}'
AND projectsId = '{{ projectsId }}';