Skip to main content

gateways

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

Overview

Namegateways
TypeResource
Idgoogle.apigateway.gateways

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Resource name of the Gateway. Format: projects/{project}/locations/{location}/gateways/{gateway}
apiConfigstringRequired. Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}
createTimestring (google-datetime)Output only. Created time.
defaultHostnamestringOutput only. The default API Gateway host name of the form {gateway_id}-{hash}.{region_code}.gateway.dev.
displayNamestringOptional. Display name.
labelsobjectOptional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
statestringOutput only. The current state of the Gateway.
updateTimestring (google-datetime)Output only. Updated time.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, gatewaysIdGets details of a single Gateway.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists Gateways in a given project and location.
createinsertprojectsId, locationsIdgatewayIdCreates a new Gateway in a given project and location.
patchupdateprojectsId, locationsId, gatewaysIdupdateMaskUpdates the parameters of a single Gateway.
deletedeleteprojectsId, locationsId, gatewaysIdDeletes a single Gateway.

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
gatewaysIdstring
locationsIdstring
projectsIdstring
filterstring
gatewayIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single Gateway.

SELECT
name,
apiConfig,
createTime,
defaultHostname,
displayName,
labels,
state,
updateTime
FROM google.apigateway.gateways
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND gatewaysId = '{{ gatewaysId }}' -- required;

INSERT examples

Creates a new Gateway in a given project and location.

INSERT INTO google.apigateway.gateways (
data__labels,
data__displayName,
data__apiConfig,
projectsId,
locationsId,
gatewayId
)
SELECT
'{{ labels }}',
'{{ displayName }}',
'{{ apiConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ gatewayId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single Gateway.

UPDATE google.apigateway.gateways
SET
data__labels = '{{ labels }}',
data__displayName = '{{ displayName }}',
data__apiConfig = '{{ apiConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND gatewaysId = '{{ gatewaysId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single Gateway.

DELETE FROM google.apigateway.gateways
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND gatewaysId = '{{ gatewaysId }}' --required;