Skip to main content

connectors

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

Overview

Nameconnectors
TypeResource
Idgoogle.vpcaccess.connectors

Fields

The following fields are returned by SELECT queries:

Successful response

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
maxInstancesinteger (int32)Maximum value of instances in autoscaling group underlying the connector.
maxThroughputinteger (int32)Maximum 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.
minInstancesinteger (int32)Minimum value of instances in autoscaling group underlying the connector.
minThroughputinteger (int32)Minimum 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.
subnetobjectOptional. The subnet in which to house the VPC Access Connector. (id: Subnet)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, connectorsIdGets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.
listselectprojectsId, locationsIdpageSize, pageTokenLists Serverless VPC Access connectors.
createinsertprojectsId, locationsIdconnectorIdCreates a Serverless VPC Access connector, returns an operation.
patchupdateprojectsId, locationsId, connectorsIdupdateMaskUpdates a Serverless VPC Access connector, returns an operation.
deletedeleteprojectsId, locationsId, connectorsIdDeletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.

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.

NameDatatypeDescription
connectorsIdstring
locationsIdstring
projectsIdstring
connectorIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.

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

INSERT examples

Creates a Serverless VPC Access connector, returns an operation.

INSERT INTO google.vpcaccess.connectors (
data__name,
data__network,
data__ipCidrRange,
data__minThroughput,
data__maxThroughput,
data__subnet,
data__machineType,
data__minInstances,
data__maxInstances,
projectsId,
locationsId,
connectorId
)
SELECT
'{{ name }}',
'{{ network }}',
'{{ ipCidrRange }}',
{{ minThroughput }},
{{ maxThroughput }},
'{{ subnet }}',
'{{ machineType }}',
{{ minInstances }},
{{ maxInstances }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectorId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a Serverless VPC Access connector, returns an operation.

UPDATE google.vpcaccess.connectors
SET
data__name = '{{ name }}',
data__network = '{{ network }}',
data__ipCidrRange = '{{ ipCidrRange }}',
data__minThroughput = {{ minThroughput }},
data__maxThroughput = {{ maxThroughput }},
data__subnet = '{{ subnet }}',
data__machineType = '{{ machineType }}',
data__minInstances = {{ minInstances }},
data__maxInstances = {{ maxInstances }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectorsId = '{{ connectorsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.

DELETE FROM google.vpcaccess.connectors
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectorsId = '{{ connectorsId }}' --required;