Skip to main content

apis

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

Overview

Nameapis
TypeResource
Idgoogle.apigateway.apis

Fields

NameDatatypeDescription
namestringOutput only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
createTimestringOutput only. Created time.
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
managedServicestringOptional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
statestringOutput only. State of the API.
updateTimestringOutput only. Updated time.

Methods

NameAccessible byRequired ParamsDescription
getSELECTapisId, locationsId, projectsIdGets details of a single Api.
listSELECTlocationsId, projectsIdLists Apis in a given project and location.
createINSERTlocationsId, projectsIdCreates a new Api in a given project and location.
deleteDELETEapisId, locationsId, projectsIdDeletes a single Api.
patchUPDATEapisId, locationsId, projectsIdUpdates the parameters of a single Api.

SELECT examples

Lists Apis in a given project and location.

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

INSERT example

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

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

UPDATE example

Updates a apis resource.

/*+ update */
UPDATE google.apigateway.apis
SET
labels = '{{ labels }}',
displayName = '{{ displayName }}',
managedService = '{{ managedService }}'
WHERE
apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified apis resource.

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