# Network Connectivity API - Module Google::Cloud::NetworkConnectivity (v2.5.0)

2.5.0 (latest) 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 Reference documentation and code samples for the Network Connectivity API module Google::Cloud::NetworkConnectivity.

## Methods

### .configure

    def self.configure() -> ::Google::Cloud::Config

Configure the google-cloud-network_connectivity library.

The following configuration parameters are supported:

- `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object.
- `lib_name` (*type:* `String`) - The library name as recorded in instrumentation and logging.
- `lib_version` (*type:* `String`) - The library version as recorded in instrumentation and logging.
- `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) - An array of interceptors that are run before calls are executed.
- `timeout` (*type:* `Numeric`) - Default timeout in seconds.
- `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers to be sent with the call.
- `retry_policy` (*type:* `Hash`) - The retry policy. The value is a hash with the following keys:
  - `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
  - `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
  - `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
  - `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
  - `:retry_codes` (*type:* `Array<String>`) - The error codes that should trigger a retry.
**Yields**

- (::Google::Cloud.configure.network_connectivity)
**Returns**

- (::Google::Cloud::Config) --- The default configuration used by this library

### .cross_network_automation_service

    def self.cross_network_automation_service(version: :v1, &block) -> ::Object

Create a new client object for CrossNetworkAutomationService.


By default, this returns an instance of
[Google::Cloud::NetworkConnectivity::V1::CrossNetworkAutomationService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-CrossNetworkAutomationService-Client)
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
`version` parameter. If the CrossNetworkAutomationService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.

<br />

Raises an exception if the currently installed versioned client gem for the
given API version does not support the CrossNetworkAutomationService service.
You can determine whether the method will succeed by calling
[NetworkConnectivity.cross_network_automation_service_available?](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_cross_network_automation_service_available__class_ "Google::Cloud::NetworkConnectivity.cross_network_automation_service_available? (method)").

#### About CrossNetworkAutomationService

<br />

<br />

The service for CrossNetworkAutomation resources.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (::Object) --- A client object for the specified version.

### .cross_network_automation_service_available?

    def self.cross_network_automation_service_available?(version: :v1) -> boolean

Determines whether the CrossNetworkAutomationService service is supported by the current client.
If true, you can retrieve a client object by calling [NetworkConnectivity.cross_network_automation_service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_cross_network_automation_service_class_ "Google::Cloud::NetworkConnectivity.cross_network_automation_service (method)").
If false, that method will raise an exception. This could happen if the given
API version does not exist or does not support the CrossNetworkAutomationService service,
or if the versioned client gem needs an update to support the CrossNetworkAutomationService service.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (boolean) --- Whether the service is available.

### .data_transfer_service

    def self.data_transfer_service(version: :v1, &block) -> ::Object

Create a new client object for DataTransferService.


By default, this returns an instance of
[Google::Cloud::NetworkConnectivity::V1::DataTransferService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-DataTransferService-Client)
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
`version` parameter. If the DataTransferService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.

<br />

Raises an exception if the currently installed versioned client gem for the
given API version does not support the DataTransferService service.
You can determine whether the method will succeed by calling
[NetworkConnectivity.data_transfer_service_available?](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_data_transfer_service_available__class_ "Google::Cloud::NetworkConnectivity.data_transfer_service_available? (method)").

#### About DataTransferService

<br />

<br />

DataTransferService is the service for the Data Transfer API.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (::Object) --- A client object for the specified version.

### .data_transfer_service_available?

    def self.data_transfer_service_available?(version: :v1) -> boolean

Determines whether the DataTransferService service is supported by the current client.
If true, you can retrieve a client object by calling [NetworkConnectivity.data_transfer_service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_data_transfer_service_class_ "Google::Cloud::NetworkConnectivity.data_transfer_service (method)").
If false, that method will raise an exception. This could happen if the given
API version does not exist or does not support the DataTransferService service,
or if the versioned client gem needs an update to support the DataTransferService service.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (boolean) --- Whether the service is available.

### .hub_service

    def self.hub_service(version: :v1, &block) -> ::Object

Create a new client object for HubService.


By default, this returns an instance of
[Google::Cloud::NetworkConnectivity::V1::HubService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-HubService-Client)
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
`version` parameter. If the HubService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.

<br />

Raises an exception if the currently installed versioned client gem for the
given API version does not support the HubService service.
You can determine whether the method will succeed by calling
[NetworkConnectivity.hub_service_available?](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_hub_service_available__class_ "Google::Cloud::NetworkConnectivity.hub_service_available? (method)").

#### About HubService

<br />

<br />

Network Connectivity Center is a hub-and-spoke abstraction for network
connectivity management in Google Cloud. It reduces operational complexity
through a simple, centralized connectivity management model.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (::Object) --- A client object for the specified version.

### .hub_service_available?

    def self.hub_service_available?(version: :v1) -> boolean

Determines whether the HubService service is supported by the current client.
If true, you can retrieve a client object by calling [NetworkConnectivity.hub_service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_hub_service_class_ "Google::Cloud::NetworkConnectivity.hub_service (method)").
If false, that method will raise an exception. This could happen if the given
API version does not exist or does not support the HubService service,
or if the versioned client gem needs an update to support the HubService service.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (boolean) --- Whether the service is available.

### .internal_range_service

    def self.internal_range_service(version: :v1, &block) -> ::Object

Create a new client object for InternalRangeService.


By default, this returns an instance of
[Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client)
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
`version` parameter. If the InternalRangeService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.

<br />

Raises an exception if the currently installed versioned client gem for the
given API version does not support the InternalRangeService service.
You can determine whether the method will succeed by calling
[NetworkConnectivity.internal_range_service_available?](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_internal_range_service_available__class_ "Google::Cloud::NetworkConnectivity.internal_range_service_available? (method)").

#### About InternalRangeService

<br />

<br />

The CLH-based service for internal range resources used to perform IPAM
operations within a VPC network.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (::Object) --- A client object for the specified version.

### .internal_range_service_available?

    def self.internal_range_service_available?(version: :v1) -> boolean

Determines whether the InternalRangeService service is supported by the current client.
If true, you can retrieve a client object by calling [NetworkConnectivity.internal_range_service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_internal_range_service_class_ "Google::Cloud::NetworkConnectivity.internal_range_service (method)").
If false, that method will raise an exception. This could happen if the given
API version does not exist or does not support the InternalRangeService service,
or if the versioned client gem needs an update to support the InternalRangeService service.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (boolean) --- Whether the service is available.

### .policy_based_routing_service

    def self.policy_based_routing_service(version: :v1, &block) -> ::Object

Create a new client object for PolicyBasedRoutingService.


By default, this returns an instance of
[Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoutingService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-PolicyBasedRoutingService-Client)
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
`version` parameter. If the PolicyBasedRoutingService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.

<br />

Raises an exception if the currently installed versioned client gem for the
given API version does not support the PolicyBasedRoutingService service.
You can determine whether the method will succeed by calling
[NetworkConnectivity.policy_based_routing_service_available?](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_policy_based_routing_service_available__class_ "Google::Cloud::NetworkConnectivity.policy_based_routing_service_available? (method)").

#### About PolicyBasedRoutingService

<br />

<br />

Policy-Based Routing allows GCP customers to specify flexibile routing
policies for Layer 4 traffic traversing through the connected service.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (::Object) --- A client object for the specified version.

### .policy_based_routing_service_available?

    def self.policy_based_routing_service_available?(version: :v1) -> boolean

Determines whether the PolicyBasedRoutingService service is supported by the current client.
If true, you can retrieve a client object by calling [NetworkConnectivity.policy_based_routing_service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity/latest/Google-Cloud-NetworkConnectivity#Google__Cloud__NetworkConnectivity_policy_based_routing_service_class_ "Google::Cloud::NetworkConnectivity.policy_based_routing_service (method)").
If false, that method will raise an exception. This could happen if the given
API version does not exist or does not support the PolicyBasedRoutingService service,
or if the versioned client gem needs an update to support the PolicyBasedRoutingService service.
**Parameter**

- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.
**Returns**

- (boolean) --- Whether the service is available.

## Constants

### VERSION

**value:**"2.5.0"