1.2.0 (latest) 1.1.0 1.0.3 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::Provisioning::Rest::Client.

REST client for the Provisioning service.


<br />

This service is used for managing the data plane provisioning of the API hub.

## Inherits

- Object

## Includes

- [Google::Cloud::ApiHub::V1::Provisioning::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Paths)

## Methods

### .configure

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

Configure the Provisioning Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client-Configuration "Google::Cloud::ApiHub::V1::Provisioning::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all Provisioning clients
::Google::Cloud::ApiHub::V1::Provisioning::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the Provisioning 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client#Google__Cloud__ApiHub__V1__Provisioning__Rest__Client_configure_class_ "Google::Cloud::ApiHub::V1::Provisioning::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client-Configuration "Google::Cloud::ApiHub::V1::Provisioning::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client-Configuration))

### #create_api_hub_instance

    def create_api_hub_instance(request, options = nil) -> ::Gapic::Operation
    def create_api_hub_instance(parent: nil, api_hub_instance_id: nil, api_hub_instance: nil) -> ::Gapic::Operation

Provisions instance resources for the API Hub.
**Overloads**

    def create_api_hub_instance(request, options = nil) -> ::Gapic::Operation

Pass arguments to `create_api_hub_instance` via a request object, either of type [CreateApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateApiHubInstanceRequest "Google::Cloud::ApiHub::V1::CreateApiHubInstanceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::CreateApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateApiHubInstanceRequest), ::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_hub_instance(parent: nil, api_hub_instance_id: nil, api_hub_instance: nil) -> ::Gapic::Operation

Pass arguments to `create_api_hub_instance` 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 Hub instance resource. Format: `projects/{project}/locations/{location}`
- **api_hub_instance_id** (::String) --- Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used.


  This value should be 4-40 characters, and valid characters
  are `/[a-z][A-Z][0-9]-_/`.
- **api_hub_instance** ([::Google::Cloud::ApiHub::V1::ApiHubInstance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHubInstance), ::Hash) --- Required. The ApiHub instance.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

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

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #delete_api_hub_instance

    def delete_api_hub_instance(request, options = nil) -> ::Gapic::Operation
    def delete_api_hub_instance(name: nil) -> ::Gapic::Operation

Deletes the API hub instance.
**Overloads**

    def delete_api_hub_instance(request, options = nil) -> ::Gapic::Operation

Pass arguments to `delete_api_hub_instance` via a request object, either of type [DeleteApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DeleteApiHubInstanceRequest "Google::Cloud::ApiHub::V1::DeleteApiHubInstanceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::DeleteApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DeleteApiHubInstanceRequest), ::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_hub_instance(name: nil) -> ::Gapic::Operation

Pass arguments to `delete_api_hub_instance` 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 Hub instance to delete. Format: `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

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

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #get_api_hub_instance

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

Gets details of a single API Hub instance.
**Overloads**

    def get_api_hub_instance(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiHubInstance

Pass arguments to `get_api_hub_instance` via a request object, either of type [GetApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-GetApiHubInstanceRequest "Google::Cloud::ApiHub::V1::GetApiHubInstanceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::GetApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-GetApiHubInstanceRequest), ::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_hub_instance(name: nil) -> ::Google::Cloud::ApiHub::V1::ApiHubInstance

Pass arguments to `get_api_hub_instance` 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 Hub instance to retrieve. Format: `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::ApiHub::V1::ApiHubInstance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHubInstance))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::ApiHub::V1::ApiHubInstance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHubInstance))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

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

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

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

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

### #initialize

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

Create a new Provisioning REST client object.
**Yields**

- (config) --- Configure the Provisioning client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::ApiHub::V1::Provisioning::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::ApiHub::V1::Provisioning::Rest::Client.new do |config|
  config.timeout = 10.0
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)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #lookup_api_hub_instance

    def lookup_api_hub_instance(request, options = nil) -> ::Google::Cloud::ApiHub::V1::LookupApiHubInstanceResponse
    def lookup_api_hub_instance(parent: nil) -> ::Google::Cloud::ApiHub::V1::LookupApiHubInstanceResponse

Looks up an Api Hub instance in a given GCP project. There will always be
only one Api Hub instance for a GCP project across all locations.
**Overloads**

    def lookup_api_hub_instance(request, options = nil) -> ::Google::Cloud::ApiHub::V1::LookupApiHubInstanceResponse

Pass arguments to `lookup_api_hub_instance` via a request object, either of type [LookupApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LookupApiHubInstanceRequest "Google::Cloud::ApiHub::V1::LookupApiHubInstanceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::LookupApiHubInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LookupApiHubInstanceRequest), ::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 lookup_api_hub_instance(parent: nil) -> ::Google::Cloud::ApiHub::V1::LookupApiHubInstanceResponse

Pass arguments to `lookup_api_hub_instance` 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**

- **parent** (::String) --- Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: `projects/{project}/locations/{location}`
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::ApiHub::V1::LookupApiHubInstanceResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LookupApiHubInstanceResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::ApiHub::V1::LookupApiHubInstanceResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LookupApiHubInstanceResponse))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

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

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

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

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

### #operations_client

    def operations_client() -> ::Google::Cloud::ApiHub::V1::Provisioning::Rest::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::ApiHub::V1::Provisioning::Rest::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Provisioning-Rest-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)