Class: Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/edge_network/v1/edge_network/client.rb

Overview

Client for the EdgeNetwork service.

EdgeNetwork API provides managed, highly available cloud dynamic network configuration service to the GEC customer to enable edge application and network function solutions. This allows the customers to easily define and configure the network setup and property to meet the workload requirement.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#interconnect_attachment_path, #interconnect_path, #location_path, #network_path, #router_path, #subnet_path, #zone_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new EdgeNetwork client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Client.new

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

Yields:

  • (config)

    Configure the EdgeNetwork client.

Yield Parameters:



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 210

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/edgenetwork/v1/service_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @edge_network_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool
  )

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @edge_network_stub.endpoint
    config.universe_domain = @edge_network_stub.universe_domain
  end
end

Instance Attribute Details

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

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

Returns:

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


276
277
278
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 276

def location_client
  @location_client
end

#operations_client::Google::Cloud::EdgeNetwork::V1::EdgeNetwork::Operations (readonly)

Get the associated client for long-running operations.



269
270
271
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 269

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the EdgeNetwork Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 63

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "EdgeNetwork", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.initialize_zone.timeout = 60.0

    default_config.rpcs.list_networks.timeout = 60.0
    default_config.rpcs.list_networks.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_network.timeout = 60.0
    default_config.rpcs.get_network.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.diagnose_network.timeout = 60.0
    default_config.rpcs.diagnose_network.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_network.timeout = 60.0

    default_config.rpcs.delete_network.timeout = 60.0

    default_config.rpcs.list_subnets.timeout = 60.0
    default_config.rpcs.list_subnets.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_subnet.timeout = 60.0
    default_config.rpcs.get_subnet.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_subnet.timeout = 60.0

    default_config.rpcs.delete_subnet.timeout = 60.0

    default_config.rpcs.list_interconnects.timeout = 60.0
    default_config.rpcs.list_interconnects.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_interconnect.timeout = 60.0
    default_config.rpcs.get_interconnect.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.diagnose_interconnect.timeout = 60.0
    default_config.rpcs.diagnose_interconnect.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_interconnect_attachments.timeout = 60.0
    default_config.rpcs.list_interconnect_attachments.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_interconnect_attachment.timeout = 60.0
    default_config.rpcs.get_interconnect_attachment.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_interconnect_attachment.timeout = 60.0

    default_config.rpcs.delete_interconnect_attachment.timeout = 60.0

    default_config.rpcs.list_routers.timeout = 60.0
    default_config.rpcs.list_routers.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_router.timeout = 60.0
    default_config.rpcs.get_router.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.diagnose_router.timeout = 60.0
    default_config.rpcs.diagnose_router.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_router.timeout = 60.0

    default_config.rpcs.update_router.timeout = 60.0

    default_config.rpcs.delete_router.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the EdgeNetwork 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 configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



180
181
182
183
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 180

def configure
  yield @config if block_given?
  @config
end

#create_interconnect_attachment(request, options = nil) ⇒ ::Gapic::Operation #create_interconnect_attachment(parent: nil, interconnect_attachment_id: nil, interconnect_attachment: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new InterconnectAttachment in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #create_interconnect_attachment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_interconnect_attachment via a request object, either of type CreateInterconnectAttachmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::CreateInterconnectAttachmentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_interconnect_attachment(parent: nil, interconnect_attachment_id: nil, interconnect_attachment: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_interconnect_attachment 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) (defaults to: nil)

      Required. Value for parent.

    • interconnect_attachment_id (::String) (defaults to: nil)

      Required. Id of the requesting object If auto-generating Id server-side, remove this field and interconnect_attachment_id from the method_signature of Create RPC

    • interconnect_attachment (::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment, ::Hash) (defaults to: nil)

      Required. The resource being created

    • request_id (::String) (defaults to: nil)

      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.



2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2085

