APIhub
import { APIhub } from "https://googleapis.deno.dev/v1/apihub:v1.ts";
§Properties
§Methods
Provisions instance resources for the API Hub.
Required. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}
Deletes the API hub instance.
Required. The name of the Api Hub instance to delete. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}
.
Gets details of a single API Hub instance.
Required. The name of the Api Hub instance to retrieve. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}
.
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.
Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}
Create an API resource in the API hub. Once an API resource is created, versions can be added to it.
Required. The parent resource for the API resource. Format: projects/{project}/locations/{location}
Delete an API resource in the API hub. API can only be deleted if all underlying versions are deleted.
Required. The name of the API resource to delete. Format: projects/{project}/locations/{location}/apis/{api}
Get API resource details including the API versions contained in it.
Required. The name of the API resource to retrieve. Format: projects/{project}/locations/{location}/apis/{api}
List API resources in the API hub.
Required. The parent, which owns this collection of API resources. Format: projects/{project}/locations/{location}
Update an API resource in the API hub. The following fields in the API can be updated: * display_name * description * owner * documentation * target_user * team * business_unit * maturity_level * api_style * attributes The update_mask should be used to specify the fields being updated. Updating the owner field requires complete owner message and updates both owner and email fields.
Identifier. The name of the API resource in the API Hub. Format: projects/{project}/locations/{location}/apis/{api}
Create an API version for an API resource in the API hub.
Required. The parent resource for API version. Format: projects/{project}/locations/{location}/apis/{api}
Get details about a definition in an API version.
Required. The name of the definition to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}
Delete an API version. Version can only be deleted if all underlying specs, operations, definitions and linked deployments are deleted.
Required. The name of the version to delete. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
Get details about the API version of an API resource. This will include information about the specs and operations present in the API version as well as the deployments linked to it.
Required. The name of the API version to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
List API versions of an API resource in the API hub.
Required. The parent which owns this collection of API versions i.e., the API resource Format: projects/{project}/locations/{location}/apis/{api}
Create an apiOperation in an API version. An apiOperation can be created only if the version has no apiOperations which were created by parsing a spec.
Required. The parent resource for the operation resource. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
Delete an operation in an API version and we can delete only the operations created via create API. If the operation was created by parsing the spec, then it can be deleted by editing or deleting the spec.
Required. The name of the operation resource to delete. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}
Get details about a particular operation in API version.
Required. The name of the operation to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}
List operations in an API version.
Required. The parent which owns this collection of operations i.e., the API version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
Update an operation in an API version. The following fields in the ApiOperation resource can be updated: * details.description * details.documentation * details.http_operation.path * details.http_operation.method * details.deprecated * attributes The update_mask should be used to specify the fields being updated. An operation can be updated only if the operation was created via CreateApiOperation API. If the operation was created by parsing the spec, then it can be edited by updating the spec.
Identifier. The name of the operation. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}
Update API version. The following fields in the version can be updated currently: * display_name * description * documentation * deployments * lifecycle * compliance * accreditation * attributes The update_mask should be used to specify the fields being updated.
Identifier. The name of the version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
Add a spec to an API version in the API hub. Multiple specs can be added
to an API version. Note, while adding a spec, at least one of contents
or
source_uri
must be provided. If contents
is provided, then spec_type
must also be provided. On adding a spec with contents to the version, the
operations present in it will be added to the version.Note that the file
contents in the spec should be of the same type as defined in the
projects/{project}/locations/{location}/attributes/system-spec-type
attribute associated with spec resource. Note that specs of various types
can be uploaded, however parsing of details is supported for OpenAPI spec
currently. In order to access the information parsed from the spec, use the
GetSpec method. In order to access the raw contents for a particular spec,
use the GetSpecContents method. In order to access the operations parsed
from the spec, use the ListAPIOperations method.
Required. The parent resource for Spec. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
Delete a spec. Deleting a spec will also delete the associated operations from the version.
Required. The name of the spec to delete. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Get details about the information parsed from a spec. Note that this method does not return the raw spec contents. Use GetSpecContents method to retrieve the same.
Required. The name of the spec to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Get spec contents.
Required. The name of the spec whose contents need to be retrieved. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Lints the requested spec and updates the corresponding API Spec with the lint response. This lint response will be available in all subsequent Get and List Spec calls to Core service.
Required. The name of the spec to be linted. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
List specs corresponding to a particular API resource.
Required. The parent, which owns this collection of specs. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
Update spec. The following fields in the spec can be updated: * display_name * source_uri * lint_response * attributes * contents * spec_type In case of an OAS spec, updating spec contents can lead to: 1. Creation, deletion and update of operations. 2. Creation, deletion and update of definitions. 3. Update of other info parsed out from the new spec. In case of contents or source_uri being present in update mask, spec_type must also be present. Also, spec_type can not be present in update mask if contents or source_uri is not present. The update_mask should be used to specify the fields being updated.
Identifier. The name of the spec. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Create a user defined attribute. Certain pre defined attributes are
already created by the API hub. These attributes will have type as
SYSTEM_DEFINED
and can be listed via ListAttributes method. Allowed
values for the same can be updated via UpdateAttribute method.
Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}
Delete an attribute. Note: System defined attributes cannot be deleted. All associations of the attribute being deleted with any API hub resource will also get deleted.
Required. The name of the attribute to delete. Format: projects/{project}/locations/{location}/attributes/{attribute}
Get details about the attribute.
Required. The name of the attribute to retrieve. Format: projects/{project}/locations/{location}/attributes/{attribute}
List all attributes.
Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}
Update the attribute. The following fields in the Attribute resource can be updated: * display_name The display name can be updated for user defined attributes only. * description The description can be updated for user defined attributes only. * allowed_values To update the list of allowed values, clients need to use the fetched list of allowed values and add or remove values to or from the same list. The mutable allowed values can be updated for both user defined and System defined attributes. The immutable allowed values cannot be updated or deleted. The updated list of allowed values cannot be empty. If an allowed value that is already used by some resource's attribute is deleted, then the association between the resource and the attribute value will also be deleted. * cardinality The cardinality can be updated for user defined attributes only. Cardinality can only be increased during an update. The update_mask should be used to specify the fields being updated.
Identifier. The name of the attribute in the API Hub. Format: projects/{project}/locations/{location}/attributes/{attribute}
Collect API data from a source and push it to Hub's collect layer.
Required. The regional location of the API hub instance and its resources. Format: projects/{project}/locations/{location}
Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.
Required. The parent resource for the curation resource. Format: projects/{project}/locations/{location}
Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.
Required. The name of the curation resource to delete. Format: projects/{project}/locations/{location}/curations/{curation}
Get curation resource details.
Required. The name of the curation resource to retrieve. Format: projects/{project}/locations/{location}/curations/{curation}
List curation resources in the API hub.
Required. The parent, which owns this collection of curation resources. Format: projects/{project}/locations/{location}
Update a curation resource in the API hub. The following fields in the curation can be updated: * display_name * description The update_mask should be used to specify the fields being updated.
Identifier. The name of the curation. Format: projects/{project}/locations/{location}/curations/{curation}
Create a dependency between two entities in the API hub.
Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}
Get details about a dependency resource in the API hub.
Required. The name of the dependency resource to retrieve. Format: projects/{project}/locations/{location}/dependencies/{dependency}
List dependencies based on the provided filter and pagination parameters.
Required. The parent which owns this collection of dependency resources. Format: projects/{project}/locations/{location}
Update a dependency based on the update_mask provided in the request. The following fields in the dependency can be updated: * description
Identifier. The name of the dependency in the API Hub. Format: projects/{project}/locations/{location}/dependencies/{dependency}
Create a deployment resource in the API hub. Once a deployment resource is created, it can be associated with API versions.
Required. The parent resource for the deployment resource. Format: projects/{project}/locations/{location}
Get details about a deployment and the API versions linked to it.
Required. The name of the deployment resource to retrieve. Format: projects/{project}/locations/{location}/deployments/{deployment}
List deployment resources in the API hub.
Required. The parent, which owns this collection of deployment resources. Format: projects/{project}/locations/{location}
Update a deployment resource in the API hub. The following fields in the deployment resource can be updated: * display_name * description * documentation * deployment_type * resource_uri * endpoints * slo * environment * attributes The update_mask should be used to specify the fields being updated.
Identifier. The name of the deployment. Format: projects/{project}/locations/{location}/deployments/{deployment}
Create an External API resource in the API hub.
Required. The parent resource for the External API resource. Format: projects/{project}/locations/{location}
Get details about an External API resource in the API hub.
Required. The name of the External API resource to retrieve. Format: projects/{project}/locations/{location}/externalApis/{externalApi}
List External API resources in the API hub.
Required. The parent, which owns this collection of External API resources. Format: projects/{project}/locations/{location}
Update an External API resource in the API hub. The following fields can be updated: * display_name * description * documentation * endpoints * paths The update_mask should be used to specify the fields being updated.
Identifier. Format: projects/{project}/locations/{location}/externalApi/{externalApi}
.
Gets information about a location.
Resource name for the location.
Create a host project registration. A Google cloud project can be registered as a host project if it is not attached as a runtime project to another host project. A project can be registered as a host project only once. Subsequent register calls for the same project will fail.
Required. The parent resource for the host project. Format: projects/{project}/locations/{location}
Get a host project registration.
Required. Host project registration resource name. projects/{project}/locations/{location}/hostProjectRegistrations/{host_project_registration_id}
Lists information about the supported locations for this service.
The resource that owns the locations collection, if applicable.
Look up a runtime project attachment. This API can be called in the context of any project.
Required. Runtime project ID to look up runtime project attachment for. Lookup happens across all regions. Expected format: projects/{project}/locations/{location}
.
Starts asynchronous cancellation on a long-running operation. The server
makes a best effort to cancel the operation, but success is not guaranteed.
If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
. Clients can use Operations.GetOperation or
other methods to check whether the cancellation succeeded or whether the
operation completed despite cancellation. On successful cancellation, the
operation is not deleted; instead, it becomes an operation with an
Operation.error value with a google.rpc.Status.code of 1
, corresponding
to Code.CANCELLED
.
The name of the operation resource to be cancelled.
Deletes a long-running operation. This method indicates that the client is
no longer interested in the operation result. It does not cancel the
operation. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
The name of the operation resource to be deleted.
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
The name of the operation resource.
Lists operations that match the specified filter in the request. If the
server doesn't support this method, it returns UNIMPLEMENTED
.
The name of the operation's parent resource.
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.
Required. The parent resource where this plugin will be created. Format: projects/{project}/locations/{location}
.
Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.
Required. The name of the Plugin resource to delete. Format: projects/{project}/locations/{location}/plugins/{plugin}
Disables a plugin. The state
of the plugin after disabling is DISABLED
Required. The name of the plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}
.
Enables a plugin. The state
of the plugin after enabling is ENABLED
Required. The name of the plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}
.
Get an API Hub plugin.
Required. The name of the plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}
.
Get the style guide being used for linting.
Required. The name of the spec to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide
.
Creates a Plugin instance in the API hub.
Required. The parent of the plugin instance resource. Format: projects/{project}/locations/{location}/plugins/{plugin}
Deletes a plugin instance in the API hub.
Required. The name of the plugin instance to delete. Format: projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
.
Disables a plugin instance in the API hub.
Required. The name of the plugin instance to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
Enables a plugin instance in the API hub.
Required. The name of the plugin instance to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
Executes a plugin instance in the API hub.
Required. The name of the plugin instance to execute. Format: projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
Get an API Hub plugin instance.
Required. The name of the plugin instance to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}
List all the plugins in a given project and location. -
can be used as
wildcard value for {plugin_id}
Required. The parent resource where this plugin will be created. Format: projects/{project}/locations/{location}/plugins/{plugin}
. To list plugin instances for multiple plugins, use the - character instead of the plugin ID.
List all the plugins in a given project and location.
Required. The parent resource where this plugin will be created. Format: projects/{project}/locations/{location}
.
Get the contents of the style guide.
Required. The name of the StyleGuide whose contents need to be retrieved. There is exactly one style guide resource per project per location. The expected format is projects/{project}/locations/{location}/plugins/{plugin}/styleGuide
.
Update the styleGuide to be used for liniting in by API hub.
Identifier. The name of the style guide. Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide
Attaches a runtime project to the host project.
Required. The parent resource for the Runtime Project Attachment. Format: projects/{project}/locations/{location}
Delete a runtime project attachment in the API Hub. This call will detach the runtime project from the host project.
Required. The name of the Runtime Project Attachment to delete. Format: projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}
Gets a runtime project attachment.
Required. The name of the API resource to retrieve. Format: projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}
List runtime projects attached to the host project.
Required. The parent, which owns this collection of runtime project attachments. Format: projects/{project}/locations/{location}
Search across API-Hub resources.
Required. The resource name of the location which will be of the type projects/{project_id}/locations/{location_id}
. This field is used to identify the instance of API-Hub in which resources should be searched.