Skip to main content

gateways

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

Overview

Namegateways
TypeResource
Idgoogle.apigateway.gateways

Fields

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}
createTimestringOutput 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.
updateTimestringOutput only. Updated time.

Methods

NameAccessible byRequired ParamsDescription
getSELECTgatewaysId, locationsId, projectsIdGets details of a single Gateway.
listSELECTlocationsId, projectsIdLists Gateways in a given project and location.
createINSERTlocationsId, projectsIdCreates a new Gateway in a given project and location.
deleteDELETEgatewaysId, locationsId, projectsIdDeletes a single Gateway.
patchUPDATEgatewaysId, locationsId, projectsIdUpdates the parameters of a single Gateway.

SELECT examples

Lists Gateways in a given project and location.

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

INSERT example

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

/*+ create */
INSERT INTO google.apigateway.gateways (
locationsId,
projectsId,
labels,
displayName,
apiConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ labels }}',
'{{ displayName }}',
'{{ apiConfig }}'
;

UPDATE example

Updates a gateways resource.

/*+ update */
UPDATE google.apigateway.gateways
SET
labels = '{{ labels }}',
displayName = '{{ displayName }}',
apiConfig = '{{ apiConfig }}'
WHERE
gatewaysId = '{{ gatewaysId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified gateways resource.

/*+ delete */
DELETE FROM google.apigateway.gateways
WHERE gatewaysId = '{{ gatewaysId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';