# Network Connectivity V1 API - Class Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client (v1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.1 0.5.0 0.4.1 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Network Connectivity V1 API class Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.

Client for the InternalRangeService service.


<br />

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

## Inherits

- Object

## Includes

- [Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Paths)

## Methods

### .configure

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

Configure the InternalRangeService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client-Configuration "Google::Cloud::NetworkConnectivity::V1::InternalRangeService::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-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client-Configuration))
**Example**

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

### #configure

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

Configure the InternalRangeService 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-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client#Google__Cloud__NetworkConnectivity__V1__InternalRangeService__Client_configure_class_ "Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client-Configuration "Google::Cloud::NetworkConnectivity::V1::InternalRangeService::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-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client-Configuration))

### #create_internal_range

    def create_internal_range(request, options = nil) -> ::Gapic::Operation
    def create_internal_range(parent: nil, internal_range_id: nil, internal_range: nil, request_id: nil) -> ::Gapic::Operation

Creates a new internal range in a given project and location.
**Overloads**

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

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

- **request** ([::Google::Cloud::NetworkConnectivity::V1::CreateInternalRangeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-CreateInternalRangeRequest), ::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_internal_range(parent: nil, internal_range_id: nil, internal_range: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_internal_range` 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's name of the internal range.
- **internal_range_id** (::String) --- Optional. Resource ID (i.e. 'foo' in '\[...\]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.
- **internal_range** ([::Google::Cloud::NetworkConnectivity::V1::InternalRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRange), ::Hash) --- Required. Initial values for a new internal range
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

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

Basic example

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

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

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

# Call the create_internal_range method.
result = client.create_internal_range 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_internal_range

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

Deletes a single internal range.
**Overloads**

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

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

- **request** ([::Google::Cloud::NetworkConnectivity::V1::DeleteInternalRangeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-DeleteInternalRangeRequest), ::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_internal_range(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_internal_range` 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 internal range to delete.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

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

Basic example

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

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

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

# Call the delete_internal_range method.
result = client.delete_internal_range 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_internal_range

    def get_internal_range(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::InternalRange
    def get_internal_range(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::InternalRange

Gets details of a single internal range.
**Overloads**

    def get_internal_range(request, options = nil) -> ::Google::Cloud::NetworkConnectivity::V1::InternalRange

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

- **request** ([::Google::Cloud::NetworkConnectivity::V1::GetInternalRangeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-GetInternalRangeRequest), ::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_internal_range(name: nil) -> ::Google::Cloud::NetworkConnectivity::V1::InternalRange

Pass arguments to `get_internal_range` 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. Name of the InternalRange to get.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::NetworkConnectivity::V1::InternalRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRange))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::InternalRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRange))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::NetworkConnectivity::V1::InternalRange.
p result
```

### #iam_policy_client

    def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

Get the associated client for mix-in of the IAMPolicy.
**Returns**

- (Google::Iam::V1::IAMPolicy::Client)

### #initialize

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

Create a new InternalRangeService client object.
**Yields**

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Client.new

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

### #list_internal_ranges

    def list_internal_ranges(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::InternalRange>
    def list_internal_ranges(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::InternalRange>

Lists internal ranges in a given project and location.
**Overloads**

    def list_internal_ranges(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::InternalRange>

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

- **request** ([::Google::Cloud::NetworkConnectivity::V1::ListInternalRangesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ListInternalRangesRequest), ::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_internal_ranges(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::InternalRange>

Pass arguments to `list_internal_ranges` 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's name.
- **page_size** (::Integer) --- The maximum number of results per page that should be returned.
- **page_token** (::String) --- The page token.
- **filter** (::String) --- A filter expression that filters the results listed in the response.
- **order_by** (::String) --- Sort the results by a certain order.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::NetworkConnectivity::V1::InternalRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRange)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::NetworkConnectivity::V1::InternalRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRange)\>)
**Raises**

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

Basic example

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

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

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

# Call the list_internal_ranges method.
result = client.list_internal_ranges 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::NetworkConnectivity::V1::InternalRange.
  p item
end
```

### #location_client

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

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

- (Google::Cloud::Location::Locations::Client)

### #logger

    def logger() -> Logger

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

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations

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

- ([::Google::Cloud::NetworkConnectivity::V1::InternalRangeService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRangeService-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_internal_range

    def update_internal_range(request, options = nil) -> ::Gapic::Operation
    def update_internal_range(update_mask: nil, internal_range: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single internal range.
**Overloads**

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

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

- **request** ([::Google::Cloud::NetworkConnectivity::V1::UpdateInternalRangeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-UpdateInternalRangeRequest), ::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_internal_range(update_mask: nil, internal_range: nil, request_id: nil) -> ::Gapic::Operation

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

- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. Field mask is used to specify the fields to be overwritten in the InternalRange resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- **internal_range** ([::Google::Cloud::NetworkConnectivity::V1::InternalRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-InternalRange), ::Hash) --- Required. New values to be patched into the resource.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

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

Basic example

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

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

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

# Call the update_internal_range method.
result = client.update_internal_range 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
```