Connect Gateway V1beta1 API - Class Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client (v0.1.5)

Reference documentation and code samples for the Connect Gateway V1beta1 API class Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.

Client for the GatewayService service.

Gateway service is a public API which works as a Kubernetes resource model proxy between end users and registered Kubernetes clusters. Each RPC in this service matches with an HTTP verb. End user will initiate kubectl commands against the Gateway service, and Gateway service will forward user requests to clusters.

Inherits

  • Object

Methods

.configure

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

Configure the GatewayService 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 GatewayService clients
::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the GatewayService 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

#delete_resource

def delete_resource(request, options = nil) -> ::Google::Api::HttpBody
def delete_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody

DeleteResource performs an HTTP DELETE on the Kubernetes API Server.

Overloads
def delete_resource(request, options = nil) -> ::Google::Api::HttpBody
Pass arguments to delete_resource via a request object, either of type Api::HttpBody or an equivalent Hash.
Parameters
  • request (::Google::Api::HttpBody, ::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_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody
Pass arguments to delete_resource 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
  • content_type (::String) — The HTTP Content-Type header value specifying the content type of the body.
  • data (::String) — The HTTP request/response body as raw binary.
  • extensions (::Array<::Google::Protobuf::Any, ::Hash>) — Application specific response metadata. Must be set in the first response for streaming 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/gke_connect/gateway/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Api::HttpBody.new

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

# The returned object is of type Google::Api::HttpBody.
p result

#get_resource

def get_resource(request, options = nil) -> ::Google::Api::HttpBody
def get_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody

GetResource performs an HTTP GET request on the Kubernetes API Server.

Overloads
def get_resource(request, options = nil) -> ::Google::Api::HttpBody
Pass arguments to get_resource via a request object, either of type Api::HttpBody or an equivalent Hash.
Parameters
  • request (::Google::Api::HttpBody, ::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_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody
Pass arguments to get_resource 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
  • content_type (::String) — The HTTP Content-Type header value specifying the content type of the body.
  • data (::String) — The HTTP request/response body as raw binary.
  • extensions (::Array<::Google::Protobuf::Any, ::Hash>) — Application specific response metadata. Must be set in the first response for streaming 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/gke_connect/gateway/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Api::HttpBody.new

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

# The returned object is of type Google::Api::HttpBody.
p result

#initialize

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

Create a new GatewayService client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new do |config|
  config.timeout = 10.0
end

#patch_resource

def patch_resource(request, options = nil) -> ::Google::Api::HttpBody
def patch_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody

PatchResource performs an HTTP PATCH on the Kubernetes API Server.

Overloads
def patch_resource(request, options = nil) -> ::Google::Api::HttpBody
Pass arguments to patch_resource via a request object, either of type Api::HttpBody or an equivalent Hash.
Parameters
  • request (::Google::Api::HttpBody, ::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 patch_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody
Pass arguments to patch_resource 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
  • content_type (::String) — The HTTP Content-Type header value specifying the content type of the body.
  • data (::String) — The HTTP request/response body as raw binary.
  • extensions (::Array<::Google::Protobuf::Any, ::Hash>) — Application specific response metadata. Must be set in the first response for streaming 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/gke_connect/gateway/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Api::HttpBody.new

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

# The returned object is of type Google::Api::HttpBody.
p result

#post_resource

def post_resource(request, options = nil) -> ::Google::Api::HttpBody
def post_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody

PostResource performs an HTTP POST on the Kubernetes API Server.

Overloads
def post_resource(request, options = nil) -> ::Google::Api::HttpBody
Pass arguments to post_resource via a request object, either of type Api::HttpBody or an equivalent Hash.
Parameters
  • request (::Google::Api::HttpBody, ::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 post_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody
Pass arguments to post_resource 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
  • content_type (::String) — The HTTP Content-Type header value specifying the content type of the body.
  • data (::String) — The HTTP request/response body as raw binary.
  • extensions (::Array<::Google::Protobuf::Any, ::Hash>) — Application specific response metadata. Must be set in the first response for streaming 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/gke_connect/gateway/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Api::HttpBody.new

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

# The returned object is of type Google::Api::HttpBody.
p result

#put_resource

def put_resource(request, options = nil) -> ::Google::Api::HttpBody
def put_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody

PutResource performs an HTTP PUT on the Kubernetes API Server.

Overloads
def put_resource(request, options = nil) -> ::Google::Api::HttpBody
Pass arguments to put_resource via a request object, either of type Api::HttpBody or an equivalent Hash.
Parameters
  • request (::Google::Api::HttpBody, ::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 put_resource(content_type: nil, data: nil, extensions: nil) -> ::Google::Api::HttpBody
Pass arguments to put_resource 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
  • content_type (::String) — The HTTP Content-Type header value specifying the content type of the body.
  • data (::String) — The HTTP request/response body as raw binary.
  • extensions (::Array<::Google::Protobuf::Any, ::Hash>) — Application specific response metadata. Must be set in the first response for streaming 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/gke_connect/gateway/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Api::HttpBody.new

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

# The returned object is of type Google::Api::HttpBody.
p result