apis
Creates, updates, deletes, gets or lists a apis
resource.
Overview
Name | apis |
Type | Resource |
Id | google.apigateway.apis |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api} |
createTime | string | Output only. Created time. |
displayName | string | Optional. Display name. |
labels | object | Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources |
managedService | string | Optional. 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. |
state | string | Output only. State of the API. |
updateTime | string | Output only. Updated time. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | apisId, locationsId, projectsId | Gets details of a single Api. |
list | SELECT | locationsId, projectsId | Lists Apis in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new Api in a given project and location. |
delete | DELETE | apisId, locationsId, projectsId | Deletes a single Api. |
patch | UPDATE | apisId, locationsId, projectsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.apigateway.apis (
locationsId,
projectsId,
labels,
displayName,
managedService
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ labels }}',
'{{ displayName }}',
'{{ managedService }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: displayName
value: string
- name: managedService
value: string
- name: state
value: string
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 }}';