Skip to main content

connectors

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

Overview

Nameconnectors
TypeResource
Idgoogle.vpcaccess.connectors

Fields

NameDatatypeDescription
namestringThe resource name in the format projects/*/locations/*/connectors/*.
connectedProjectsarrayOutput only. List of projects using the connector.
ipCidrRangestringOptional. The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machineTypestringMachine type of VM Instance underlying connector. Default is e2-micro
maxInstancesintegerMaximum value of instances in autoscaling group underlying the connector.
maxThroughputintegerMaximum throughput of the connector in Mbps. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by --min-throughput. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput. The use of max-throughput is discouraged in favor of max-instances.
minInstancesintegerMinimum value of instances in autoscaling group underlying the connector.
minThroughputintegerMinimum throughput of the connector in Mbps. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by --max-throughput. If both min-throughput and min-instances are provided, min-instances takes precedence over min-throughput. The use of min-throughput is discouraged in favor of min-instances.
networkstringOptional. Name of a VPC network.
statestringOutput only. State of the VPC access connector.
subnetobjectThe subnet in which to house the connector

Methods

NameAccessible byRequired ParamsDescription
getSELECTconnectorsId, locationsId, projectsIdGets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
listSELECTlocationsId, projectsIdLists Serverless VPC Access connectors.
createINSERTlocationsId, projectsIdCreates a Serverless VPC Access connector, returns an operation.
deleteDELETEconnectorsId, locationsId, projectsIdDeletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
patchUPDATEconnectorsId, locationsId, projectsIdUpdates a Serverless VPC Access connector, returns an operation.

SELECT examples

Lists Serverless VPC Access connectors.

SELECT
name,
connectedProjects,
ipCidrRange,
machineType,
maxInstances,
maxThroughput,
minInstances,
minThroughput,
network,
state,
subnet
FROM google.vpcaccess.connectors
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.vpcaccess.connectors (
locationsId,
projectsId,
name,
network,
ipCidrRange,
minThroughput,
maxThroughput,
subnet,
machineType,
minInstances,
maxInstances
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ network }}',
'{{ ipCidrRange }}',
'{{ minThroughput }}',
'{{ maxThroughput }}',
'{{ subnet }}',
'{{ machineType }}',
'{{ minInstances }}',
'{{ maxInstances }}'
;

UPDATE example

Updates a connectors resource.

/*+ update */
UPDATE google.vpcaccess.connectors
SET
name = '{{ name }}',
network = '{{ network }}',
ipCidrRange = '{{ ipCidrRange }}',
minThroughput = '{{ minThroughput }}',
maxThroughput = '{{ maxThroughput }}',
subnet = '{{ subnet }}',
machineType = '{{ machineType }}',
minInstances = '{{ minInstances }}',
maxInstances = '{{ maxInstances }}'
WHERE
connectorsId = '{{ connectorsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified connectors resource.

/*+ delete */
DELETE FROM google.vpcaccess.connectors
WHERE connectorsId = '{{ connectorsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';