Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client (v1.52.0)

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::Configuration

Configure the AgentAnomalyDetectionService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all 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/-

Overloads
def aggregate_analyzed_sessions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>
Pass arguments to aggregate_analyzed_sessions via a request object, either of type Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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.filter grammar: a closed detection_time window with both bounds required. The severity clause 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::Operation

Clears (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.

Overloads
def clear_training_data(request, options = nil) -> ::Gapic::Operation
Pass arguments to clear_training_data via a request object, either of type ClearTrainingDataRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to clear_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).
Parameter
  • 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}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::Configuration

Configure 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#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::Operation

Creates a new AgentAnomalyDetectionScope.

Overloads
def create_agent_anomaly_detection_scope(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_agent_anomaly_detection_scope via a request object, either of type CreateAgentAnomalyDetectionScopeRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to create_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).
Parameters
  • 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?/.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::Operation

Deletes a specific AgentAnomalyDetectionScope.

Overloads
def delete_agent_anomaly_detection_scope(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_agent_anomaly_detection_scope via a request object, either of type DeleteAgentAnomalyDetectionScopeRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to delete_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).
Parameter
  • name (::String) — Required. The name of the AgentAnomalyDetectionScope resource to be deleted. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::Operation

Disables a specific MonitoredAgent.

Overloads
def disable_monitored_agent(request, options = nil) -> ::Gapic::Operation
Pass arguments to disable_monitored_agent via a request object, either of type DisableMonitoredAgentRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to disable_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).
Parameter
  • name (::String) — Required. The name of the MonitoredAgent resource to be disabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::Operation

Enables a specific MonitoredAgent.

Overloads
def enable_monitored_agent(request, options = nil) -> ::Gapic::Operation
Pass arguments to enable_monitored_agent via a request object, either of type EnableMonitoredAgentRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to enable_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).
Parameter
  • name (::String) — Required. The name of the MonitoredAgent resource to be enabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::AgentAnomalyDetectionScope

Gets the details of a specific AgentAnomalyDetectionScope.

Overloads
def get_agent_anomaly_detection_scope(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope
Pass arguments to get_agent_anomaly_detection_scope via a request object, either of type GetAgentAnomalyDetectionScopeRequest or an equivalent Hash.
Parameters
  • 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::AgentAnomalyDetectionScope
Pass arguments to get_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).
Parameter
  • name (::String) — Required. The name of the AgentAnomalyDetectionScope resource. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::AnalyzedInvocation

Gets the details of a specific AnalyzedInvocation.

Overloads
def get_analyzed_invocation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedInvocation
Pass arguments to get_analyzed_invocation via a request object, either of type GetAnalyzedInvocationRequest or an equivalent Hash.
Parameters
  • 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::AnalyzedInvocation
Pass arguments to get_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).
Parameter
  • name (::String) — Required. The name of the AnalyzedInvocation resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::AnalyzedSession

Gets the details of a specific AnalyzedSession.

Overloads
def get_analyzed_session(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnalyzedSession
Pass arguments to get_analyzed_session via a request object, either of type GetAnalyzedSessionRequest or an equivalent Hash.
Parameters
  • 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::AnalyzedSession
Pass arguments to get_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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::MonitoredAgent

Gets the details of a specific MonitoredAgent.

Overloads
def get_monitored_agent(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::MonitoredAgent
Pass arguments to get_monitored_agent via a request object, either of type GetMonitoredAgentRequest or an equivalent Hash.
Parameters
  • 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::MonitoredAgent
Pass arguments to get_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).
Parameter
  • name (::String) — Required. The name of the MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::Client

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

Returns
  • (Google::Iam::V1::IAMPolicy::Rest::Client)

#initialize

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

Create a new AgentAnomalyDetectionService REST client object.

Yields
  • (config) — Configure the AgentAnomalyDetectionService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# 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.

Overloads
def list_agent_anomaly_detection_scopes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>
Pass arguments to list_agent_anomaly_detection_scopes via a request object, either of type ListAgentAnomalyDetectionScopesRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Overloads
def list_analyzed_invocations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>
Pass arguments to list_analyzed_invocations via a request object, either of type ListAnalyzedInvocationsRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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 ListAnalyzedInvocations call.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Overloads
def list_analyzed_sessions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>
Pass arguments to list_analyzed_sessions via a request object, either of type ListAnalyzedSessionsRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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 ListAnalyzedSessions call.
  • filter (::String) — Optional. Filter expression restricting which AnalyzedSessions are returned. Supports a subset of AIP-160: a closed detection_time window (both bounds required), an equality on severity, an equality on agent_type, and an equality on session_id, joined by AND. Each clause is optional, may appear at most once, and may appear in any order.

    The severity value is the canonical Severity enum name -- SEVERITY_CRITICAL, SEVERITY_HIGH, SEVERITY_MEDIUM or SEVERITY_LOW. Short forms such as "CRITICAL" are rejected, as is SEVERITY_UNSPECIFIED. It matches sessions whose maximum severity equals that bucket: a session that fires at both LOW and CRITICAL matches severity = "SEVERITY_CRITICAL", not severity = "SEVERITY_LOW".

    The agent_type value is the canonical AgentResource.AgentType enum name -- REASONING_ENGINE, CLOUD_RUN_SERVICE, GKE_WORKLOAD, GCE_INSTANCE, AWS, AZURE, AGENT_TYPE_OTHER or AGENT_TYPE_UNSPECIFIED -- and matches sessions run by an agent on that runtime.

    Unlike severity, agent_type accepts its UNSPECIFIED value. The two are not analogous: a session always has a computed severity bucket, so SEVERITY_UNSPECIFIED is never returned and filtering on it could only match nothing. AGENT_TYPE_UNSPECIFIED is returned -- it is what AnalyzedSession.agent_type reports for an agent whose runtime was never recorded -- so it must remain filterable.

    The session_id value is a case-sensitive exact match (no substring or prefix matching) on AnalyzedSession.session_id. Unlike severity and agent_type it 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 desc puts 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 desc puts 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_by value MUST match the value used on the call that minted any supplied page_token (AIP-158). Mismatches yield INVALID_ARGUMENT.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Overloads
def list_monitored_agents(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>
Pass arguments to list_monitored_agents via a request object, either of type ListMonitoredAgentsRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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 a MonitoredAgent.EnablementState value: ACTIVE, DISABLED, ENABLING, or ENABLEMENT_STATE_UNSPECIFIED. A blank or absent filter returns every MonitoredAgent in the parent regardless of state; any other value returns INVALID_ARGUMENT.

    Example:

    state = ACTIVE

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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::Client

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

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

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)