Agent Registry V1 API - Class Google::Cloud::AgentRegistry::V1::AgentRegistry::Client (v0.1.0)

Reference documentation and code samples for the Agent Registry V1 API class Google::Cloud::AgentRegistry::V1::AgentRegistry::Client.

Client for the AgentRegistry service.

Service for managing Agents, Endpoints, McpServers, Services, and Bindings.

Inherits

  • Object

Methods

.configure

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

Configure the AgentRegistry 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 AgentRegistry clients
::Google::Cloud::AgentRegistry::V1::AgentRegistry::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the AgentRegistry 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_binding

def create_binding(request, options = nil) -> ::Gapic::Operation
def create_binding(parent: nil, binding_id: nil, binding: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Binding in a given project and location.

Overloads
def create_binding(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_binding via a request object, either of type CreateBindingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::CreateBindingRequest, ::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_binding(parent: nil, binding_id: nil, binding: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_binding via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The project and location to create the Binding in. Expected format: projects/{project}/locations/{location}.
  • binding_id (::String) — Required. The ID to use for the binding, which will become the final component of the binding's resource name.

    This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it must match the regular expression ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.

  • binding (::Google::Cloud::AgentRegistry::V1::Binding, ::Hash) — Required. The Binding resource that is being created.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

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

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

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

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

def create_service(request, options = nil) -> ::Gapic::Operation
def create_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Service in a given project and location.

Overloads
def create_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_service via a request object, either of type CreateServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::CreateServiceRequest, ::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_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The project and location to create the Service in. Expected format: projects/{project}/locations/{location}.
  • service_id (::String) — Required. The ID to use for the service, which will become the final component of the service's resource name.

    This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

  • service (::Google::Cloud::AgentRegistry::V1::Service, ::Hash) — Required. The Service resource that is being created. Format: projects/{project}/locations/{location}/services/{service}.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

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

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

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

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

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

Deletes a single Binding.

Overloads
def delete_binding(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_binding via a request object, either of type DeleteBindingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::DeleteBindingRequest, ::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_binding(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_binding via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

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

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

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

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

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

Deletes a single Service.

Overloads
def delete_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_service via a request object, either of type DeleteServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::DeleteServiceRequest, ::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_service(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

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

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

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

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

#fetch_available_bindings

def fetch_available_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>
def fetch_available_bindings(source_identifier: nil, target_identifier: nil, parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>

Fetches available Bindings.

Overloads
def fetch_available_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>
Pass arguments to fetch_available_bindings via a request object, either of type FetchAvailableBindingsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::FetchAvailableBindingsRequest, ::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 fetch_available_bindings(source_identifier: nil, target_identifier: nil, parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>
Pass arguments to fetch_available_bindings 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
  • source_identifier (::String) —

    The identifier of the source Agent. Format:

    • urn:agent:{publisher}:{namespace}:{name}
  • target_identifier (::String) —

    Optional. The identifier of the target Agent, MCP Server, or Endpoint. Format:

    • urn:agent:{publisher}:{namespace}:{name}
    • urn:mcp:{publisher}:{namespace}:{name}
    • urn:endpoint:{publisher}:{namespace}:{name}
  • parent (::String) — Required. The parent, in the format projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. Page size is 500 if unspecified and is capped at 500 even if a larger value is given.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
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/agent_registry/v1"

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

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

# Call the fetch_available_bindings method.
result = client.fetch_available_bindings 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::AgentRegistry::V1::Binding.
  p item
end

#get_agent

def get_agent(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Agent
def get_agent(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Agent

Gets details of a single Agent.

Overloads
def get_agent(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Agent
Pass arguments to get_agent via a request object, either of type GetAgentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::GetAgentRequest, ::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_agent(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Agent
Pass arguments to get_agent via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource
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/agent_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::AgentRegistry::V1::Agent.
p result

#get_binding

def get_binding(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Binding
def get_binding(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Binding

Gets details of a single Binding.

Overloads
def get_binding(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Binding
Pass arguments to get_binding via a request object, either of type GetBindingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::GetBindingRequest, ::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_binding(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Binding
Pass arguments to get_binding 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. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.
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/agent_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::AgentRegistry::V1::Binding.
p result

#get_endpoint

def get_endpoint(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Endpoint
def get_endpoint(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Endpoint

Gets details of a single Endpoint.

Overloads
def get_endpoint(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Endpoint
Pass arguments to get_endpoint via a request object, either of type GetEndpointRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::GetEndpointRequest, ::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_endpoint(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Endpoint
Pass arguments to get_endpoint 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. The name of the endpoint to retrieve. Format: projects/{project}/locations/{location}/endpoints/{endpoint}
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/agent_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::AgentRegistry::V1::Endpoint.
p result

#get_mcp_server

def get_mcp_server(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::McpServer
def get_mcp_server(name: nil) -> ::Google::Cloud::AgentRegistry::V1::McpServer

Gets details of a single McpServer.

Overloads
def get_mcp_server(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::McpServer
Pass arguments to get_mcp_server via a request object, either of type GetMcpServerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::GetMcpServerRequest, ::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_mcp_server(name: nil) -> ::Google::Cloud::AgentRegistry::V1::McpServer
Pass arguments to get_mcp_server via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource
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/agent_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::AgentRegistry::V1::McpServer.
p result

#get_service

def get_service(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Service
def get_service(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Service

Gets details of a single Service.

Overloads
def get_service(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Service
Pass arguments to get_service via a request object, either of type GetServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::GetServiceRequest, ::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_service(name: nil) -> ::Google::Cloud::AgentRegistry::V1::Service
Pass arguments to get_service 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. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.
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/agent_registry/v1"

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

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

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

# The returned object is of type Google::Cloud::AgentRegistry::V1::Service.
p result

#initialize

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

Create a new AgentRegistry client object.

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

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

#list_agents

def list_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
def list_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>

Lists Agents in a given project and location.

Overloads
def list_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
Pass arguments to list_agents via a request object, either of type ListAgentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::ListAgentsRequest, ::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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
Pass arguments to list_agents 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 value for ListAgentsRequest
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) — Optional. Filtering results
  • order_by (::String) — Optional. 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.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

# Call the list_agents method.
result = client.list_agents 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::AgentRegistry::V1::Agent.
  p item
end

#list_bindings

def list_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>
def list_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>

Lists Bindings in a given project and location.

Overloads
def list_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>
Pass arguments to list_bindings via a request object, either of type ListBindingsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::ListBindingsRequest, ::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_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>
Pass arguments to list_bindings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The project and location to list bindings in. Expected format: projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. Page size is 500 if unspecified and is capped at 500 even if a larger value is given.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) — Optional. A query string used to filter the list of bindings returned. The filter expression must follow AIP-160 syntax.
  • order_by (::String) — Optional. 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.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

# Call the list_bindings method.
result = client.list_bindings 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::AgentRegistry::V1::Binding.
  p item
end

#list_endpoints

def list_endpoints(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>
def list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>

Lists Endpoints in a given project and location.

Overloads
def list_endpoints(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>
Pass arguments to list_endpoints via a request object, either of type ListEndpointsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::ListEndpointsRequest, ::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_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>
Pass arguments to list_endpoints via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The project and location to list endpoints in. Expected format: projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) —

    Optional. A query string used to filter the list of endpoints returned. The filter expression must follow AIP-160 syntax.

    Filtering is supported on the name, display_name, description, version, and interfaces fields.

    Some examples:

    • name = "projects/p1/locations/l1/endpoints/e1"
    • display_name = "my-endpoint"
    • description = "my-endpoint-description"
    • version = "v1"
    • interfaces.transport = "HTTP_JSON"
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/agent_registry/v1"

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

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

# Call the list_endpoints method.
result = client.list_endpoints 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::AgentRegistry::V1::Endpoint.
  p item
end

#list_mcp_servers

def list_mcp_servers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
def list_mcp_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>

Lists McpServers in a given project and location.

Overloads
def list_mcp_servers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
Pass arguments to list_mcp_servers via a request object, either of type ListMcpServersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::ListMcpServersRequest, ::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_mcp_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
Pass arguments to list_mcp_servers 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 value for ListMcpServersRequest. Format: projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) — Optional. Filtering results
  • order_by (::String) — Optional. 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.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

# Call the list_mcp_servers method.
result = client.list_mcp_servers 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::AgentRegistry::V1::McpServer.
  p item
end

#list_services

def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>
def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>

Lists Services in a given project and location.

Overloads
def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>
Pass arguments to list_services via a request object, either of type ListServicesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::ListServicesRequest, ::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_services(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>
Pass arguments to list_services via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The project and location to list services in. Expected format: projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) —

    Optional. A query string used to filter the list of services returned. The filter expression must follow AIP-160 syntax.

    Filtering is supported on the name, display_name, description, and labels fields.

    Some examples:

    • name = "projects/p1/locations/l1/services/s1"
    • display_name = "my-service"
    • description : "myservice description"
    • labels.env = "prod"
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/agent_registry/v1"

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

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

# Call the list_services method.
result = client.list_services 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::AgentRegistry::V1::Service.
  p item
end

#location_client

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

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

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

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Operations

Get the associated client for long-running operations.

#search_agents

def search_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
def search_agents(parent: nil, search_string: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>

Searches Agents in a given project and location.

Overloads
def search_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
Pass arguments to search_agents via a request object, either of type SearchAgentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::SearchAgentsRequest, ::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 search_agents(parent: nil, search_string: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
Pass arguments to search_agents 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 value for SearchAgentsRequest. Format: projects/{project}/locations/{location}.
  • search_string (::String) —

    Optional. Search criteria used to select the Agents to return. If no search criteria is specified then all accessible Agents will be returned.

    Search expressions can be used to restrict results based upon searchable fields, where the operators can be used along with the suffix wildcard symbol *. See instructions for more details.

    Allowed operators: =, :, NOT, AND, OR, and ().

    Searchable fields:

    | Field | = | : | * | Keyword Search | |--------------------|-----|-----|-----|----------------| | agentId | Yes | Yes | Yes | Included | | name | No | Yes | Yes | Included | | displayName | No | Yes | Yes | Included | | description | No | Yes | No | Included | | skills | No | Yes | No | Included | | skills.id | No | Yes | No | Included | | skills.name | No | Yes | No | Included | | skills.description | No | Yes | No | Included | | skills.tags | No | Yes | No | Included | | skills.examples | No | Yes | No | Included |

    Examples:

    • agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234" to find the agent with the specified agent ID.
    • name:important to find agents whose name contains important as a word.
    • displayName:works* to find agents whose display name contains words that start with works.
    • skills.tags:test to find agents whose skills tags contain test.
    • planner OR booking to find agents whose metadata contains the words planner or booking.
  • page_size (::Integer) — Optional. The maximum number of search results to return per page. The page size is capped at 100, even if a larger value is specified. A negative value will result in an INVALID_ARGUMENT error. If unspecified or set to 0, a default value of 20 will be used. The server may return fewer results than requested.
  • page_token (::String) — Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.
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/agent_registry/v1"

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

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

# Call the search_agents method.
result = client.search_agents 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::AgentRegistry::V1::Agent.
  p item
end

#search_mcp_servers

def search_mcp_servers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
def search_mcp_servers(parent: nil, search_string: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>

Searches McpServers in a given project and location.

Overloads
def search_mcp_servers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
Pass arguments to search_mcp_servers via a request object, either of type SearchMcpServersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::SearchMcpServersRequest, ::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 search_mcp_servers(parent: nil, search_string: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
Pass arguments to search_mcp_servers 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 value for SearchMcpServersRequest. Format: projects/{project}/locations/{location}.
  • search_string (::String) —

    Optional. Search criteria used to select the MCP Servers to return. If no search criteria is specified then all accessible MCP Servers will be returned.

    Search expressions can be used to restrict results based upon searchable fields, where the operators can be used along with the suffix wildcard symbol *. See instructions for more details.

    Allowed operators: =, :, NOT, AND, OR, and ().

    Searchable fields:

    | Field | = | : | * | Keyword Search | |--------------------|-----|-----|-----|----------------| | mcpServerId | Yes | Yes | Yes | Included | | name | No | Yes | Yes | Included | | displayName | No | Yes | Yes | Included |

    Examples:

    • mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id" to find the MCP Server with the specified MCP Server ID.
    • name:important to find MCP Servers whose name contains important as a word.
    • displayName:works* to find MCP Servers whose display name contains words that start with works.
    • planner OR booking to find MCP Servers whose metadata contains the words planner or booking.
    • mcpServerId:service-id AND (displayName:planner OR displayName:booking) to find MCP Servers whose MCP Server ID contains service-id and whose display name contains planner or booking.
  • page_size (::Integer) — Optional. The maximum number of search results to return per page. The page size is capped at 100, even if a larger value is specified. A negative value will result in an INVALID_ARGUMENT error. If unspecified or set to 0, a default value of 20 will be used. The server may return fewer results than requested.
  • page_token (::String) — Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.
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/agent_registry/v1"

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

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

# Call the search_mcp_servers method.
result = client.search_mcp_servers 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::AgentRegistry::V1::McpServer.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_binding

def update_binding(request, options = nil) -> ::Gapic::Operation
def update_binding(binding: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Binding.

Overloads
def update_binding(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_binding via a request object, either of type UpdateBindingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::UpdateBindingRequest, ::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_binding(binding: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_binding 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
  • binding (::Google::Cloud::AgentRegistry::V1::Binding, ::Hash) — Required. The Binding resource that is being updated.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the Binding 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 present in the request will be overwritten.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

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

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

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

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

def update_service(request, options = nil) -> ::Gapic::Operation
def update_service(update_mask: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Service.

Overloads
def update_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_service via a request object, either of type UpdateServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AgentRegistry::V1::UpdateServiceRequest, ::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_service(update_mask: nil, service: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_service 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) — Optional. Field mask is used to specify the fields to be overwritten in the Service 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 present in the request will be overwritten.
  • service (::Google::Cloud::AgentRegistry::V1::Service, ::Hash) — Required. The Service resource that is being updated. Format: projects/{project}/locations/{location}/services/{service}.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

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

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

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/agent_registry/v1"

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

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

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