Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.
REST client for the AgentAnomalyDetectionService service.
A service for managing Agent Anomaly Detection for monitored agents.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the AgentAnomalyDetectionService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AgentAnomalyDetectionService clients ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.configure do |config| config.timeout = 10.0 end
#aggregate_analyzed_sessions
def aggregate_analyzed_sessions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>
def aggregate_analyzed_sessions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>Aggregates AnalyzedSessions across MonitoredAgents.
To aggregate across all MonitoredAgents in a
location, use the following format for the parent field:
projects/{project}/locations/{location}/monitoredAgents/-
def aggregate_analyzed_sessions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>aggregate_analyzed_sessions via a request object, either of type
Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest, ::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 aggregate_analyzed_sessions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>aggregate_analyzed_sessions 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 parent MonitoredAgent resource. Use the
-wildcard for the monitored_agent segment to aggregate across multiple agents in the location. Format:projects/{project}/locations/{location}/monitoredAgents/{monitored_agent} -
filter (::String) — Optional. Filter expression restricting which AnalyzedSessions are included
in the aggregation. Supports a subset of the
ListAnalyzedSessionsRequest.filtergrammar: a closeddetection_timewindow with both bounds required. Theseverityclause is not supported here. If empty, the aggregation covers the last 3 days.Example:
detection_time >= "2024-01-01T00:00:00Z" AND detection_time <= "2024-01-08T00:00:00Z" - page_size (::Integer) — Optional. The standard list page size. The maximum value is 100; values above 100 will be coerced to 100. If unspecified, at most 10 MonitoredAgents will be returned.
- page_token (::String) — Optional. The standard list page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest.new # Call the aggregate_analyzed_sessions method. result = client.aggregate_analyzed_sessions 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::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate. p item end
#clear_training_data
def clear_training_data(request, options = nil) -> ::Gapic::Operation
def clear_training_data(name: nil) -> ::Gapic::OperationClears (purges) the trained model artifacts derived from a MonitoredAgent's data. The purged model is rebuilt by the next scheduled training run.
To clear every MonitoredAgent in a location's scope, use the - wildcard
agent segment for the name field:
projects/{project}/locations/{location}/monitoredAgents/-
This is the on-demand data-deletion path for customers who have deleted the underlying logs / observability data a model was trained on. It deletes only the derived model artifacts (it does NOT delete the scope or stop monitoring). To stop monitoring an agent entirely, disable it via DisableMonitoredAgent.
def clear_training_data(request, options = nil) -> ::Gapic::Operationclear_training_data via a request object, either of type
ClearTrainingDataRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ClearTrainingDataRequest, ::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 clear_training_data(name: nil) -> ::Gapic::Operationclear_training_data 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 MonitoredAgent whose trained model artifacts to purge. Use
the
-wildcard agent segment to purge every MonitoredAgent in the scope. Format:projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}
- (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/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ClearTrainingDataRequest.new # Call the clear_training_data method. result = client.clear_training_data 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
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the AgentAnomalyDetectionService 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_agent_anomaly_detection_scope
def create_agent_anomaly_detection_scope(request, options = nil) -> ::Gapic::Operation
def create_agent_anomaly_detection_scope(parent: nil, agent_anomaly_detection_scope: nil, agent_anomaly_detection_scope_id: nil) -> ::Gapic::OperationCreates a new AgentAnomalyDetectionScope.
def create_agent_anomaly_detection_scope(request, options = nil) -> ::Gapic::Operationcreate_agent_anomaly_detection_scope via a request object, either of type
CreateAgentAnomalyDetectionScopeRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CreateAgentAnomalyDetectionScopeRequest, ::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_agent_anomaly_detection_scope(parent: nil, agent_anomaly_detection_scope: nil, agent_anomaly_detection_scope_id: nil) -> ::Gapic::Operationcreate_agent_anomaly_detection_scope 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 resource name of the Location to create the
AgentAnomalyDetectionScope in. Format:
projects/{project}/locations/{location} - agent_anomaly_detection_scope (::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope, ::Hash) — Required. The AgentAnomalyDetectionScope to create.
-
agent_anomaly_detection_scope_id (::String) — Required. The ID to use for the AgentAnomalyDetectionScope, which will
become the final component of the AgentAnomalyDetectionScope's resource
name.
This value should be 1-63 characters, and valid characters are /a-z?/.
- (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/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CreateAgentAnomalyDetectionScopeRequest.new # Call the create_agent_anomaly_detection_scope method. result = client.create_agent_anomaly_detection_scope 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_agent_anomaly_detection_scope
def delete_agent_anomaly_detection_scope(request, options = nil) -> ::Gapic::Operation
def delete_agent_anomaly_detection_scope(name: nil) -> ::Gapic::OperationDeletes a specific AgentAnomalyDetectionScope.
def delete_agent_anomaly_detection_scope(request, options = nil) -> ::Gapic::Operationdelete_agent_anomaly_detection_scope via a request object, either of type
DeleteAgentAnomalyDetectionScopeRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeleteAgentAnomalyDetectionScopeRequest, ::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_agent_anomaly_detection_scope(name: nil) -> ::Gapic::Operationdelete_agent_anomaly_detection_scope 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 AgentAnomalyDetectionScope resource to be
deleted. Format:
projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}
- (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/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeleteAgentAnomalyDetectionScopeRequest.new # Call the delete_agent_anomaly_detection_scope method. result = client.delete_agent_anomaly_detection_scope 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
#disable_monitored_agent
def disable_monitored_agent(request, options = nil) -> ::Gapic::Operation
def disable_monitored_agent(name: nil) -> ::Gapic::OperationDisables a specific MonitoredAgent.
def disable_monitored_agent(request, options = nil) -> ::Gapic::Operationdisable_monitored_agent via a request object, either of type
DisableMonitoredAgentRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DisableMonitoredAgentRequest, ::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 disable_monitored_agent(name: nil) -> ::Gapic::Operationdisable_monitored_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. The name of the MonitoredAgent resource to be disabled.
Format:
projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}
- (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/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DisableMonitoredAgentRequest.new # Call the disable_monitored_agent method. result = client.disable_monitored_agent 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
#enable_monitored_agent
def enable_monitored_agent(request, options = nil) -> ::Gapic::Operation
def enable_monitored_agent(name: nil) -> ::Gapic::OperationEnables a specific MonitoredAgent.
def enable_monitored_agent(request, options = nil) -> ::Gapic::Operationenable_monitored_agent via a request object, either of type
EnableMonitoredAgentRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::EnableMonitoredAgentRequest, ::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 enable_monitored_agent(name: nil) -> ::Gapic::Operationenable_monitored_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. The name of the MonitoredAgent resource to be enabled.
Format:
projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}
- (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/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::EnableMonitoredAgentRequest.new # Call the enable_monitored_agent method. result = client.enable_monitored_agent request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_agent_anomaly_detection_scope
def get_agent_anomaly_detection_scope(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope
def get_agent_anomaly_detection_scope(name: nil) -> ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScopeGets the details of a specific AgentAnomalyDetectionScope.
def get_agent_anomaly_detection_scope(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScopeget_agent_anomaly_detection_scope via a request object, either of type
GetAgentAnomalyDetectionScopeRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetAgentAnomalyDetectionScopeRequest, ::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_anomaly_detection_scope(name: nil) -> ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScopeget_agent_anomaly_detection_scope 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 AgentAnomalyDetectionScope resource.
Format:
projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetAgentAnomalyDetectionScopeRequest.new # Call the get_agent_anomaly_detection_scope method. result = client.get_agent_anomaly_detection_scope request # The returned object is of type Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope. p result
#get_analyzed_invocation
def get_analyzed_invocation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedInvocation
def get_analyzed_invocation(name: nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedInvocationGets the details of a specific AnalyzedInvocation.
def get_analyzed_invocation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedInvocationget_analyzed_invocation via a request object, either of type
GetAnalyzedInvocationRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetAnalyzedInvocationRequest, ::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_analyzed_invocation(name: nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedInvocationget_analyzed_invocation 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 AnalyzedInvocation resource.
Format:
projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AIPlatform::V1::AnalyzedInvocation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetAnalyzedInvocationRequest.new # Call the get_analyzed_invocation method. result = client.get_analyzed_invocation request # The returned object is of type Google::Cloud::AIPlatform::V1::AnalyzedInvocation. p result
#get_analyzed_session
def get_analyzed_session(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedSession
def get_analyzed_session(name: nil, view: nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedSessionGets the details of a specific AnalyzedSession.
def get_analyzed_session(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedSessionget_analyzed_session via a request object, either of type
GetAnalyzedSessionRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetAnalyzedSessionRequest, ::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_analyzed_session(name: nil, view: nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedSessionget_analyzed_session 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 AnalyzedSession resource.
Format:
projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session} - view (::Google::Cloud::AIPlatform::V1::AnalyzedSessionView) — Optional. Resource view to control which fields are returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AIPlatform::V1::AnalyzedSession)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetAnalyzedSessionRequest.new # Call the get_analyzed_session method. result = client.get_analyzed_session request # The returned object is of type Google::Cloud::AIPlatform::V1::AnalyzedSession. p result
#get_monitored_agent
def get_monitored_agent(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::MonitoredAgent
def get_monitored_agent(name: nil) -> ::Google::Cloud::AIPlatform::V1::MonitoredAgentGets the details of a specific MonitoredAgent.
def get_monitored_agent(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::MonitoredAgentget_monitored_agent via a request object, either of type
GetMonitoredAgentRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetMonitoredAgentRequest, ::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_monitored_agent(name: nil) -> ::Google::Cloud::AIPlatform::V1::MonitoredAgentget_monitored_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. The name of the MonitoredAgent resource.
Format:
projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AIPlatform::V1::MonitoredAgent)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetMonitoredAgentRequest.new # Call the get_monitored_agent method. result = client.get_monitored_agent request # The returned object is of type Google::Cloud::AIPlatform::V1::MonitoredAgent. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::ClientGet the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> ClientCreate a new AgentAnomalyDetectionService REST client object.
- (config) — Configure the AgentAnomalyDetectionService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_agent_anomaly_detection_scopes
def list_agent_anomaly_detection_scopes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>
def list_agent_anomaly_detection_scopes(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>Lists AgentAnomalyDetectionScopes in a Location.
def list_agent_anomaly_detection_scopes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>list_agent_anomaly_detection_scopes via a request object, either of type
ListAgentAnomalyDetectionScopesRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListAgentAnomalyDetectionScopesRequest, ::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_agent_anomaly_detection_scopes(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>list_agent_anomaly_detection_scopes 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 resource name of the Location to list the
AgentAnomalyDetectionScopes from. Format:
projects/{project}/locations/{location} - page_size (::Integer) — Optional. The standard list page size. The maximum value is 100; values above 100 will be coerced to 100. If unspecified, at most 10 AgentAnomalyDetectionScopes will be returned.
- page_token (::String) — Optional. The standard list page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListAgentAnomalyDetectionScopesRequest.new # Call the list_agent_anomaly_detection_scopes method. result = client.list_agent_anomaly_detection_scopes 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::AIPlatform::V1::AgentAnomalyDetectionScope. p item end
#list_analyzed_invocations
def list_analyzed_invocations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>
def list_analyzed_invocations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.
def list_analyzed_invocations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>list_analyzed_invocations via a request object, either of type
ListAnalyzedInvocationsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListAnalyzedInvocationsRequest, ::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_analyzed_invocations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>list_analyzed_invocations 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 parent AnalyzedSession resource.
Format:
projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session} - page_size (::Integer) — Optional. The maximum number of analyzed invocations to return.
-
page_token (::String) — Optional. A page token, received from a previous
ListAnalyzedInvocationscall.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListAnalyzedInvocationsRequest.new # Call the list_analyzed_invocations method. result = client.list_analyzed_invocations 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::AIPlatform::V1::AnalyzedInvocation. p item end
#list_analyzed_sessions
def list_analyzed_sessions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>
def list_analyzed_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>Lists AnalyzedSessions in a MonitoredAgent.
def list_analyzed_sessions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>list_analyzed_sessions via a request object, either of type
ListAnalyzedSessionsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListAnalyzedSessionsRequest, ::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_analyzed_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>list_analyzed_sessions 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 parent MonitoredAgent resource.
Format:
projects/{project}/locations/{location}/monitoredAgents/{monitored_agent} - page_size (::Integer) — Optional. The maximum number of analyzed sessions to return.
-
page_token (::String) — Optional. A page token, received from a previous
ListAnalyzedSessionscall. -
filter (::String) — Optional. Filter expression restricting which AnalyzedSessions are
returned. Supports a subset of AIP-160: a closed
detection_timewindow (both bounds required), an equality onseverity, an equality onagent_type, and an equality onsession_id, joined byAND. Each clause is optional, may appear at most once, and may appear in any order.The
severityvalue is the canonicalSeverityenum name --SEVERITY_CRITICAL,SEVERITY_HIGH,SEVERITY_MEDIUMorSEVERITY_LOW. Short forms such as"CRITICAL"are rejected, as isSEVERITY_UNSPECIFIED. It matches sessions whose maximum severity equals that bucket: a session that fires at both LOW and CRITICAL matchesseverity = "SEVERITY_CRITICAL", notseverity = "SEVERITY_LOW".The
agent_typevalue is the canonicalAgentResource.AgentTypeenum name --REASONING_ENGINE,CLOUD_RUN_SERVICE,GKE_WORKLOAD,GCE_INSTANCE,AWS,AZURE,AGENT_TYPE_OTHERorAGENT_TYPE_UNSPECIFIED-- and matches sessions run by an agent on that runtime.Unlike
severity,agent_typeaccepts itsUNSPECIFIEDvalue. The two are not analogous: a session always has a computed severity bucket, soSEVERITY_UNSPECIFIEDis never returned and filtering on it could only match nothing.AGENT_TYPE_UNSPECIFIEDis returned -- it is whatAnalyzedSession.agent_typereports for an agent whose runtime was never recorded -- so it must remain filterable.The
session_idvalue is a case-sensitive exact match (no substring or prefix matching) onAnalyzedSession.session_id. Unlikeseverityandagent_typeit is not a closed enum, so any non-empty value is accepted; an empty value (session_id = "") is rejected rather than treated as "no filter".Example (time window, severity and runtime):
detection_time >= "2024-01-01T00:00:00Z" AND detection_time <= "2024-01-08T00:00:00Z" AND severity = "SEVERITY_CRITICAL" AND agent_type = "CLOUD_RUN_SERVICE"If empty, results are restricted to the last 7 days with no severity, runtime, or session restriction. Other fields, additional operators, set membership (
IN), and boolean combinations (OR,NOT, parentheses) are not yet supported. - view (::Google::Cloud::AIPlatform::V1::AnalyzedSessionView) — Optional. Resource view to control which fields are returned.
-
order_by (::String) — Optional. Comma-separated list of fields to sort by, following AIP-132
syntax. The default sort direction is ascending; append " desc" to a
field to sort descending.
Supported fields (any other field yields INVALID_ARGUMENT):
latest_detection_time- the session's most-recent flagged detection time.latest_detection_time descputs the newest sessions first.max_severity_rank- the session's bucketed maximum severity, ranked LOW=1 < MEDIUM=2 < HIGH=3 < CRITICAL=4.max_severity_rank descputs the most-severe sessions first.agent_display_name- the MonitoredAgent's display name. Sorted as a STRING (case-sensitive, code-point order).
If empty, defaults to
latest_detection_time desc. Multi-field sort (for example,max_severity_rank desc, latest_detection_time desc) is supported.The
order_byvalue MUST match the value used on the call that minted any suppliedpage_token(AIP-158). Mismatches yield INVALID_ARGUMENT.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListAnalyzedSessionsRequest.new # Call the list_analyzed_sessions method. result = client.list_analyzed_sessions 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::AIPlatform::V1::AnalyzedSession. p item end
#list_monitored_agents
def list_monitored_agents(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>
def list_monitored_agents(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>Lists MonitoredAgents in a specific Location.
def list_monitored_agents(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>list_monitored_agents via a request object, either of type
ListMonitoredAgentsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListMonitoredAgentsRequest, ::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_monitored_agents(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>list_monitored_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. The resource name of the Location to list the
MonitoredAgents from. Format:
projects/{project}/locations/{location} - page_size (::Integer) — Optional. The standard list page size. The maximum value is 100; values above 100 will be coerced to 100. If unspecified, at most 10 MonitoredAgents will be returned.
- page_token (::String) — Optional. The standard list page token.
-
filter (::String) — Optional. An AIP-160 filter, currently restricted to a single equality
predicate on
state. The value must be the exact, case-sensitive name of aMonitoredAgent.EnablementStatevalue:ACTIVE,DISABLED,ENABLING, orENABLEMENT_STATE_UNSPECIFIED. A blank or absent filter returns every MonitoredAgent in the parent regardless of state; any other value returnsINVALID_ARGUMENT.Example:
state = ACTIVE
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListMonitoredAgentsRequest.new # Call the list_monitored_agents method. result = client.list_monitored_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::AIPlatform::V1::MonitoredAgent. 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::AIPlatform::V1::AgentAnomalyDetectionService::Rest::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)