API hub V1 API - Class Google::Cloud::ApiHub::V1::ApiHub::Rest::Client (v0.1.0)

Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.

REST client for the ApiHub service.

This service provides all methods related to the API hub.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the ApiHub Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all ApiHub clients
::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the ApiHub Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_api

def create_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
def create_api(parent: nil, api_id: nil, api: nil) -> ::Google::Cloud::ApiHub::V1::Api

Create an API resource in the API hub. Once an API resource is created, versions can be added to it.

Overloads
def create_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
Pass arguments to create_api via a request object, either of type CreateApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::CreateApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_api(parent: nil, api_id: nil, api: nil) -> ::Google::Cloud::ApiHub::V1::Api
Pass arguments to create_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource for the API resource. Format: projects/{project}/locations/{location}
  • api_id (::String) — Optional. The ID to use for the API resource, which will become the final component of the API's resource name. This field is optional.

    • If provided, the same will be used. The service will throw an error if the specified id is already used by another API resource in the API hub.
    • If not provided, a system generated id will be used.

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

  • api (::Google::Cloud::ApiHub::V1::Api, ::Hash) — Required. The API resource to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::CreateApiRequest.new

# Call the create_api method.
result = client.create_api request

# The returned object is of type Google::Cloud::ApiHub::V1::Api.
p result

#create_attribute

def create_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
def create_attribute(parent: nil, attribute_id: nil, attribute: nil) -> ::Google::Cloud::ApiHub::V1::Attribute

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.

Overloads
def create_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
Pass arguments to create_attribute via a request object, either of type CreateAttributeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::CreateAttributeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_attribute(parent: nil, attribute_id: nil, attribute: nil) -> ::Google::Cloud::ApiHub::V1::Attribute
Pass arguments to create_attribute via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}
  • attribute_id (::String) — Optional. The ID to use for the attribute, which will become the final component of the attribute's resource name. This field is optional.

    • If provided, the same will be used. The service will throw an error if the specified id is already used by another attribute resource in the API hub.
    • If not provided, a system generated id will be used.

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

  • attribute (::Google::Cloud::ApiHub::V1::Attribute, ::Hash) — Required. The attribute to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::CreateAttributeRequest.new

# Call the create_attribute method.
result = client.create_attribute request

# The returned object is of type Google::Cloud::ApiHub::V1::Attribute.
p result

#create_deployment

def create_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
def create_deployment(parent: nil, deployment_id: nil, deployment: nil) -> ::Google::Cloud::ApiHub::V1::Deployment

Create a deployment resource in the API hub. Once a deployment resource is created, it can be associated with API versions.

Overloads
def create_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
Pass arguments to create_deployment via a request object, either of type CreateDeploymentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::CreateDeploymentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_deployment(parent: nil, deployment_id: nil, deployment: nil) -> ::Google::Cloud::ApiHub::V1::Deployment
Pass arguments to create_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource for the deployment resource. Format: projects/{project}/locations/{location}
  • deployment_id (::String) — Optional. The ID to use for the deployment resource, which will become the final component of the deployment's resource name. This field is optional.

    • If provided, the same will be used. The service will throw an error if the specified id is already used by another deployment resource in the API hub.
    • If not provided, a system generated id will be used.

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

  • deployment (::Google::Cloud::ApiHub::V1::Deployment, ::Hash) — Required. The deployment resource to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::CreateDeploymentRequest.new

# Call the create_deployment method.
result = client.create_deployment request

# The returned object is of type Google::Cloud::ApiHub::V1::Deployment.
p result

#create_external_api

