api_hub_instances
Creates, updates, deletes, gets or lists an api_hub_instances
resource.
Overview
Name | api_hub_instances |
Type | Resource |
Id | google.apihub.api_hub_instances |
Fields
The following fields are returned by SELECT
queries:
- get
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance} . |
config | object | Required. Config of the ApiHub instance. (id: GoogleCloudApihubV1Config) |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | Optional. Description of the ApiHub instance. |
labels | object | Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources |
state | string | Output only. The current state of the ApiHub instance. |
stateMessage | string | Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED . |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , apiHubInstancesId | Gets details of a single API Hub instance. | |
create | insert | projectsId , locationsId | apiHubInstanceId | Provisions instance resources for the API Hub. |
delete | delete | projectsId , locationsId , apiHubInstancesId | Deletes the API hub instance. | |
lookup | exec | projectsId , locationsId | Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations. |
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.
Name | Datatype | Description |
---|---|---|
apiHubInstancesId | string | |
locationsId | string | |
projectsId | string | |
apiHubInstanceId | string |
SELECT
examples
- get
Gets details of a single API Hub instance.
SELECT
name,
config,
createTime,
description,
labels,
state,
stateMessage,
updateTime
FROM google.apihub.api_hub_instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apiHubInstancesId = '{{ apiHubInstancesId }}' -- required;
INSERT
examples
- create
- Manifest
Provisions instance resources for the API Hub.
INSERT INTO google.apihub.api_hub_instances (
data__name,
data__config,
data__labels,
data__description,
projectsId,
locationsId,
apiHubInstanceId
)
SELECT
'{{ name }}',
'{{ config }}',
'{{ labels }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apiHubInstanceId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: api_hub_instances
props:
- name: projectsId
value: string
description: Required parameter for the api_hub_instances resource.
- name: locationsId
value: string
description: Required parameter for the api_hub_instances resource.
- name: name
value: string
description: >
Identifier. Format: `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
- name: config
value: object
description: >
Required. Config of the ApiHub instance.
- name: labels
value: object
description: >
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
- name: description
value: string
description: >
Optional. Description of the ApiHub instance.
- name: apiHubInstanceId
value: string
DELETE
examples
- delete
Deletes the API hub instance.
DELETE FROM google.apihub.api_hub_instances
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apiHubInstancesId = '{{ apiHubInstancesId }}' --required;
Lifecycle Methods
- lookup
Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.
EXEC google.apihub.api_hub_instances.lookup
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required;