def create_interconnect_attachment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateInterconnectAttachmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_interconnect_attachment..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_interconnect_attachment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_interconnect_attachment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :create_interconnect_attachment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_network(request, options = nil) ⇒ ::Gapic::Operation #create_network(parent: nil, network_id: nil, network: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new Network in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #create_network(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_network via a request object, either of type CreateNetworkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::CreateNetworkRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_network(parent: nil, network_id: nil, network: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_network 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) (defaults to: nil)

      Required. Value for parent.

    • network_id (::String) (defaults to: nil)

      Required. Id of the requesting object If auto-generating Id server-side, remove this field and network_id from the method_signature of Create RPC

    • network (::Google::Cloud::EdgeNetwork::V1::Network, ::Hash) (defaults to: nil)

      Required. The resource being created

    • request_id (::String) (defaults to: nil)

      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.



895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 895

def create_network request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateNetworkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_network..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_network.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_network.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :create_network, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_router(request, options = nil) ⇒ ::Gapic::Operation #create_router(parent: nil, router_id: nil, router: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new Router in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #create_router(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_router via a request object, either of type CreateRouterRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::CreateRouterRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_router(parent: nil, router_id: nil, router: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_router 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) (defaults to: nil)

      Required. Value for parent.

    • router_id (::String) (defaults to: nil)

      Required. Id of the requesting object If auto-generating Id server-side, remove this field and router_id from the method_signature of Create RPC

    • router (::Google::Cloud::EdgeNetwork::V1::Router, ::Hash) (defaults to: nil)

      Required. The resource being created

    • request_id (::String) (defaults to: nil)

      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.



2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2574

def create_router request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateRouterRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_router..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_router.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_router.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :create_router, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_subnet(request, options = nil) ⇒ ::Gapic::Operation #create_subnet(parent: nil, subnet_id: nil, subnet: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new Subnet in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #create_subnet(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_subnet via a request object, either of type CreateSubnetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::CreateSubnetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_subnet(parent: nil, subnet_id: nil, subnet: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_subnet 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) (defaults to: nil)

      Required. Value for parent.

    • subnet_id (::String) (defaults to: nil)

      Required. Id of the requesting object If auto-generating Id server-side, remove this field and subnet_id from the method_signature of Create RPC

    • subnet (::Google::Cloud::EdgeNetwork::V1::Subnet, ::Hash) (defaults to: nil)

      Required. The resource being created

    • request_id (::String) (defaults to: nil)

      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.



1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1299

def create_subnet request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::CreateSubnetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_subnet..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_subnet.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_subnet.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :create_subnet, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_interconnect_attachment(request, options = nil) ⇒ ::Gapic::Operation #delete_interconnect_attachment(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a single InterconnectAttachment.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #delete_interconnect_attachment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_interconnect_attachment via a request object, either of type DeleteInterconnectAttachmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::DeleteInterconnectAttachmentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_interconnect_attachment(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_interconnect_attachment 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) (defaults to: nil)

      Required. Name of the resource

    • request_id (::String) (defaults to: nil)

      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.



2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2192

def delete_interconnect_attachment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteInterconnectAttachmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_interconnect_attachment..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_interconnect_attachment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_interconnect_attachment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :delete_interconnect_attachment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_network(request, options = nil) ⇒ ::Gapic::Operation #delete_network(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a single Network.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #delete_network(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_network via a request object, either of type DeleteNetworkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::DeleteNetworkRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_network(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_network 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) (defaults to: nil)

      Required. Name of the resource

    • request_id (::String) (defaults to: nil)

      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.



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1002

def delete_network request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteNetworkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_network..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_network.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_network.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :delete_network, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_router(request, options = nil) ⇒ ::Gapic::Operation #delete_router(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a single Router.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #delete_router(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_router via a request object, either of type DeleteRouterRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::DeleteRouterRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_router(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_router 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) (defaults to: nil)

      Required. Name of the resource

    • request_id (::String) (defaults to: nil)

      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.



