API Gateway V1 API - Class Google::Cloud::ApiGateway::V1::ApiGatewayService::Client (v0.6.2)

Reference documentation and code samples for the API Gateway V1 API class Google::Cloud::ApiGateway::V1::ApiGatewayService::Client.

Client for the ApiGatewayService service.

The API Gateway Service is the interface for managing API Gateways.

Inherits

  • Object

Methods

.configure

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

Configure the ApiGatewayService Client class.

See Configuration for a description of the configuration fields.

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

#configure

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

Configure the ApiGatewayService Client instance.

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

See Configuration for a description of the configuration fields.

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

#create_api

def create_api(request, options = nil) -> ::Gapic::Operation
def create_api(parent: nil, api_id: nil, api: nil) -> ::Gapic::Operation

Creates a new Api in a given project and location.

Overloads
def create_api(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_api via a request object, either of type CreateApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::CreateApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_api(parent: nil, api_id: nil, api: nil) -> ::Gapic::Operation
Pass arguments to create_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent resource of the API, of the form: projects/*/locations/global
  • api_id (::String) — Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
  • api (::Google::Cloud::ApiGateway::V1::Api, ::Hash) — Required. API resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

#create_api_config

def create_api_config(request, options = nil) -> ::Gapic::Operation
def create_api_config(parent: nil, api_config_id: nil, api_config: nil) -> ::Gapic::Operation

Creates a new ApiConfig in a given project and location.

Overloads
def create_api_config(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_api_config via a request object, either of type CreateApiConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::CreateApiConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_api_config(parent: nil, api_config_id: nil, api_config: nil) -> ::Gapic::Operation
Pass arguments to create_api_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*
  • api_config_id (::String) — Required. Identifier to assign to the API Config. Must be unique within scope of the parent resource.
  • api_config (::Google::Cloud::ApiGateway::V1::ApiConfig, ::Hash) — Required. API resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

#create_gateway

def create_gateway(request, options = nil) -> ::Gapic::Operation
def create_gateway(parent: nil, gateway_id: nil, gateway: nil) -> ::Gapic::Operation

Creates a new Gateway in a given project and location.

Overloads
def create_gateway(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_gateway via a request object, either of type CreateGatewayRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::CreateGatewayRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_gateway(parent: nil, gateway_id: nil, gateway: nil) -> ::Gapic::Operation
Pass arguments to create_gateway via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent resource of the Gateway, of the form: projects/*/locations/*
  • gateway_id (::String) — Required. Identifier to assign to the Gateway. Must be unique within scope of the parent resource.
  • gateway (::Google::Cloud::ApiGateway::V1::Gateway, ::Hash) — Required. Gateway resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

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

#delete_api

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

Deletes a single Api.

Overloads
def delete_api(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_api via a request object, either of type DeleteApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::DeleteApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_api(name: nil) -> ::Gapic::Operation
Pass arguments to delete_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Resource name of the form: projects/*/locations/global/apis/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

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

#delete_api_config

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

Deletes a single ApiConfig.

Overloads
def delete_api_config(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_api_config via a request object, either of type DeleteApiConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::DeleteApiConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_api_config(name: nil) -> ::Gapic::Operation
Pass arguments to delete_api_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Resource name of the form: projects/*/locations/global/apis/*/configs/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

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

#delete_gateway

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

Deletes a single Gateway.

Overloads
def delete_gateway(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_gateway via a request object, either of type DeleteGatewayRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::DeleteGatewayRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_gateway(name: nil) -> ::Gapic::Operation
Pass arguments to delete_gateway via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Resource name of the form: projects/*/locations/*/gateways/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

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

#get_api

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

Gets details of a single Api.

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

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

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

#get_api_config

def get_api_config(request, options = nil) -> ::Google::Cloud::ApiGateway::V1::ApiConfig
def get_api_config(name: nil, view: nil) -> ::Google::Cloud::ApiGateway::V1::ApiConfig

Gets details of a single ApiConfig.

Overloads
def get_api_config(request, options = nil) -> ::Google::Cloud::ApiGateway::V1::ApiConfig
Pass arguments to get_api_config via a request object, either of type GetApiConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::GetApiConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_api_config(name: nil, view: nil) -> ::Google::Cloud::ApiGateway::V1::ApiConfig
Pass arguments to get_api_config 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
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

# The returned object is of type Google::Cloud::ApiGateway::V1::ApiConfig.
p result

#get_gateway

def get_gateway(request, options = nil) -> ::Google::Cloud::ApiGateway::V1::Gateway
def get_gateway(name: nil) -> ::Google::Cloud::ApiGateway::V1::Gateway

Gets details of a single Gateway.

Overloads
def get_gateway(request, options = nil) -> ::Google::Cloud::ApiGateway::V1::Gateway
Pass arguments to get_gateway via a request object, either of type GetGatewayRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::GetGatewayRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_gateway(name: nil) -> ::Google::Cloud::ApiGateway::V1::Gateway
Pass arguments to get_gateway via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Resource name of the form: projects/*/locations/*/gateways/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

# The returned object is of type Google::Cloud::ApiGateway::V1::Gateway.
p result

#initialize

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

Create a new ApiGatewayService client object.

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

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

#list_api_configs

def list_api_configs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::ApiConfig>
def list_api_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::ApiConfig>

Lists ApiConfigs in a given project and location.

Overloads
def list_api_configs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::ApiConfig>
Pass arguments to list_api_configs via a request object, either of type ListApiConfigsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::ListApiConfigsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_api_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::ApiConfig>
Pass arguments to list_api_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*
  • page_size (::Integer) — Page size.
  • page_token (::String) — Page token.
  • filter (::String) — Filter.
  • order_by (::String) — Order by parameters.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

# Call the list_api_configs method.
result = client.list_api_configs 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::ApiGateway::V1::ApiConfig.
  p item
end

#list_apis

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

Lists Apis in a given project and location.

Overloads
def list_apis(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::Api>
Pass arguments to list_apis via a request object, either of type ListApisRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::ListApisRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::Api>
Pass arguments to list_apis via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent resource of the API, of the form: projects/*/locations/global
  • page_size (::Integer) — Page size.
  • page_token (::String) — Page token.
  • filter (::String) — Filter.
  • order_by (::String) — Order by parameters.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

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

#list_gateways

def list_gateways(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::Gateway>
def list_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::Gateway>

Lists Gateways in a given project and location.

Overloads
def list_gateways(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::Gateway>
Pass arguments to list_gateways via a request object, either of type ListGatewaysRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::ListGatewaysRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ApiGateway::V1::Gateway>
Pass arguments to list_gateways via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent resource of the Gateway, of the form: projects/*/locations/*
  • page_size (::Integer) — Page size.
  • page_token (::String) — Page token.
  • filter (::String) — Filter.
  • order_by (::String) — Order by parameters.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

# Call the list_gateways method.
result = client.list_gateways 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::ApiGateway::V1::Gateway.
  p item
end

#operations_client

def operations_client() -> ::Google::Cloud::ApiGateway::V1::ApiGatewayService::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_api

def update_api(request, options = nil) -> ::Gapic::Operation
def update_api(update_mask: nil, api: nil) -> ::Gapic::Operation

Updates the parameters of a single Api.

Overloads
def update_api(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_api via a request object, either of type UpdateApiRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::UpdateApiRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_api(update_mask: nil, api: nil) -> ::Gapic::Operation
Pass arguments to update_api via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Field mask is used to specify the fields to be overwritten in the Api 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.
  • api (::Google::Cloud::ApiGateway::V1::Api, ::Hash) — Required. API resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

#update_api_config

def update_api_config(request, options = nil) -> ::Gapic::Operation
def update_api_config(update_mask: nil, api_config: nil) -> ::Gapic::Operation

Updates the parameters of a single ApiConfig.

Overloads
def update_api_config(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_api_config via a request object, either of type UpdateApiConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::UpdateApiConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_api_config(update_mask: nil, api_config: nil) -> ::Gapic::Operation
Pass arguments to update_api_config 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) — Field mask is used to specify the fields to be overwritten in the ApiConfig 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.
  • api_config (::Google::Cloud::ApiGateway::V1::ApiConfig, ::Hash) — Required. API Config resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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

#update_gateway

def update_gateway(request, options = nil) -> ::Gapic::Operation
def update_gateway(update_mask: nil, gateway: nil) -> ::Gapic::Operation

Updates the parameters of a single Gateway.

Overloads
def update_gateway(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_gateway via a request object, either of type UpdateGatewayRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiGateway::V1::UpdateGatewayRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_gateway(update_mask: nil, gateway: nil) -> ::Gapic::Operation
Pass arguments to update_gateway 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) — Field mask is used to specify the fields to be overwritten in the Gateway 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.
  • gateway (::Google::Cloud::ApiGateway::V1::Gateway, ::Hash) — Required. Gateway resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_gateway/v1"

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

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

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