def create_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
def create_external_api(parent: nil, external_api_id: nil, external_api: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

Create an External API resource in the API hub.

Overloads
def create_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
Pass arguments to create_external_api via a request object, either of type CreateExternalApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::CreateExternalApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_external_api(parent: nil, external_api_id: nil, external_api: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
Pass arguments to create_external_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource for the External API resource. Format: projects/{project}/locations/{location}
  • external_api_id (::String) — Optional. The ID to use for the External API resource, which will become the final component of the External API's resource name. This field is optional.

    • If provided, the same will be used. The service will throw an error if the specified id is already used by another External API resource in the API hub.
    • If not provided, a system generated id will be used.

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

  • external_api (::Google::Cloud::ApiHub::V1::ExternalApi, ::Hash) — Required. The External API resource to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::CreateExternalApiRequest.new

# Call the create_external_api method.
result = client.create_external_api request

# The returned object is of type Google::Cloud::ApiHub::V1::ExternalApi.
p result

#create_spec

def create_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
def create_spec(parent: nil, spec_id: nil, spec: nil) -> ::Google::Cloud::ApiHub::V1::Spec

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.

Overloads
def create_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
Pass arguments to create_spec via a request object, either of type CreateSpecRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::CreateSpecRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_spec(parent: nil, spec_id: nil, spec: nil) -> ::Google::Cloud::ApiHub::V1::Spec
Pass arguments to create_spec via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource for Spec. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
  • spec_id (::String) — Optional. The ID to use for the spec, which will become the final component of the spec's resource name. This field is optional.

    • If provided, the same will be used. The service will throw an error if the specified id is already used by another spec in the API resource.
    • If not provided, a system generated id will be used.

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

  • spec (::Google::Cloud::ApiHub::V1::Spec, ::Hash) — Required. The spec to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::CreateSpecRequest.new

# Call the create_spec method.
result = client.create_spec request

# The returned object is of type Google::Cloud::ApiHub::V1::Spec.
p result

#create_version

def create_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
def create_version(parent: nil, version_id: nil, version: nil) -> ::Google::Cloud::ApiHub::V1::Version

Create an API version for an API resource in the API hub.

Overloads
def create_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
Pass arguments to create_version via a request object, either of type CreateVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::CreateVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_version(parent: nil, version_id: nil, version: nil) -> ::Google::Cloud::ApiHub::V1::Version
Pass arguments to create_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource for API version. Format: projects/{project}/locations/{location}/apis/{api}
  • version_id (::String) — Optional. The ID to use for the API version, which will become the final component of the version's resource name. This field is optional.

    • If provided, the same will be used. The service will throw an error if the specified id is already used by another version in the API resource.
    • If not provided, a system generated id will be used.

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

  • version (::Google::Cloud::ApiHub::V1::Version, ::Hash) — Required. The version to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::CreateVersionRequest.new

# Call the create_version method.
result = client.create_version request

# The returned object is of type Google::Cloud::ApiHub::V1::Version.
p result

#delete_api

def delete_api(request, options = nil) -> ::Google::Protobuf::Empty
def delete_api(name: nil, force: nil) -> ::Google::Protobuf::Empty

Delete an API resource in the API hub. API can only be deleted if all underlying versions are deleted.

Overloads
def delete_api(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_api via a request object, either of type DeleteApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::DeleteApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_api(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the API resource to delete. Format: projects/{project}/locations/{location}/apis/{api}
  • force (::Boolean) — Optional. If set to true, any versions from this API will also be deleted. Otherwise, the request will only work if the API has no versions.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::DeleteApiRequest.new

# Call the delete_api method.
result = client.delete_api request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_attribute

def delete_attribute(request, options = nil) -> ::Google::Protobuf::Empty
def delete_attribute(name: nil) -> ::Google::Protobuf::Empty

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.

Overloads
def delete_attribute(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_attribute via a request object, either of type DeleteAttributeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::DeleteAttributeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_attribute(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_attribute via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the attribute to delete. Format: projects/{project}/locations/{location}/attributes/{attribute}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::DeleteAttributeRequest.new

# Call the delete_attribute method.
result = client.delete_attribute request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_deployment

def delete_deployment(request, options = nil) -> ::Google::Protobuf::Empty
def delete_deployment(name: nil) -> ::Google::Protobuf::Empty

Delete a deployment resource in the API hub.

Overloads
def delete_deployment(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_deployment via a request object, either of type DeleteDeploymentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::DeleteDeploymentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_deployment(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the deployment resource to delete. Format: projects/{project}/locations/{location}/deployments/{deployment}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::DeleteDeploymentRequest.new

# Call the delete_deployment method.
result = client.delete_deployment request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_external_api

def delete_external_api(request, options = nil) -> ::Google::Protobuf::Empty
def delete_external_api(name: nil) -> ::Google::Protobuf::Empty

Delete an External API resource in the API hub.

Overloads
def delete_external_api(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_external_api via a request object, either of type DeleteExternalApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::DeleteExternalApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_external_api(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_external_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the External API resource to delete. Format: projects/{project}/locations/{location}/externalApis/{externalApi}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::DeleteExternalApiRequest.new

# Call the delete_external_api method.
result = client.delete_external_api request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_spec

def delete_spec(request, options = nil) -> ::Google::Protobuf::Empty
def delete_spec(name: nil) -> ::Google::Protobuf::Empty

Delete a spec. Deleting a spec will also delete the associated operations from the version.

Overloads
def delete_spec(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_spec via a request object, either of type DeleteSpecRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::DeleteSpecRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_spec(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_spec via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the spec to delete. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::DeleteSpecRequest.new

# Call the delete_spec method.
result = client.delete_spec request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_version

def delete_version(request, options = nil) -> ::Google::Protobuf::Empty
def delete_version(name: nil, force: nil) -> ::Google::Protobuf::Empty

Delete an API version. Version can only be deleted if all underlying specs, operations, definitions and linked deployments are deleted.

Overloads
def delete_version(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_version via a request object, either of type DeleteVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::DeleteVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_version(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the version to delete. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
  • force (::Boolean) — Optional. If set to true, any specs from this version will also be deleted. Otherwise, the request will only work if the version has no specs.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::DeleteVersionRequest.new

# Call the delete_version method.
result = client.delete_version request

# The returned object is of type Google::Protobuf::Empty.
p result

#get_api

def get_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
def get_api(name: nil) -> ::Google::Cloud::ApiHub::V1::Api

Get API resource details including the API versions contained in it.

Overloads
def get_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
Pass arguments to get_api via a request object, either of type GetApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_api(name: nil) -> ::Google::Cloud::ApiHub::V1::Api
Pass arguments to get_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the API resource to retrieve. Format: projects/{project}/locations/{location}/apis/{api}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetApiRequest.new

# Call the get_api method.
result = client.get_api request

# The returned object is of type Google::Cloud::ApiHub::V1::Api.
p result

#get_api_operation

def get_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation
def get_api_operation(name: nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation

Get details about a particular operation in API version.

Overloads
def get_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation
Pass arguments to get_api_operation via a request object, either of type GetApiOperationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetApiOperationRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_api_operation(name: nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation
Pass arguments to get_api_operation via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the operation to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetApiOperationRequest.new

# Call the get_api_operation method.
result = client.get_api_operation request

# The returned object is of type Google::Cloud::ApiHub::V1::ApiOperation.
p result

#get_attribute

def get_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
def get_attribute(name: nil) -> ::Google::Cloud::ApiHub::V1::Attribute

Get details about the attribute.

Overloads
def get_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
Pass arguments to get_attribute via a request object, either of type GetAttributeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetAttributeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_attribute(name: nil) -> ::Google::Cloud::ApiHub::V1::Attribute
Pass arguments to get_attribute via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the attribute to retrieve. Format: projects/{project}/locations/{location}/attributes/{attribute}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetAttributeRequest.new

# Call the get_attribute method.
result = client.get_attribute request

# The returned object is of type Google::Cloud::ApiHub::V1::Attribute.
p result

#get_definition

def get_definition(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Definition
def get_definition(name: nil) -> ::Google::Cloud::ApiHub::V1::Definition

Get details about a definition in an API version.

Overloads
def get_definition(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Definition
Pass arguments to get_definition via a request object, either of type GetDefinitionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetDefinitionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_definition(name: nil) -> ::Google::Cloud::ApiHub::V1::Definition
Pass arguments to get_definition via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the definition to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetDefinitionRequest.new

# Call the get_definition method.
result = client.get_definition request

# The returned object is of type Google::Cloud::ApiHub::V1::Definition.
p result

#get_deployment

def get_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
def get_deployment(name: nil) -> ::Google::Cloud::ApiHub::V1::Deployment

Get details about a deployment and the API versions linked to it.

Overloads
def get_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
Pass arguments to get_deployment via a request object, either of type GetDeploymentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetDeploymentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_deployment(name: nil) -> ::Google::Cloud::ApiHub::V1::Deployment
Pass arguments to get_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the deployment resource to retrieve. Format: projects/{project}/locations/{location}/deployments/{deployment}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetDeploymentRequest.new

# Call the get_deployment method.
result = client.get_deployment request

# The returned object is of type Google::Cloud::ApiHub::V1::Deployment.
p result

#get_external_api

def get_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
def get_external_api(name: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

Get details about an External API resource in the API hub.

Overloads
def get_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
Pass arguments to get_external_api via a request object, either of type GetExternalApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetExternalApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_external_api(name: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
Pass arguments to get_external_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the External API resource to retrieve. Format: projects/{project}/locations/{location}/externalApis/{externalApi}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetExternalApiRequest.new

# Call the get_external_api method.
result = client.get_external_api request

# The returned object is of type Google::Cloud::ApiHub::V1::ExternalApi.
p result

#get_spec

def get_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
def get_spec(name: nil) -> ::Google::Cloud::ApiHub::V1::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.

Overloads
def get_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
Pass arguments to get_spec via a request object, either of type GetSpecRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetSpecRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_spec(name: nil) -> ::Google::Cloud::ApiHub::V1::Spec
Pass arguments to get_spec via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the spec to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetSpecRequest.new

# Call the get_spec method.
result = client.get_spec request

# The returned object is of type Google::Cloud::ApiHub::V1::Spec.
p result

#get_spec_contents

def get_spec_contents(request, options = nil) -> ::Google::Cloud::ApiHub::V1::SpecContents
def get_spec_contents(name: nil) -> ::Google::Cloud::ApiHub::V1::SpecContents

Get spec contents.

Overloads
def get_spec_contents(request, options = nil) -> ::Google::Cloud::ApiHub::V1::SpecContents
Pass arguments to get_spec_contents via a request object, either of type GetSpecContentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetSpecContentsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_spec_contents(name: nil) -> ::Google::Cloud::ApiHub::V1::SpecContents
Pass arguments to get_spec_contents via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the spec whose contents need to be retrieved. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetSpecContentsRequest.new

# Call the get_spec_contents method.
result = client.get_spec_contents request

# The returned object is of type Google::Cloud::ApiHub::V1::SpecContents.
p result

#get_version

def get_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
def get_version(name: nil) -> ::Google::Cloud::ApiHub::V1::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.

Overloads
def get_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
Pass arguments to get_version via a request object, either of type GetVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_version(name: nil) -> ::Google::Cloud::ApiHub::V1::Version
Pass arguments to get_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the API version to retrieve. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::GetVersionRequest.new

# Call the get_version method.
result = client.get_version request

# The returned object is of type Google::Cloud::ApiHub::V1::Version.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new ApiHub REST client object.

Yields
  • (config) — Configure the ApiHub client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_api_operations

def list_api_operations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ApiOperation>
def list_api_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ApiOperation>

List operations in an API version.

Overloads
def list_api_operations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ApiOperation>
Pass arguments to list_api_operations via a request object, either of type ListApiOperationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::ListApiOperationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_api_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ApiOperation>
Pass arguments to list_api_operations via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent which owns this collection of operations i.e., the API version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
  • filter (::String) —

    Optional. An expression that filters the list of ApiOperations.

    A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string or a boolean. The comparison operator must be one of: <, > or =. Filters are not case sensitive.

    The following fields in the ApiOperation are eligible for filtering:

    • name - The ApiOperation resource name. Allowed comparison operators: =.
    • details.http_operation.path.path - The http operation's complete path relative to server endpoint. Allowed comparison operators: =.
    • details.http_operation.method - The http operation method type. Allowed comparison operators: =.
    • details.deprecated - Indicates if the ApiOperation is deprecated. Allowed values are True / False indicating the deprycation status of the ApiOperation. Allowed comparison operators: =.
    • create_time - The time at which the ApiOperation was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: > and <.

    Expressions are combined with either AND logic operator or OR logical operator but not both of them together i.e. only one of the AND or OR operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then INVALID_ARGUMENT error is returned by the API.

    Here are a few examples:

    • details.deprecated = True - The ApiOperation is deprecated.
    • details.http_operation.method = GET AND create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The method of the http operation of the ApiOperation is GET and the spec was created before 2021-08-15 14:50:00 UTC and after 2021-08-10 12:00:00 UTC.
    • details.http_operation.method = GET OR details.http_operation.method = POST. - The http operation of the method of ApiOperation is GET or POST.
  • page_size (::Integer) — Optional. The maximum number of operations to return. The service may return fewer than this value. If unspecified, at most 50 operations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListApiOperations call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters (except page_size) provided to ListApiOperations must match the call that provided the page token.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::ListApiOperationsRequest.new

# Call the list_api_operations method.
result = client.list_api_operations request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::ApiOperation.
  p item
end

#list_apis

def list_apis(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Api>
def list_apis(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Api>

List API resources in the API hub.

Overloads
def list_apis(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Api>
Pass arguments to list_apis via a request object, either of type ListApisRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::ListApisRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_apis(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Api>
Pass arguments to list_apis via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent, which owns this collection of API resources. Format: projects/{project}/locations/{location}
  • filter (::String) —

    Optional. An expression that filters the list of ApiResources.

    A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. The comparison operator must be one of: <, >, : or =. Filters are not case sensitive.

    The following fields in the ApiResource are eligible for filtering:

    • owner.email - The email of the team which owns the ApiResource. Allowed comparison operators: =.
    • create_time - The time at which the ApiResource was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: > and <.
    • display_name - The display name of the ApiResource. Allowed comparison operators: =.
    • target_user.enum_values.values.id - The allowed value id of the target users attribute associated with the ApiResource. Allowed comparison operator is :.
    • target_user.enum_values.values.display_name - The allowed value display name of the target users attribute associated with the ApiResource. Allowed comparison operator is :.
    • team.enum_values.values.id - The allowed value id of the team attribute associated with the ApiResource. Allowed comparison operator is :.
    • team.enum_values.values.display_name - The allowed value display name of the team attribute associated with the ApiResource. Allowed comparison operator is :.
    • business_unit.enum_values.values.id - The allowed value id of the business unit attribute associated with the ApiResource. Allowed comparison operator is :.
    • business_unit.enum_values.values.display_name - The allowed value display name of the business unit attribute associated with the ApiResource. Allowed comparison operator is :.
    • maturity_level.enum_values.values.id - The allowed value id of the maturity level attribute associated with the ApiResource. Allowed comparison operator is :.
    • maturity_level.enum_values.values.display_name - The allowed value display name of the maturity level attribute associated with the ApiResource. Allowed comparison operator is :.
    • api_style.enum_values.values.id - The allowed value id of the api style attribute associated with the ApiResource. Allowed comparison operator is :.
    • api_style.enum_values.values.display_name - The allowed value display name of the api style attribute associated with the ApiResource. Allowed comparison operator is :.

    Expressions are combined with either AND logic operator or OR logical operator but not both of them together i.e. only one of the AND or OR operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then INVALID_ARGUMENT error is returned by the API.

    Here are a few examples:

    • owner.email = \"apihub@google.com\" - - The owner team email is apihub@google.com.
    • owner.email = \"apihub@google.com\" AND create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The owner team email is apihub@google.com and the api was created before 2021-08-15 14:50:00 UTC and after 2021-08-10 12:00:00 UTC.
    • owner.email = \"apihub@google.com\" OR team.enum_values.values.id: apihub-team-id - The filter string specifies the APIs where the owner team email is apihub@google.com or the id of the allowed value associated with the team attribute is apihub-team-id.
    • owner.email = \"apihub@google.com\" OR team.enum_values.values.display_name: ApiHub Team - The filter string specifies the APIs where the owner team email is apihub@google.com or the display name of the allowed value associated with the team attribute is ApiHub Team.
  • page_size (::Integer) — Optional. The maximum number of API resources to return. The service may return fewer than this value. If unspecified, at most 50 Apis will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListApis call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters (except page_size) provided to ListApis must match the call that provided the page token.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::ListApisRequest.new

# Call the list_apis method.
result = client.list_apis request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::Api.
  p item
end

#list_attributes

def list_attributes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Attribute>
def list_attributes(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Attribute>

List all attributes.

Overloads
def list_attributes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Attribute>
Pass arguments to list_attributes via a request object, either of type ListAttributesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::ListAttributesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_attributes(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Attribute>
Pass arguments to list_attributes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}
  • filter (::String) —

    Optional. An expression that filters the list of Attributes.

    A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string or a boolean. The comparison operator must be one of: <, > or =. Filters are not case sensitive.

    The following fields in the Attribute are eligible for filtering:

    • display_name - The display name of the Attribute. Allowed comparison operators: =.
    • definition_type - The definition type of the attribute. Allowed comparison operators: =.
    • scope - The scope of the attribute. Allowed comparison operators: =.
    • data_type - The type of the data of the attribute. Allowed comparison operators: =.
    • mandatory - Denotes whether the attribute is mandatory or not. Allowed comparison operators: =.
    • create_time - The time at which the Attribute was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: > and <.

    Expressions are combined with either AND logic operator or OR logical operator but not both of them together i.e. only one of the AND or OR operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then INVALID_ARGUMENT error is returned by the API.

    Here are a few examples:

    • display_name = production - - The display name of the attribute is production.
    • (display_name = production) AND (create_time < \"2021-08-15T14:50:00Z\") AND (create_time > \"2021-08-10T12:00:00Z\") - The display name of the attribute is production and the attribute was created before 2021-08-15 14:50:00 UTC and after 2021-08-10 12:00:00 UTC.
    • display_name = production OR scope = api - The attribute where the display name is production or the scope is api.
  • page_size (::Integer) — Optional. The maximum number of attribute resources to return. The service may return fewer than this value. If unspecified, at most 50 attributes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListAttributes call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListAttributes must match the call that provided the page token.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::ListAttributesRequest.new

# Call the list_attributes method.
result = client.list_attributes request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::Attribute.
  p item
end

#list_deployments

def list_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Deployment>
def list_deployments(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Deployment>

List deployment resources in the API hub.

Overloads
def list_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Deployment>
Pass arguments to list_deployments via a request object, either of type ListDeploymentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::ListDeploymentsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_deployments(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Deployment>
Pass arguments to list_deployments via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent, which owns this collection of deployment resources. Format: projects/{project}/locations/{location}
  • filter (::String) —

    Optional. An expression that filters the list of Deployments.

    A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. The comparison operator must be one of: <, > or =. Filters are not case sensitive.

    The following fields in the Deployments are eligible for filtering:

    • display_name - The display name of the Deployment. Allowed comparison operators: =.
    • create_time - The time at which the Deployment was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: > and <.
    • resource_uri - A URI to the deployment resource. Allowed comparison operators: =.
    • api_versions - The API versions linked to this deployment. Allowed comparison operators: :.
    • deployment_type.enum_values.values.id - The allowed value id of the deployment_type attribute associated with the Deployment. Allowed comparison operators: :.
    • deployment_type.enum_values.values.display_name - The allowed value display name of the deployment_type attribute associated with the Deployment. Allowed comparison operators: :.
    • slo.string_values.values -The allowed string value of the slo attribute associated with the deployment. Allowed comparison operators: :.
    • environment.enum_values.values.id - The allowed value id of the environment attribute associated with the deployment. Allowed comparison operators: :.
    • environment.enum_values.values.display_name - The allowed value display name of the environment attribute associated with the deployment. Allowed comparison operators: :.

    Expressions are combined with either AND logic operator or OR logical operator but not both of them together i.e. only one of the AND or OR operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then INVALID_ARGUMENT error is returned by the API.

    Here are a few examples:

    • environment.enum_values.values.id: staging-id - The allowed value id of the environment attribute associated with the Deployment is staging-id.
    • environment.enum_values.values.display_name: \"Staging Deployment\" - The allowed value display name of the environment attribute associated with the Deployment is Staging Deployment.
    • environment.enum_values.values.id: production-id AND create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The allowed value id of the environment attribute associated with the Deployment is production-id and Deployment was created before 2021-08-15 14:50:00 UTC and after 2021-08-10 12:00:00 UTC.
    • environment.enum_values.values.id: production-id OR slo.string_values.values: \"99.99%\"
    • The allowed value id of the environment attribute Deployment is production-id or string value of the slo attribute is 99.99%.
  • page_size (::Integer) — Optional. The maximum number of deployment resources to return. The service may return fewer than this value. If unspecified, at most 50 deployments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListDeployments call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters (except page_size) provided to ListDeployments must match the call that provided the page token.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::ListDeploymentsRequest.new

# Call the list_deployments method.
result = client.list_deployments request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::Deployment.
  p item
end

#list_external_apis

def list_external_apis(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ExternalApi>
def list_external_apis(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ExternalApi>

List External API resources in the API hub.

Overloads
def list_external_apis(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ExternalApi>
Pass arguments to list_external_apis via a request object, either of type ListExternalApisRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::ListExternalApisRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_external_apis(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::ExternalApi>
Pass arguments to list_external_apis via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent, which owns this collection of External API resources. Format: projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of External API resources to return. The service may return fewer than this value. If unspecified, at most 50 ExternalApis will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListExternalApis call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters (except page_size) provided to ListExternalApis must match the call that provided the page token.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::ListExternalApisRequest.new

# Call the list_external_apis method.
result = client.list_external_apis request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::ExternalApi.
  p item
end

#list_specs

def list_specs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Spec>
def list_specs(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Spec>

List specs corresponding to a particular API resource.

Overloads
def list_specs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Spec>
Pass arguments to list_specs via a request object, either of type ListSpecsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::ListSpecsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_specs(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Spec>
Pass arguments to list_specs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent, which owns this collection of specs. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
  • filter (::String) —

    Optional. An expression that filters the list of Specs.

    A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. The comparison operator must be one of: <, >, : or =. Filters are not case sensitive.

    The following fields in the Spec are eligible for filtering:

    • display_name - The display name of the Spec. Allowed comparison operators: =.
    • create_time - The time at which the Spec was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: > and <.
    • spec_type.enum_values.values.id - The allowed value id of the spec_type attribute associated with the Spec. Allowed comparison operators: :.
    • spec_type.enum_values.values.display_name - The allowed value display name of the spec_type attribute associated with the Spec. Allowed comparison operators: :.
    • lint_response.json_values.values - The json value of the lint_response attribute associated with the Spec. Allowed comparison operators: :.
    • mime_type - The MIME type of the Spec. Allowed comparison operators: =.

    Expressions are combined with either AND logic operator or OR logical operator but not both of them together i.e. only one of the AND or OR operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then INVALID_ARGUMENT error is returned by the API.

    Here are a few examples:

    • spec_type.enum_values.values.id: rest-id - The filter string specifies that the id of the allowed value associated with the spec_type attribute is rest-id.
    • spec_type.enum_values.values.display_name: \"Rest Display Name\" - The filter string specifies that the display name of the allowed value associated with the spec_type attribute is Rest Display Name.
    • spec_type.enum_values.values.id: grpc-id AND create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The id of the allowed value associated with the spec_type attribute is grpc-id and the spec was created before 2021-08-15 14:50:00 UTC and after 2021-08-10 12:00:00 UTC.
    • spec_type.enum_values.values.id: rest-id OR spec_type.enum_values.values.id: grpc-id
    • The id of the allowed value associated with the spec_type attribute is rest-id or grpc-id.
  • page_size (::Integer) — Optional. The maximum number of specs to return. The service may return fewer than this value. If unspecified, at most 50 specs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListSpecs call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListSpecs must match the call that provided the page token.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::ListSpecsRequest.new

# Call the list_specs method.
result = client.list_specs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::Spec.
  p item
end

#list_versions

def list_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Version>
def list_versions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Version>

List API versions of an API resource in the API hub.

Overloads
def list_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Version>
Pass arguments to list_versions via a request object, either of type ListVersionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::ListVersionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_versions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::Version>
Pass arguments to list_versions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent which owns this collection of API versions i.e., the API resource Format: projects/{project}/locations/{location}/apis/{api}
  • filter (::String) —

    Optional. An expression that filters the list of Versions.

    A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: <, > or =. Filters are not case sensitive.

    The following fields in the Version are eligible for filtering:

    • display_name - The display name of the Version. Allowed comparison operators: =.
    • create_time - The time at which the Version was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: > and <.
    • lifecycle.enum_values.values.id - The allowed value id of the lifecycle attribute associated with the Version. Allowed comparison operators: :.
    • lifecycle.enum_values.values.display_name - The allowed value display name of the lifecycle attribute associated with the Version. Allowed comparison operators: :.
    • compliance.enum_values.values.id - The allowed value id of the compliances attribute associated with the Version. Allowed comparison operators: :.
    • compliance.enum_values.values.display_name - The allowed value display name of the compliances attribute associated with the Version. Allowed comparison operators: :.
    • accreditation.enum_values.values.id - The allowed value id of the accreditations attribute associated with the Version. Allowed comparison operators: :.
    • accreditation.enum_values.values.display_name - The allowed value display name of the accreditations attribute associated with the Version. Allowed comparison operators: :.

    Expressions are combined with either AND logic operator or OR logical operator but not both of them together i.e. only one of the AND or OR operator can be used throughout the filter string and both the operators cannot be used together. No other logical operators are supported. At most three filter fields are allowed in the filter string and if provided more than that then INVALID_ARGUMENT error is returned by the API.

    Here are a few examples:

    • lifecycle.enum_values.values.id: preview-id - The filter string specifies that the id of the allowed value associated with the lifecycle attribute of the Version is preview-id.
    • lifecycle.enum_values.values.display_name: \"Preview Display Name\" - The filter string specifies that the display name of the allowed value associated with the lifecycle attribute of the Version is Preview Display Name.
    • lifecycle.enum_values.values.id: preview-id AND create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\" - The id of the allowed value associated with the lifecycle attribute of the Version is preview-id and it was created before 2021-08-15 14:50:00 UTC and after 2021-08-10 12:00:00 UTC.
    • compliance.enum_values.values.id: gdpr-id OR compliance.enum_values.values.id: pci-dss-id
    • The id of the allowed value associated with the compliance attribute is gdpr-id or pci-dss-id.
  • page_size (::Integer) — Optional. The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 50 versions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListVersions call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters (except page_size) provided to ListVersions must match the call that provided the page token.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::ListVersionsRequest.new

# Call the list_versions method.
result = client.list_versions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::Version.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#search_resources

def search_resources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::SearchResult>
def search_resources(location: nil, query: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::SearchResult>

Search across API-Hub resources.

Overloads
def search_resources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::SearchResult>
Pass arguments to search_resources via a request object, either of type SearchResourcesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::SearchResourcesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def search_resources(location: nil, query: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::SearchResult>
Pass arguments to search_resources via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • location (::String) — 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.
  • query (::String) — Required. The free text search query. This query can contain keywords which could be related to any detail of the API-Hub resources such display names, descriptions, attributes etc.
  • filter (::String) —

    Optional. An expression that filters the list of search results.

    A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be =. Filters are not case sensitive.

    The following field names are eligible for filtering:

    • resource_type - The type of resource in the search results. Must be one of the following: Api, ApiOperation, Deployment, Definition, Spec or Version. This field can only be specified once in the filter.

    Here are is an example:

    • resource_type = Api - The resource_type is Api.
  • page_size (::Integer) — Optional. The maximum number of search results to return. The service may return fewer than this value. If unspecified at most 10 search results will be returned. If value is negative then INVALID_ARGUMENT error is returned. The maximum value is 25; values above 25 will be coerced to 25. While paginating, you can specify a new page size parameter for each page of search results to be listed.
  • page_token (::String) — Optional. A page token, received from a previous [SearchResources][SearchResources] call. Specify this parameter to retrieve the next page of transactions.

    When paginating, you must specify the page_token parameter and all the other parameters except page_size should be specified with the same value which was used in the previous call. If the other fields are set with a different value than the previous call then INVALID_ARGUMENT error is returned.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::SearchResourcesRequest.new

# Call the search_resources method.
result = client.search_resources request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ApiHub::V1::SearchResult.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_api

def update_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
def update_api(api: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Api

Update an API resource in the API hub. The following fields in the [API][] can be updated:

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.

Overloads
def update_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
Pass arguments to update_api via a request object, either of type UpdateApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::UpdateApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_api(api: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Api
Pass arguments to update_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • api (::Google::Cloud::ApiHub::V1::Api, ::Hash) — Required. The API resource to update.

    The API resource's name field is used to identify the API resource to update. Format: projects/{project}/locations/{location}/apis/{api}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::UpdateApiRequest.new

# Call the update_api method.
result = client.update_api request

# The returned object is of type Google::Cloud::ApiHub::V1::Api.
p result

#update_attribute

def update_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
def update_attribute(attribute: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Attribute

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.

Overloads
def update_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
Pass arguments to update_attribute via a request object, either of type UpdateAttributeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::UpdateAttributeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_attribute(attribute: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Attribute
Pass arguments to update_attribute via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • attribute (::Google::Cloud::ApiHub::V1::Attribute, ::Hash) — Required. The attribute to update.

    The attribute's name field is used to identify the attribute to update. Format: projects/{project}/locations/{location}/attributes/{attribute}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::UpdateAttributeRequest.new

# Call the update_attribute method.
result = client.update_attribute request

# The returned object is of type Google::Cloud::ApiHub::V1::Attribute.
p result

#update_deployment

def update_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
def update_deployment(deployment: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Deployment

Update a deployment resource in the API hub. The following fields in the deployment resource can be updated:

The update_mask should be used to specify the fields being updated.

Overloads
def update_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
Pass arguments to update_deployment via a request object, either of type UpdateDeploymentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::UpdateDeploymentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_deployment(deployment: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Deployment
Pass arguments to update_deployment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • deployment (::Google::Cloud::ApiHub::V1::Deployment, ::Hash) — Required. The deployment resource to update.

    The deployment resource's name field is used to identify the deployment resource to update. Format: projects/{project}/locations/{location}/deployments/{deployment}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::UpdateDeploymentRequest.new

# Call the update_deployment method.
result = client.update_deployment request

# The returned object is of type Google::Cloud::ApiHub::V1::Deployment.
p result

#update_external_api

def update_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
def update_external_api(external_api: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

Update an External API resource in the API hub. The following fields can be updated:

The update_mask should be used to specify the fields being updated.

Overloads
def update_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
Pass arguments to update_external_api via a request object, either of type UpdateExternalApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::UpdateExternalApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_external_api(external_api: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
Pass arguments to update_external_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • external_api (::Google::Cloud::ApiHub::V1::ExternalApi, ::Hash) — Required. The External API resource to update.

    The External API resource's name field is used to identify the External API resource to update. Format: projects/{project}/locations/{location}/externalApis/{externalApi}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::UpdateExternalApiRequest.new

# Call the update_external_api method.
result = client.update_external_api request

# The returned object is of type Google::Cloud::ApiHub::V1::ExternalApi.
p result

#update_spec

def update_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
def update_spec(spec: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Spec

Update spec. The following fields in the spec can be updated:

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.

Overloads
def update_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
Pass arguments to update_spec via a request object, either of type UpdateSpecRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::UpdateSpecRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_spec(spec: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Spec
Pass arguments to update_spec via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • spec (::Google::Cloud::ApiHub::V1::Spec, ::Hash) — Required. The spec to update.

    The spec's name field is used to identify the spec to update. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::UpdateSpecRequest.new

# Call the update_spec method.
result = client.update_spec request

# The returned object is of type Google::Cloud::ApiHub::V1::Spec.
p result

#update_version

def update_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
def update_version(version: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Version

Update API version. The following fields in the version can be updated currently:

The update_mask should be used to specify the fields being updated.

Overloads
def update_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
Pass arguments to update_version via a request object, either of type UpdateVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::UpdateVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_version(version: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Version
Pass arguments to update_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • version (::Google::Cloud::ApiHub::V1::Version, ::Hash) — Required. The API version to update.

    The version's name field is used to identify the API version to update. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ApiHub::V1::UpdateVersionRequest.new

# Call the update_version method.
result = client.update_version request

# The returned object is of type Google::Cloud::ApiHub::V1::Version.
p result