Skip to main content

dependencies

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

Overview

Namedependencies
TypeResource
Idgoogle.apihub.dependencies

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the dependency in the API Hub. Format: projects/{project}/locations/{location}/dependencies/{dependency}
attributesobjectOptional. 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.
consumerobjectRequired. Immutable. The entity acting as the consumer in the dependency. (id: GoogleCloudApihubV1DependencyEntityReference)
createTimestring (google-datetime)Output only. The time at which the dependency was created.
descriptionstringOptional. Human readable description corresponding of the dependency.
discoveryModestringOutput only. Discovery mode of the dependency.
errorDetailobjectOutput only. Error details of a dependency if the system has detected it internally. (id: GoogleCloudApihubV1DependencyErrorDetail)
statestringOutput only. State of the dependency.
supplierobjectRequired. Immutable. The entity acting as the supplier in the dependency. (id: GoogleCloudApihubV1DependencyEntityReference)
updateTimestring (google-datetime)Output only. The time at which the dependency was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, dependenciesIdGet details about a dependency resource in the API hub.
listselectprojectsId, locationsIdfilter, pageSize, pageTokenList dependencies based on the provided filter and pagination parameters.
createinsertprojectsId, locationsIddependencyIdCreate a dependency between two entities in the API hub.
patchupdateprojectsId, locationsId, dependenciesIdupdateMaskUpdate a dependency based on the update_mask provided in the request. The following fields in the dependency can be updated: * description
deletedeleteprojectsId, locationsId, dependenciesIdDelete 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.

NameDatatypeDescription
dependenciesIdstring
locationsIdstring
projectsIdstring
dependencyIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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 the dependency resource.

DELETE FROM google.apihub.dependencies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dependenciesId = '{{ dependenciesId }}' --required;