dependencies
Creates, updates, deletes, gets or lists a dependencies
resource.
Overview
Name | dependencies |
Type | Resource |
Id | google.apihub.dependencies |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the dependency in the API Hub. Format: projects/{project}/locations/{location}/dependencies/{dependency} |
attributes | object | Optional. The list of user defined attributes associated with the dependency resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute} . The value is the attribute values associated with the resource. |
consumer | object | Required. Immutable. The entity acting as the consumer in the dependency. (id: GoogleCloudApihubV1DependencyEntityReference) |
createTime | string (google-datetime) | Output only. The time at which the dependency was created. |
description | string | Optional. Human readable description corresponding of the dependency. |
discoveryMode | string | Output only. Discovery mode of the dependency. |
errorDetail | object | Output only. Error details of a dependency if the system has detected it internally. (id: GoogleCloudApihubV1DependencyErrorDetail) |
state | string | Output only. State of the dependency. |
supplier | object | Required. Immutable. The entity acting as the supplier in the dependency. (id: GoogleCloudApihubV1DependencyEntityReference) |
updateTime | string (google-datetime) | Output only. The time at which the dependency was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the dependency in the API Hub. Format: projects/{project}/locations/{location}/dependencies/{dependency} |
attributes | object | Optional. The list of user defined attributes associated with the dependency resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute} . The value is the attribute values associated with the resource. |
consumer | object | Required. Immutable. The entity acting as the consumer in the dependency. (id: GoogleCloudApihubV1DependencyEntityReference) |
createTime | string (google-datetime) | Output only. The time at which the dependency was created. |
description | string | Optional. Human readable description corresponding of the dependency. |
discoveryMode | string | Output only. Discovery mode of the dependency. |
errorDetail | object | Output only. Error details of a dependency if the system has detected it internally. (id: GoogleCloudApihubV1DependencyErrorDetail) |
state | string | Output only. State of the dependency. |
supplier | object | Required. Immutable. The entity acting as the supplier in the dependency. (id: GoogleCloudApihubV1DependencyEntityReference) |
updateTime | string (google-datetime) | Output only. The time at which the dependency was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , dependenciesId | Get details about a dependency resource in the API hub. | |
list | select | projectsId , locationsId | filter , pageSize , pageToken | List dependencies based on the provided filter and pagination parameters. |
create | insert | projectsId , locationsId | dependencyId | Create a dependency between two entities in the API hub. |
patch | update | projectsId , locationsId , dependenciesId | updateMask | Update a dependency based on the update_mask provided in the request. The following fields in the dependency can be updated: * description |
delete | delete | projectsId , locationsId , dependenciesId | Delete the dependency resource. |
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 |
---|---|---|
dependenciesId | string | |
locationsId | string | |
projectsId | string | |
dependencyId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get details about a dependency resource in the API hub.
SELECT
name,
attributes,
consumer,
createTime,
description,
discoveryMode,
errorDetail,
state,
supplier,
updateTime
FROM google.apihub.dependencies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dependenciesId = '{{ dependenciesId }}' -- required;
List dependencies based on the provided filter and pagination parameters.
SELECT
name,
attributes,
consumer,
createTime,
description,
discoveryMode,
errorDetail,
state,
supplier,
updateTime
FROM google.apihub.dependencies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Create a dependency between two entities in the API hub.
INSERT INTO google.apihub.dependencies (
data__name,
data__consumer,
data__supplier,
data__description,
data__attributes,
projectsId,
locationsId,
dependencyId
)
SELECT
'{{ name }}',
'{{ consumer }}',
'{{ supplier }}',
'{{ description }}',
'{{ attributes }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dependencyId }}'
RETURNING
name,
attributes,
consumer,
createTime,
description,
discoveryMode,
errorDetail,
state,
supplier,
updateTime
;
# Description fields are for documentation purposes
- name: dependencies
props:
- name: projectsId
value: string
description: Required parameter for the dependencies resource.
- name: locationsId
value: string
description: Required parameter for the dependencies resource.
- name: name
value: string
description: >
Identifier. The name of the dependency in the API Hub. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`
- name: consumer
value: object
description: >
Required. Immutable. The entity acting as the consumer in the dependency.
- name: supplier
value: object
description: >
Required. Immutable. The entity acting as the supplier in the dependency.
- name: description
value: string
description: >
Optional. Human readable description corresponding of the dependency.
- name: attributes
value: object
description: >
Optional. The list of user defined attributes associated with the dependency resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource.
- name: dependencyId
value: string
UPDATE
examples
- patch
Update a dependency based on the update_mask provided in the request. The following fields in the dependency can be updated: * description
UPDATE google.apihub.dependencies
SET
data__name = '{{ name }}',
data__consumer = '{{ consumer }}',
data__supplier = '{{ supplier }}',
data__description = '{{ description }}',
data__attributes = '{{ attributes }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dependenciesId = '{{ dependenciesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
attributes,
consumer,
createTime,
description,
discoveryMode,
errorDetail,
state,
supplier,
updateTime;
DELETE
examples
- delete
Delete the dependency resource.
DELETE FROM google.apihub.dependencies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dependenciesId = '{{ dependenciesId }}' --required;