2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2794

def delete_router request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteRouterRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_router..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_router.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_router.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :delete_router, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_subnet(request, options = nil) ⇒ ::Gapic::Operation #delete_subnet(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a single Subnet.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #delete_subnet(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_subnet via a request object, either of type DeleteSubnetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::DeleteSubnetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_subnet(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_subnet 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) (defaults to: nil)

      Required. Name of the resource

    • request_id (::String) (defaults to: nil)

      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.



1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1519

def delete_subnet request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DeleteSubnetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_subnet..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_subnet.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_subnet.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :delete_subnet, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#diagnose_interconnect(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse #diagnose_interconnect(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse

Get the diagnostics of a single interconnect resource.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse.
p result

Overloads:

  • #diagnose_interconnect(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse

    Pass arguments to diagnose_interconnect via a request object, either of type DiagnoseInterconnectRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #diagnose_interconnect(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectResponse

    Pass arguments to diagnose_interconnect 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) (defaults to: nil)

      Required. The name of the interconnect resource.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1789

def diagnose_interconnect request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DiagnoseInterconnectRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.diagnose_interconnect..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.diagnose_interconnect.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.diagnose_interconnect.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :diagnose_interconnect, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#diagnose_network(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse #diagnose_network(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse

Get the diagnostics of a single network resource.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse.
p result

Overloads:

  • #diagnose_network(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse

    Pass arguments to diagnose_network via a request object, either of type DiagnoseNetworkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #diagnose_network(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkResponse

    Pass arguments to diagnose_network 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) (defaults to: nil)

      Required. The name of the network resource.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 783

def diagnose_network request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DiagnoseNetworkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.diagnose_network..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.diagnose_network.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.diagnose_network.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :diagnose_network, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#diagnose_router(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse #diagnose_router(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse

Get the diagnostics of a single router resource.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse.
p result

Overloads:

  • #diagnose_router(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse

    Pass arguments to diagnose_router via a request object, either of type DiagnoseRouterRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #diagnose_router(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterResponse

    Pass arguments to diagnose_router 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) (defaults to: nil)

      Required. The name of the router resource.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2462

