Reference documentation and code samples for the Agent Registry V1 API class Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.
REST client for the AgentRegistry service.
Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the AgentRegistry Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AgentRegistry clients ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_binding
def create_binding(request, options = nil) -> ::Gapic::Operation
def create_binding(parent: nil, binding_id: nil, binding: nil, request_id: nil) -> ::Gapic::OperationCreates a new Binding in a given project and location.
def create_binding(request, options = nil) -> ::Gapic::Operationcreate_binding via a request object, either of type
CreateBindingRequest or an equivalent Hash.
- 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::Operationcreate_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).
-
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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::OperationCreates a new Service in a given project and location.
def create_service(request, options = nil) -> ::Gapic::Operationcreate_service via a request object, either of type
CreateServiceRequest or an equivalent Hash.
- 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::Operationcreate_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).
-
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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::OperationDeletes a single Binding.
def delete_binding(request, options = nil) -> ::Gapic::Operationdelete_binding via a request object, either of type
DeleteBindingRequest or an equivalent Hash.
- 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::Operationdelete_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).
-
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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::OperationDeletes a single Service.
def delete_service(request, options = nil) -> ::Gapic::Operationdelete_service via a request object, either of type
DeleteServiceRequest or an equivalent Hash.
- 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::Operationdelete_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).
-
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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>Fetches available Bindings.
def fetch_available_bindings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>fetch_available_bindings via a request object, either of type
FetchAvailableBindingsRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>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).
-
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
500even if a larger value is given. - page_token (::String) — Optional. A token identifying a page of results the server should return.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::AgentGets details of a single Agent.
def get_agent(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Agentget_agent via a request object, either of type
GetAgentRequest or an equivalent Hash.
- 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::Agentget_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).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AgentRegistry::V1::Agent)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::BindingGets details of a single Binding.
def get_binding(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Bindingget_binding via a request object, either of type
GetBindingRequest or an equivalent Hash.
- 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::Bindingget_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).
-
name (::String) — Required. The name of the Binding.
Format:
projects/{project}/locations/{location}/bindings/{binding}.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AgentRegistry::V1::Binding)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::EndpointGets details of a single Endpoint.
def get_endpoint(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Endpointget_endpoint via a request object, either of type
GetEndpointRequest or an equivalent Hash.
- 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::Endpointget_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).
-
name (::String) — Required. The name of the endpoint to retrieve.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AgentRegistry::V1::Endpoint)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::McpServerGets details of a single McpServer.
def get_mcp_server(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::McpServerget_mcp_server via a request object, either of type
GetMcpServerRequest or an equivalent Hash.
- 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::McpServerget_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).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AgentRegistry::V1::McpServer)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::ServiceGets details of a single Service.
def get_service(request, options = nil) -> ::Google::Cloud::AgentRegistry::V1::Serviceget_service via a request object, either of type
GetServiceRequest or an equivalent Hash.
- 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::Serviceget_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).
-
name (::String) — Required. The name of the Service.
Format:
projects/{project}/locations/{location}/services/{service}.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AgentRegistry::V1::Service)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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| ... } -> ClientCreate a new AgentRegistry REST client object.
- (config) — Configure the AgentRegistry client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new do |config| config.timeout = 10.0 end
#list_agents
def list_agents(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
def list_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>Lists Agents in a given project and location.
def list_agents(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>list_agents via a request object, either of type
ListAgentsRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>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).
- 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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>
def list_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>Lists Bindings in a given project and location.
def list_bindings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>list_bindings via a request object, either of type
ListBindingsRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>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).
-
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
500even 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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>
def list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>Lists Endpoints in a given project and location.
def list_endpoints(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>list_endpoints via a request object, either of type
ListEndpointsRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>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).
-
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, andinterfacesfields.Some examples:
name = "projects/p1/locations/l1/endpoints/e1"display_name = "my-endpoint"description = "my-endpoint-description"version = "v1"interfaces.transport = "HTTP_JSON"
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
def list_mcp_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>Lists McpServers in a given project and location.
def list_mcp_servers(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>list_mcp_servers via a request object, either of type
ListMcpServersRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>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).
-
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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>
def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>Lists Services in a given project and location.
def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>list_services via a request object, either of type
ListServicesRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>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).
-
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, andlabelsfields.Some examples:
name = "projects/p1/locations/l1/services/s1"display_name = "my-service"description : "myservice description"labels.env = "prod"
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::OperationsGet the associated client for long-running operations.
#search_agents
def search_agents(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>
def search_agents(parent: nil, search_string: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>Searches Agents in a given project and location.
def search_agents(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>search_agents via a request object, either of type
SearchAgentsRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>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).
-
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:importantto find agents whose name containsimportantas a word.displayName:works*to find agents whose display name contains words that start withworks.skills.tags:testto find agents whose skills tags containtest.planner OR bookingto find agents whose metadata contains the wordsplannerorbooking.
-
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 anINVALID_ARGUMENTerror. If unspecified or set to0, a default value of20will 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_tokenmust be the value ofnext_page_tokenfrom the previous response. The values of all other method parameters, must be identical to those in the previous call.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>
def search_mcp_servers(parent: nil, search_string: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>Searches McpServers in a given project and location.
def search_mcp_servers(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>search_mcp_servers via a request object, either of type
SearchMcpServersRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>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).
-
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:importantto find MCP Servers whose name containsimportantas a word.displayName:works*to find MCP Servers whose display name contains words that start withworks.planner OR bookingto find MCP Servers whose metadata contains the wordsplannerorbooking.mcpServerId:service-id AND (displayName:planner OR displayName:booking)to find MCP Servers whose MCP Server ID containsservice-idand whose display name containsplannerorbooking.
-
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 anINVALID_ARGUMENTerror. If unspecified or set to0, a default value of20will 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_tokenmust be the value ofnext_page_tokenfrom the previous response. The values of all other method parameters, must be identical to those in the previous call.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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() -> StringThe effective universe domain
- (String)
#update_binding
def update_binding(request, options = nil) -> ::Gapic::Operation
def update_binding(binding: nil, update_mask: nil, request_id: nil) -> ::Gapic::OperationUpdates the parameters of a single Binding.
def update_binding(request, options = nil) -> ::Gapic::Operationupdate_binding via a request object, either of type
UpdateBindingRequest or an equivalent Hash.
- 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::Operationupdate_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).
- 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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::OperationUpdates the parameters of a single Service.
def update_service(request, options = nil) -> ::Gapic::Operationupdate_service via a request object, either of type
UpdateServiceRequest or an equivalent Hash.
- 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::Operationupdate_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).
- 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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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