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

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

REST 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::Rest::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

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

Create a new ApiGatewayService REST 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::Rest::Client.new

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

#list_api_configs

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

Lists ApiConfigs in a given project and location.

Overloads
def list_api_configs(request, options = nil) -> ::Google::Cloud::ApiGateway::V1::ListApiConfigsResponse
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) -> ::Google::Cloud::ApiGateway::V1::ListApiConfigsResponse
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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_apis

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

Lists Apis in a given project and location.

Overloads
def list_apis(request, options = nil) -> ::Google::Cloud::ApiGateway::V1::ListApisResponse
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) -> ::Google::Cloud::ApiGateway::V1::ListApisResponse
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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_gateways

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

Lists Gateways in a given project and location.

Overloads
def list_gateways(request, options = nil) -> ::Google::Cloud::ApiGateway::V1::ListGatewaysResponse
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) -> ::Google::Cloud::ApiGateway::V1::ListGatewaysResponse
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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#operations_client

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

Get the associated client for long-running operations.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.