def diagnose_router request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::DiagnoseRouterRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.diagnose_router..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.diagnose_router.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.diagnose_router.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :diagnose_router, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_interconnect(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Interconnect #get_interconnect(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Interconnect

Gets details of a single Interconnect.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::Interconnect.
p result

Overloads:

  • #get_interconnect(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Interconnect

    Pass arguments to get_interconnect via a request object, either of type GetInterconnectRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::GetInterconnectRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_interconnect(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Interconnect

    Pass arguments to get_interconnect 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) (defaults to: nil)

      Required. Name of the resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1704

def get_interconnect request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetInterconnectRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_interconnect..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_interconnect.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_interconnect.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :get_interconnect, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_interconnect_attachment(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment #get_interconnect_attachment(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment

Gets details of a single InterconnectAttachment.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::InterconnectAttachment.
p result

Overloads:

  • #get_interconnect_attachment(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment

    Pass arguments to get_interconnect_attachment via a request object, either of type GetInterconnectAttachmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::GetInterconnectAttachmentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_interconnect_attachment(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment

    Pass arguments to get_interconnect_attachment 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) (defaults to: nil)

      Required. Name of the resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1973

def get_interconnect_attachment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetInterconnectAttachmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_interconnect_attachment..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_interconnect_attachment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_interconnect_attachment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :get_interconnect_attachment, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_network(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Network #get_network(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Network

Gets details of a single Network.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::Network.
p result

Overloads:

  • #get_network(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Network

    Pass arguments to get_network via a request object, either of type GetNetworkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::GetNetworkRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_network(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Network

    Pass arguments to get_network 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) (defaults to: nil)

      Required. Name of the resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 698

def get_network request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetNetworkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_network..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_network.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_network.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :get_network, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_router(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Router #get_router(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Router

Gets details of a single Router.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::Router.
p result

Overloads:

  • #get_router(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Router

    Pass arguments to get_router via a request object, either of type GetRouterRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::GetRouterRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_router(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Router

    Pass arguments to get_router 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) (defaults to: nil)

      Required. Name of the resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2377

def get_router request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetRouterRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_router..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_router.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_router.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :get_router, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_subnet(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Subnet #get_subnet(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Subnet

Gets details of a single Subnet.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::Subnet.
p result

Overloads:

  • #get_subnet(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Subnet

    Pass arguments to get_subnet via a request object, either of type GetSubnetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::GetSubnetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_subnet(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Subnet

    Pass arguments to get_subnet 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) (defaults to: nil)

      Required. Name of the resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1187

def get_subnet request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetSubnetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_subnet..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_subnet.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_subnet.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :get_subnet, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_zone(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Zone #get_zone(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Zone

Deprecated.

This method is deprecated and may be removed in the next major version update.

Deprecated: not implemented. Gets details of a single Zone.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::Zone.
p result

Overloads:

  • #get_zone(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Zone

    Pass arguments to get_zone via a request object, either of type GetZoneRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::GetZoneRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_zone(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::Zone

    Pass arguments to get_zone 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) (defaults to: nil)

      Required. Name of the resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 514

def get_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::GetZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_zone..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :get_zone, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#initialize_zone(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse #initialize_zone(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse

InitializeZone will initialize resources for a zone in a project.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

# The returned object is of type Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse.
p result

Overloads:

  • #initialize_zone(request, options = nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse

    Pass arguments to initialize_zone via a request object, either of type InitializeZoneRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::InitializeZoneRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #initialize_zone(name: nil) ⇒ ::Google::Cloud::EdgeNetwork::V1::InitializeZoneResponse

    Pass arguments to initialize_zone 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) (defaults to: nil)

      Required. The name of the zone resource.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 324

def initialize_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::InitializeZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.initialize_zone..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.initialize_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.initialize_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :initialize_zone, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_interconnect_attachments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment> #list_interconnect_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment>

Lists InterconnectAttachments in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

# Call the list_interconnect_attachments method.
result = client.list_interconnect_attachments 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::EdgeNetwork::V1::InterconnectAttachment.
  p item
end

Overloads:

  • #list_interconnect_attachments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment>

    Pass arguments to list_interconnect_attachments via a request object, either of type ListInterconnectAttachmentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_interconnect_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::InterconnectAttachment>

    Pass arguments to list_interconnect_attachments 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) (defaults to: nil)

      Required. Parent value for ListInterconnectAttachmentsRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1887

def list_interconnect_attachments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListInterconnectAttachmentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_interconnect_attachments..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_interconnect_attachments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_interconnect_attachments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :list_interconnect_attachments, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @edge_network_stub, :list_interconnect_attachments, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_interconnects(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Interconnect> #list_interconnects(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Interconnect>

Lists Interconnects in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

# Call the list_interconnects method.
result = client.list_interconnects 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::EdgeNetwork::V1::Interconnect.
  p item
end

Overloads:

  • #list_interconnects(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Interconnect>

    Pass arguments to list_interconnects via a request object, either of type ListInterconnectsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::ListInterconnectsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_interconnects(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Interconnect>

    Pass arguments to list_interconnects 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) (defaults to: nil)

      Required. Parent value for ListInterconnectsRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1618

def list_interconnects request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListInterconnectsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_interconnects..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_interconnects.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_interconnects.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :list_interconnects, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @edge_network_stub, :list_interconnects, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_networks(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Network> #list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Network>

Lists Networks in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

# Call the list_networks method.
result = client.list_networks 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::EdgeNetwork::V1::Network.
  p item
end

Overloads:

  • #list_networks(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Network>

    Pass arguments to list_networks via a request object, either of type ListNetworksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::ListNetworksRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Network>

    Pass arguments to list_networks 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) (defaults to: nil)

      Required. Parent value for ListNetworksRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 612

def list_networks request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListNetworksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_networks..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_networks.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_networks.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :list_networks, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @edge_network_stub, :list_networks, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_routers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Router> #list_routers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Router>

Lists Routers in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

# Call the list_routers method.
result = client.list_routers 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::EdgeNetwork::V1::Router.
  p item
end

Overloads:

  • #list_routers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Router>

    Pass arguments to list_routers via a request object, either of type ListRoutersRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::ListRoutersRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_routers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Router>

    Pass arguments to list_routers 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) (defaults to: nil)

      Required. Parent value for ListRoutersRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2291

def list_routers request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListRoutersRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_routers..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_routers.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_routers.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :list_routers, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @edge_network_stub, :list_routers, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_subnets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Subnet> #list_subnets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Subnet>

Lists Subnets in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

# Call the list_subnets method.
result = client.list_subnets 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::EdgeNetwork::V1::Subnet.
  p item
end

Overloads:

  • #list_subnets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Subnet>

    Pass arguments to list_subnets via a request object, either of type ListSubnetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::ListSubnetsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_subnets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Subnet>

    Pass arguments to list_subnets 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) (defaults to: nil)

      Required. Parent value for ListSubnetsRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1101

def list_subnets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListSubnetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_subnets..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_subnets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_subnets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :list_subnets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @edge_network_stub, :list_subnets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_zones(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Zone> #list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Zone>

Deprecated.

This method is deprecated and may be removed in the next major version update.

Deprecated: not implemented. Lists Zones in a given project and location.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

# Call the list_zones method.
result = client.list_zones 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::EdgeNetwork::V1::Zone.
  p item
end

Overloads:

  • #list_zones(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Zone>

    Pass arguments to list_zones via a request object, either of type ListZonesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::ListZonesRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::EdgeNetwork::V1::Zone>

    Pass arguments to list_zones 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) (defaults to: nil)

      Required. Parent value for ListZonesRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 425

def list_zones request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::ListZonesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_zones..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_zones.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_zones.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :list_zones, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @edge_network_stub, :list_zones, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


190
191
192
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 190

def universe_domain
  @edge_network_stub.universe_domain
end

#update_router(request, options = nil) ⇒ ::Gapic::Operation #update_router(update_mask: nil, router: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Router.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #update_router(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_router via a request object, either of type UpdateRouterRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::UpdateRouterRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_router(update_mask: nil, router: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_router 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, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Router 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.

    • router (::Google::Cloud::EdgeNetwork::V1::Router, ::Hash) (defaults to: nil)

      Required. The resource being updated

    • request_id (::String) (defaults to: nil)

      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.



2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 2687

def update_router request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::UpdateRouterRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_router..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.router&.name
    header_params["router.name"] = request.router.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_router.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_router.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :update_router, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_subnet(request, options = nil) ⇒ ::Gapic::Operation #update_subnet(update_mask: nil, subnet: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Subnet.

Examples:

Basic example

require "google/cloud/edge_network/v1"

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

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

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

Overloads:

  • #update_subnet(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_subnet via a request object, either of type UpdateSubnetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::EdgeNetwork::V1::UpdateSubnetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_subnet(update_mask: nil, subnet: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_subnet 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, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Subnet 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.

    • subnet (::Google::Cloud::EdgeNetwork::V1::Subnet, ::Hash) (defaults to: nil)

      Required. The resource being updated

    • request_id (::String) (defaults to: nil)

      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.



1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
# File 'lib/google/cloud/edge_network/v1/edge_network/client.rb', line 1412

def update_subnet request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeNetwork::V1::UpdateSubnetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_subnet..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::EdgeNetwork::V1::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.subnet&.name
    header_params["subnet.name"] = request.subnet.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_subnet.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_subnet.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @edge_network_stub.call_rpc :update_subnet, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end