Vertex AI v1 API - Class AgentAnomalyDetectionServiceClient (3.79.0)

public abstract class AgentAnomalyDetectionServiceClient

Reference documentation and code samples for the Vertex AI v1 API class AgentAnomalyDetectionServiceClient.

AgentAnomalyDetectionService client wrapper, for convenient use.

Inheritance

object > AgentAnomalyDetectionServiceClient

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

A service for managing Agent Anomaly Detection for monitored agents.

Properties

ClearTrainingDataOperationsClient

public virtual OperationsClient ClearTrainingDataOperationsClient { get; }

The long-running operations client for ClearTrainingData.

Property Value
Type Description
OperationsClient

CreateAgentAnomalyDetectionScopeOperationsClient

public virtual OperationsClient CreateAgentAnomalyDetectionScopeOperationsClient { get; }

The long-running operations client for CreateAgentAnomalyDetectionScope.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the AgentAnomalyDetectionService service, which is a host of "aiplatform.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AgentAnomalyDetectionService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default AgentAnomalyDetectionService scopes are:

DeleteAgentAnomalyDetectionScopeOperationsClient

public virtual OperationsClient DeleteAgentAnomalyDetectionScopeOperationsClient { get; }

The long-running operations client for DeleteAgentAnomalyDetectionScope.

Property Value
Type Description
OperationsClient

DisableMonitoredAgentOperationsClient

public virtual OperationsClient DisableMonitoredAgentOperationsClient { get; }

The long-running operations client for DisableMonitoredAgent.

Property Value
Type Description
OperationsClient

EnableMonitoredAgentOperationsClient

public virtual OperationsClient EnableMonitoredAgentOperationsClient { get; }

The long-running operations client for EnableMonitoredAgent.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual AgentAnomalyDetectionService.AgentAnomalyDetectionServiceClient GrpcClient { get; }

The underlying gRPC AgentAnomalyDetectionService client

Property Value
Type Description
AgentAnomalyDetectionServiceAgentAnomalyDetectionServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

AggregateAnalyzedSessions(AggregateAnalyzedSessionsRequest, CallSettings)

public virtual PagedEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> AggregateAnalyzedSessions(AggregateAnalyzedSessionsRequest request, CallSettings callSettings = null)

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/-

Parameters
Name Description
request AggregateAnalyzedSessionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableAggregateAnalyzedSessionsResponseAggregateAnalyzedSessionsResponseTypesAgentAggregate

A pageable sequence of AggregateAnalyzedSessionsResponse.Types.AgentAggregate resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
AggregateAnalyzedSessionsRequest request = new AggregateAnalyzedSessionsRequest
{
    ParentAsMonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
    Filter = "",
};
// Make the request
PagedEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> response = agentAnomalyDetectionServiceClient.AggregateAnalyzedSessions(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (AggregateAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AggregateAnalyzedSessionsResponse.Types.AgentAggregate> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregateAnalyzedSessions(MonitoredAgentName, string, int?, CallSettings)

public virtual PagedEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> AggregateAnalyzedSessions(MonitoredAgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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/-

Parameters
Name Description
parent MonitoredAgentName

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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableAggregateAnalyzedSessionsResponseAggregateAnalyzedSessionsResponseTypesAgentAggregate

A pageable sequence of AggregateAnalyzedSessionsResponse.Types.AgentAggregate resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
MonitoredAgentName parent = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
PagedEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> response = agentAnomalyDetectionServiceClient.AggregateAnalyzedSessions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (AggregateAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AggregateAnalyzedSessionsResponse.Types.AgentAggregate> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregateAnalyzedSessions(string, string, int?, CallSettings)

public virtual PagedEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> AggregateAnalyzedSessions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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/-

Parameters
Name Description
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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableAggregateAnalyzedSessionsResponseAggregateAnalyzedSessionsResponseTypesAgentAggregate

A pageable sequence of AggregateAnalyzedSessionsResponse.Types.AgentAggregate resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
PagedEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> response = agentAnomalyDetectionServiceClient.AggregateAnalyzedSessions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (AggregateAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AggregateAnalyzedSessionsResponse.Types.AgentAggregate> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregateAnalyzedSessionsAsync(AggregateAnalyzedSessionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> AggregateAnalyzedSessionsAsync(AggregateAnalyzedSessionsRequest request, CallSettings callSettings = null)

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/-

Parameters
Name Description
request AggregateAnalyzedSessionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableAggregateAnalyzedSessionsResponseAggregateAnalyzedSessionsResponseTypesAgentAggregate

A pageable asynchronous sequence of AggregateAnalyzedSessionsResponse.Types.AgentAggregate resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AggregateAnalyzedSessionsRequest request = new AggregateAnalyzedSessionsRequest
{
    ParentAsMonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> response = agentAnomalyDetectionServiceClient.AggregateAnalyzedSessionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (AggregateAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AggregateAnalyzedSessionsResponse.Types.AgentAggregate> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregateAnalyzedSessionsAsync(MonitoredAgentName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> AggregateAnalyzedSessionsAsync(MonitoredAgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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/-

Parameters
Name Description
parent MonitoredAgentName

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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableAggregateAnalyzedSessionsResponseAggregateAnalyzedSessionsResponseTypesAgentAggregate

A pageable asynchronous sequence of AggregateAnalyzedSessionsResponse.Types.AgentAggregate resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName parent = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
PagedAsyncEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> response = agentAnomalyDetectionServiceClient.AggregateAnalyzedSessionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (AggregateAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AggregateAnalyzedSessionsResponse.Types.AgentAggregate> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregateAnalyzedSessionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> AggregateAnalyzedSessionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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/-

Parameters
Name Description
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}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableAggregateAnalyzedSessionsResponseAggregateAnalyzedSessionsResponseTypesAgentAggregate

A pageable asynchronous sequence of AggregateAnalyzedSessionsResponse.Types.AgentAggregate resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
PagedAsyncEnumerable<AggregateAnalyzedSessionsResponse, AggregateAnalyzedSessionsResponse.Types.AgentAggregate> response = agentAnomalyDetectionServiceClient.AggregateAnalyzedSessionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (AggregateAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AggregateAnalyzedSessionsResponse.Types.AgentAggregate> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AggregateAnalyzedSessionsResponse.Types.AgentAggregate item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ClearTrainingData(ClearTrainingDataRequest, CallSettings)

public virtual Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> ClearTrainingData(ClearTrainingDataRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request ClearTrainingDataRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClearTrainingDataResponseClearTrainingDataOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
ClearTrainingDataRequest request = new ClearTrainingDataRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = agentAnomalyDetectionServiceClient.ClearTrainingData(request);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceClearTrainingData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingData(MonitoredAgentName, CallSettings)

public virtual Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> ClearTrainingData(MonitoredAgentName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name MonitoredAgentName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClearTrainingDataResponseClearTrainingDataOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = agentAnomalyDetectionServiceClient.ClearTrainingData(name);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceClearTrainingData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingData(string, CallSettings)

public virtual Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> ClearTrainingData(string name, CallSettings callSettings = null)

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.

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClearTrainingDataResponseClearTrainingDataOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = agentAnomalyDetectionServiceClient.ClearTrainingData(name);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceClearTrainingData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingDataAsync(ClearTrainingDataRequest, CallSettings)

public virtual Task<Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata>> ClearTrainingDataAsync(ClearTrainingDataRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request ClearTrainingDataRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClearTrainingDataResponseClearTrainingDataOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
ClearTrainingDataRequest request = new ClearTrainingDataRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = await agentAnomalyDetectionServiceClient.ClearTrainingDataAsync(request);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceClearTrainingDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingDataAsync(ClearTrainingDataRequest, CancellationToken)

public virtual Task<Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata>> ClearTrainingDataAsync(ClearTrainingDataRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request ClearTrainingDataRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClearTrainingDataResponseClearTrainingDataOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
ClearTrainingDataRequest request = new ClearTrainingDataRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = await agentAnomalyDetectionServiceClient.ClearTrainingDataAsync(request);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceClearTrainingDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingDataAsync(MonitoredAgentName, CallSettings)

public virtual Task<Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata>> ClearTrainingDataAsync(MonitoredAgentName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name MonitoredAgentName

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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClearTrainingDataResponseClearTrainingDataOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = await agentAnomalyDetectionServiceClient.ClearTrainingDataAsync(name);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceClearTrainingDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingDataAsync(MonitoredAgentName, CancellationToken)

public virtual Task<Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata>> ClearTrainingDataAsync(MonitoredAgentName name, CancellationToken cancellationToken)

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.

Parameters
Name Description
name MonitoredAgentName

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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClearTrainingDataResponseClearTrainingDataOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = await agentAnomalyDetectionServiceClient.ClearTrainingDataAsync(name);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceClearTrainingDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingDataAsync(string, CallSettings)

public virtual Task<Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata>> ClearTrainingDataAsync(string name, CallSettings callSettings = null)

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.

Parameters
Name Description
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}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClearTrainingDataResponseClearTrainingDataOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = await agentAnomalyDetectionServiceClient.ClearTrainingDataAsync(name);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceClearTrainingDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

ClearTrainingDataAsync(string, CancellationToken)

public virtual Task<Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata>> ClearTrainingDataAsync(string name, CancellationToken cancellationToken)

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.

Parameters
Name Description
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}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClearTrainingDataResponseClearTrainingDataOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> response = await agentAnomalyDetectionServiceClient.ClearTrainingDataAsync(name);

// Poll until the returned long-running operation is complete
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClearTrainingDataResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceClearTrainingDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClearTrainingDataResponse retrievedResult = retrievedResponse.Result;
}

Create()

public static AgentAnomalyDetectionServiceClient Create()

Synchronously creates a AgentAnomalyDetectionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AgentAnomalyDetectionServiceClientBuilder.

Returns
Type Description
AgentAnomalyDetectionServiceClient

The created AgentAnomalyDetectionServiceClient.

CreateAgentAnomalyDetectionScope(LocationName, AgentAnomalyDetectionScope, string, CallSettings)

public virtual Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> CreateAgentAnomalyDetectionScope(LocationName parent, AgentAnomalyDetectionScope agentAnomalyDetectionScope, string agentAnomalyDetectionScopeId, CallSettings callSettings = null)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the AgentAnomalyDetectionScope in. Format: projects/{project}/locations/{location}

agentAnomalyDetectionScope AgentAnomalyDetectionScope

Required. The AgentAnomalyDetectionScope to create.

agentAnomalyDetectionScopeId 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?/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AgentAnomalyDetectionScope agentAnomalyDetectionScope = new AgentAnomalyDetectionScope();
string agentAnomalyDetectionScopeId = "";
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScope(parent, agentAnomalyDetectionScope, agentAnomalyDetectionScopeId);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScope(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScope(CreateAgentAnomalyDetectionScopeRequest, CallSettings)

public virtual Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> CreateAgentAnomalyDetectionScope(CreateAgentAnomalyDetectionScopeRequest request, CallSettings callSettings = null)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
request CreateAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
CreateAgentAnomalyDetectionScopeRequest request = new CreateAgentAnomalyDetectionScopeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    AgentAnomalyDetectionScope = new AgentAnomalyDetectionScope(),
    AgentAnomalyDetectionScopeId = "",
};
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScope(request);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScope(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScope(string, AgentAnomalyDetectionScope, string, CallSettings)

public virtual Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> CreateAgentAnomalyDetectionScope(string parent, AgentAnomalyDetectionScope agentAnomalyDetectionScope, string agentAnomalyDetectionScopeId, CallSettings callSettings = null)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the AgentAnomalyDetectionScope in. Format: projects/{project}/locations/{location}

agentAnomalyDetectionScope AgentAnomalyDetectionScope

Required. The AgentAnomalyDetectionScope to create.

agentAnomalyDetectionScopeId 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?/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AgentAnomalyDetectionScope agentAnomalyDetectionScope = new AgentAnomalyDetectionScope();
string agentAnomalyDetectionScopeId = "";
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScope(parent, agentAnomalyDetectionScope, agentAnomalyDetectionScopeId);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScope(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScopeAsync(LocationName, AgentAnomalyDetectionScope, string, CallSettings)

public virtual Task<Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata>> CreateAgentAnomalyDetectionScopeAsync(LocationName parent, AgentAnomalyDetectionScope agentAnomalyDetectionScope, string agentAnomalyDetectionScopeId, CallSettings callSettings = null)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the AgentAnomalyDetectionScope in. Format: projects/{project}/locations/{location}

agentAnomalyDetectionScope AgentAnomalyDetectionScope

Required. The AgentAnomalyDetectionScope to create.

agentAnomalyDetectionScopeId 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?/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AgentAnomalyDetectionScope agentAnomalyDetectionScope = new AgentAnomalyDetectionScope();
string agentAnomalyDetectionScopeId = "";
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScopeAsync(parent, agentAnomalyDetectionScope, agentAnomalyDetectionScopeId);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScopeAsync(LocationName, AgentAnomalyDetectionScope, string, CancellationToken)

public virtual Task<Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata>> CreateAgentAnomalyDetectionScopeAsync(LocationName parent, AgentAnomalyDetectionScope agentAnomalyDetectionScope, string agentAnomalyDetectionScopeId, CancellationToken cancellationToken)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the AgentAnomalyDetectionScope in. Format: projects/{project}/locations/{location}

agentAnomalyDetectionScope AgentAnomalyDetectionScope

Required. The AgentAnomalyDetectionScope to create.

agentAnomalyDetectionScopeId 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?/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
AgentAnomalyDetectionScope agentAnomalyDetectionScope = new AgentAnomalyDetectionScope();
string agentAnomalyDetectionScopeId = "";
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScopeAsync(parent, agentAnomalyDetectionScope, agentAnomalyDetectionScopeId);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScopeAsync(CreateAgentAnomalyDetectionScopeRequest, CallSettings)

public virtual Task<Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata>> CreateAgentAnomalyDetectionScopeAsync(CreateAgentAnomalyDetectionScopeRequest request, CallSettings callSettings = null)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
request CreateAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAgentAnomalyDetectionScopeRequest request = new CreateAgentAnomalyDetectionScopeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    AgentAnomalyDetectionScope = new AgentAnomalyDetectionScope(),
    AgentAnomalyDetectionScopeId = "",
};
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScopeAsync(request);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScopeAsync(CreateAgentAnomalyDetectionScopeRequest, CancellationToken)

public virtual Task<Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata>> CreateAgentAnomalyDetectionScopeAsync(CreateAgentAnomalyDetectionScopeRequest request, CancellationToken cancellationToken)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
request CreateAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAgentAnomalyDetectionScopeRequest request = new CreateAgentAnomalyDetectionScopeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    AgentAnomalyDetectionScope = new AgentAnomalyDetectionScope(),
    AgentAnomalyDetectionScopeId = "",
};
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScopeAsync(request);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScopeAsync(string, AgentAnomalyDetectionScope, string, CallSettings)

public virtual Task<Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata>> CreateAgentAnomalyDetectionScopeAsync(string parent, AgentAnomalyDetectionScope agentAnomalyDetectionScope, string agentAnomalyDetectionScopeId, CallSettings callSettings = null)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the AgentAnomalyDetectionScope in. Format: projects/{project}/locations/{location}

agentAnomalyDetectionScope AgentAnomalyDetectionScope

Required. The AgentAnomalyDetectionScope to create.

agentAnomalyDetectionScopeId 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?/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AgentAnomalyDetectionScope agentAnomalyDetectionScope = new AgentAnomalyDetectionScope();
string agentAnomalyDetectionScopeId = "";
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScopeAsync(parent, agentAnomalyDetectionScope, agentAnomalyDetectionScopeId);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAgentAnomalyDetectionScopeAsync(string, AgentAnomalyDetectionScope, string, CancellationToken)

public virtual Task<Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata>> CreateAgentAnomalyDetectionScopeAsync(string parent, AgentAnomalyDetectionScope agentAnomalyDetectionScope, string agentAnomalyDetectionScopeId, CancellationToken cancellationToken)

Creates a new AgentAnomalyDetectionScope.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the AgentAnomalyDetectionScope in. Format: projects/{project}/locations/{location}

agentAnomalyDetectionScope AgentAnomalyDetectionScope

Required. The AgentAnomalyDetectionScope to create.

agentAnomalyDetectionScopeId 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?/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
AgentAnomalyDetectionScope agentAnomalyDetectionScope = new AgentAnomalyDetectionScope();
string agentAnomalyDetectionScopeId = "";
// Make the request
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.CreateAgentAnomalyDetectionScopeAsync(parent, agentAnomalyDetectionScope, agentAnomalyDetectionScopeId);

// Poll until the returned long-running operation is complete
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AgentAnomalyDetectionScope result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceCreateAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AgentAnomalyDetectionScope retrievedResult = retrievedResponse.Result;
}

CreateAsync(CancellationToken)

public static Task<AgentAnomalyDetectionServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a AgentAnomalyDetectionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AgentAnomalyDetectionServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskAgentAnomalyDetectionServiceClient

The task representing the created AgentAnomalyDetectionServiceClient.

DeleteAgentAnomalyDetectionScope(AgentAnomalyDetectionScopeName, CallSettings)

public virtual Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> DeleteAgentAnomalyDetectionScope(AgentAnomalyDetectionScopeName name, CallSettings callSettings = null)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name AgentAnomalyDetectionScopeName

Required. The name of the AgentAnomalyDetectionScope resource to be deleted. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
AgentAnomalyDetectionScopeName name = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]");
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScope(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScope(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScope(DeleteAgentAnomalyDetectionScopeRequest, CallSettings)

public virtual Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> DeleteAgentAnomalyDetectionScope(DeleteAgentAnomalyDetectionScopeRequest request, CallSettings callSettings = null)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
request DeleteAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
DeleteAgentAnomalyDetectionScopeRequest request = new DeleteAgentAnomalyDetectionScopeRequest
{
    AgentAnomalyDetectionScopeName = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]"),
};
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScope(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScope(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScope(string, CallSettings)

public virtual Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> DeleteAgentAnomalyDetectionScope(string name, CallSettings callSettings = null)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name string

Required. The name of the AgentAnomalyDetectionScope resource to be deleted. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agentAnomalyDetectionScopes/[AGENT_ANOMALY_DETECTION_SCOPE]";
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScope(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScope(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName, CallSettings)

public virtual Task<Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata>> DeleteAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName name, CallSettings callSettings = null)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name AgentAnomalyDetectionScopeName

Required. The name of the AgentAnomalyDetectionScope resource to be deleted. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AgentAnomalyDetectionScopeName name = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]");
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScopeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName, CancellationToken)

public virtual Task<Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata>> DeleteAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName name, CancellationToken cancellationToken)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name AgentAnomalyDetectionScopeName

Required. The name of the AgentAnomalyDetectionScope resource to be deleted. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AgentAnomalyDetectionScopeName name = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]");
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScopeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScopeAsync(DeleteAgentAnomalyDetectionScopeRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata>> DeleteAgentAnomalyDetectionScopeAsync(DeleteAgentAnomalyDetectionScopeRequest request, CallSettings callSettings = null)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
request DeleteAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAgentAnomalyDetectionScopeRequest request = new DeleteAgentAnomalyDetectionScopeRequest
{
    AgentAnomalyDetectionScopeName = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]"),
};
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScopeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScopeAsync(DeleteAgentAnomalyDetectionScopeRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata>> DeleteAgentAnomalyDetectionScopeAsync(DeleteAgentAnomalyDetectionScopeRequest request, CancellationToken cancellationToken)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
request DeleteAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAgentAnomalyDetectionScopeRequest request = new DeleteAgentAnomalyDetectionScopeRequest
{
    AgentAnomalyDetectionScopeName = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]"),
};
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScopeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScopeAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata>> DeleteAgentAnomalyDetectionScopeAsync(string name, CallSettings callSettings = null)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name string

Required. The name of the AgentAnomalyDetectionScope resource to be deleted. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agentAnomalyDetectionScopes/[AGENT_ANOMALY_DETECTION_SCOPE]";
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScopeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteAgentAnomalyDetectionScopeAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata>> DeleteAgentAnomalyDetectionScopeAsync(string name, CancellationToken cancellationToken)

Deletes a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name string

Required. The name of the AgentAnomalyDetectionScope resource to be deleted. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agentAnomalyDetectionScopes/[AGENT_ANOMALY_DETECTION_SCOPE]";
// Make the request
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> response = await agentAnomalyDetectionServiceClient.DeleteAgentAnomalyDetectionScopeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDeleteAgentAnomalyDetectionScopeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgent(DisableMonitoredAgentRequest, CallSettings)

public virtual Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> DisableMonitoredAgent(DisableMonitoredAgentRequest request, CallSettings callSettings = null)

Disables a specific MonitoredAgent.

Parameters
Name Description
request DisableMonitoredAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentDisableMonitoredAgentOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
DisableMonitoredAgentRequest request = new DisableMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = agentAnomalyDetectionServiceClient.DisableMonitoredAgent(request);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgent(MonitoredAgentName, CallSettings)

public virtual Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> DisableMonitoredAgent(MonitoredAgentName name, CallSettings callSettings = null)

Disables a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource to be disabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentDisableMonitoredAgentOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = agentAnomalyDetectionServiceClient.DisableMonitoredAgent(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgent(string, CallSettings)

public virtual Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> DisableMonitoredAgent(string name, CallSettings callSettings = null)

Disables a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource to be disabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentDisableMonitoredAgentOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = agentAnomalyDetectionServiceClient.DisableMonitoredAgent(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgentAsync(DisableMonitoredAgentRequest, CallSettings)

public virtual Task<Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata>> DisableMonitoredAgentAsync(DisableMonitoredAgentRequest request, CallSettings callSettings = null)

Disables a specific MonitoredAgent.

Parameters
Name Description
request DisableMonitoredAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentDisableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
DisableMonitoredAgentRequest request = new DisableMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.DisableMonitoredAgentAsync(request);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgentAsync(DisableMonitoredAgentRequest, CancellationToken)

public virtual Task<Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata>> DisableMonitoredAgentAsync(DisableMonitoredAgentRequest request, CancellationToken cancellationToken)

Disables a specific MonitoredAgent.

Parameters
Name Description
request DisableMonitoredAgentRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMonitoredAgentDisableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
DisableMonitoredAgentRequest request = new DisableMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.DisableMonitoredAgentAsync(request);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgentAsync(MonitoredAgentName, CallSettings)

public virtual Task<Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata>> DisableMonitoredAgentAsync(MonitoredAgentName name, CallSettings callSettings = null)

Disables a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource to be disabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentDisableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.DisableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgentAsync(MonitoredAgentName, CancellationToken)

public virtual Task<Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata>> DisableMonitoredAgentAsync(MonitoredAgentName name, CancellationToken cancellationToken)

Disables a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource to be disabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMonitoredAgentDisableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.DisableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgentAsync(string, CallSettings)

public virtual Task<Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata>> DisableMonitoredAgentAsync(string name, CallSettings callSettings = null)

Disables a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource to be disabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentDisableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.DisableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

DisableMonitoredAgentAsync(string, CancellationToken)

public virtual Task<Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata>> DisableMonitoredAgentAsync(string name, CancellationToken cancellationToken)

Disables a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource to be disabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMonitoredAgentDisableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.DisableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceDisableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgent(EnableMonitoredAgentRequest, CallSettings)

public virtual Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> EnableMonitoredAgent(EnableMonitoredAgentRequest request, CallSettings callSettings = null)

Enables a specific MonitoredAgent.

Parameters
Name Description
request EnableMonitoredAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentEnableMonitoredAgentOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
EnableMonitoredAgentRequest request = new EnableMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = agentAnomalyDetectionServiceClient.EnableMonitoredAgent(request);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgent(MonitoredAgentName, CallSettings)

public virtual Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> EnableMonitoredAgent(MonitoredAgentName name, CallSettings callSettings = null)

Enables a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource to be enabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentEnableMonitoredAgentOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = agentAnomalyDetectionServiceClient.EnableMonitoredAgent(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgent(string, CallSettings)

public virtual Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> EnableMonitoredAgent(string name, CallSettings callSettings = null)

Enables a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource to be enabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentEnableMonitoredAgentOperationMetadata

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = agentAnomalyDetectionServiceClient.EnableMonitoredAgent(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgentAsync(EnableMonitoredAgentRequest, CallSettings)

public virtual Task<Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata>> EnableMonitoredAgentAsync(EnableMonitoredAgentRequest request, CallSettings callSettings = null)

Enables a specific MonitoredAgent.

Parameters
Name Description
request EnableMonitoredAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentEnableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
EnableMonitoredAgentRequest request = new EnableMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.EnableMonitoredAgentAsync(request);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgentAsync(EnableMonitoredAgentRequest, CancellationToken)

public virtual Task<Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata>> EnableMonitoredAgentAsync(EnableMonitoredAgentRequest request, CancellationToken cancellationToken)

Enables a specific MonitoredAgent.

Parameters
Name Description
request EnableMonitoredAgentRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMonitoredAgentEnableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
EnableMonitoredAgentRequest request = new EnableMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.EnableMonitoredAgentAsync(request);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgentAsync(MonitoredAgentName, CallSettings)

public virtual Task<Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata>> EnableMonitoredAgentAsync(MonitoredAgentName name, CallSettings callSettings = null)

Enables a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource to be enabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentEnableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.EnableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgentAsync(MonitoredAgentName, CancellationToken)

public virtual Task<Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata>> EnableMonitoredAgentAsync(MonitoredAgentName name, CancellationToken cancellationToken)

Enables a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource to be enabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMonitoredAgentEnableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.EnableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgentAsync(string, CallSettings)

public virtual Task<Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata>> EnableMonitoredAgentAsync(string name, CallSettings callSettings = null)

Enables a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource to be enabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentEnableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.EnableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

EnableMonitoredAgentAsync(string, CancellationToken)

public virtual Task<Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata>> EnableMonitoredAgentAsync(string name, CancellationToken cancellationToken)

Enables a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource to be enabled. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMonitoredAgentEnableMonitoredAgentOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> response = await agentAnomalyDetectionServiceClient.EnableMonitoredAgentAsync(name);

// Poll until the returned long-running operation is complete
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MonitoredAgent result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> retrievedResponse = await agentAnomalyDetectionServiceClient.PollOnceEnableMonitoredAgentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MonitoredAgent retrievedResult = retrievedResponse.Result;
}

GetAgentAnomalyDetectionScope(AgentAnomalyDetectionScopeName, CallSettings)

public virtual AgentAnomalyDetectionScope GetAgentAnomalyDetectionScope(AgentAnomalyDetectionScopeName name, CallSettings callSettings = null)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name AgentAnomalyDetectionScopeName

Required. The name of the AgentAnomalyDetectionScope resource. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AgentAnomalyDetectionScope

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
AgentAnomalyDetectionScopeName name = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]");
// Make the request
AgentAnomalyDetectionScope response = agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScope(name);

GetAgentAnomalyDetectionScope(GetAgentAnomalyDetectionScopeRequest, CallSettings)

public virtual AgentAnomalyDetectionScope GetAgentAnomalyDetectionScope(GetAgentAnomalyDetectionScopeRequest request, CallSettings callSettings = null)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
request GetAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AgentAnomalyDetectionScope

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
GetAgentAnomalyDetectionScopeRequest request = new GetAgentAnomalyDetectionScopeRequest
{
    AgentAnomalyDetectionScopeName = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]"),
};
// Make the request
AgentAnomalyDetectionScope response = agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScope(request);

GetAgentAnomalyDetectionScope(string, CallSettings)

public virtual AgentAnomalyDetectionScope GetAgentAnomalyDetectionScope(string name, CallSettings callSettings = null)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name string

Required. The name of the AgentAnomalyDetectionScope resource. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AgentAnomalyDetectionScope

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agentAnomalyDetectionScopes/[AGENT_ANOMALY_DETECTION_SCOPE]";
// Make the request
AgentAnomalyDetectionScope response = agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScope(name);

GetAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName, CallSettings)

public virtual Task<AgentAnomalyDetectionScope> GetAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName name, CallSettings callSettings = null)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name AgentAnomalyDetectionScopeName

Required. The name of the AgentAnomalyDetectionScope resource. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAgentAnomalyDetectionScope

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AgentAnomalyDetectionScopeName name = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]");
// Make the request
AgentAnomalyDetectionScope response = await agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScopeAsync(name);

GetAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName, CancellationToken)

public virtual Task<AgentAnomalyDetectionScope> GetAgentAnomalyDetectionScopeAsync(AgentAnomalyDetectionScopeName name, CancellationToken cancellationToken)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name AgentAnomalyDetectionScopeName

Required. The name of the AgentAnomalyDetectionScope resource. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAgentAnomalyDetectionScope

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AgentAnomalyDetectionScopeName name = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]");
// Make the request
AgentAnomalyDetectionScope response = await agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScopeAsync(name);

GetAgentAnomalyDetectionScopeAsync(GetAgentAnomalyDetectionScopeRequest, CallSettings)

public virtual Task<AgentAnomalyDetectionScope> GetAgentAnomalyDetectionScopeAsync(GetAgentAnomalyDetectionScopeRequest request, CallSettings callSettings = null)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
request GetAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAgentAnomalyDetectionScope

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetAgentAnomalyDetectionScopeRequest request = new GetAgentAnomalyDetectionScopeRequest
{
    AgentAnomalyDetectionScopeName = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]"),
};
// Make the request
AgentAnomalyDetectionScope response = await agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScopeAsync(request);

GetAgentAnomalyDetectionScopeAsync(GetAgentAnomalyDetectionScopeRequest, CancellationToken)

public virtual Task<AgentAnomalyDetectionScope> GetAgentAnomalyDetectionScopeAsync(GetAgentAnomalyDetectionScopeRequest request, CancellationToken cancellationToken)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
request GetAgentAnomalyDetectionScopeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAgentAnomalyDetectionScope

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetAgentAnomalyDetectionScopeRequest request = new GetAgentAnomalyDetectionScopeRequest
{
    AgentAnomalyDetectionScopeName = AgentAnomalyDetectionScopeName.FromProjectLocationAgentAnomalyDetectionScope("[PROJECT]", "[LOCATION]", "[AGENT_ANOMALY_DETECTION_SCOPE]"),
};
// Make the request
AgentAnomalyDetectionScope response = await agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScopeAsync(request);

GetAgentAnomalyDetectionScopeAsync(string, CallSettings)

public virtual Task<AgentAnomalyDetectionScope> GetAgentAnomalyDetectionScopeAsync(string name, CallSettings callSettings = null)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name string

Required. The name of the AgentAnomalyDetectionScope resource. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAgentAnomalyDetectionScope

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agentAnomalyDetectionScopes/[AGENT_ANOMALY_DETECTION_SCOPE]";
// Make the request
AgentAnomalyDetectionScope response = await agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScopeAsync(name);

GetAgentAnomalyDetectionScopeAsync(string, CancellationToken)

public virtual Task<AgentAnomalyDetectionScope> GetAgentAnomalyDetectionScopeAsync(string name, CancellationToken cancellationToken)

Gets the details of a specific AgentAnomalyDetectionScope.

Parameters
Name Description
name string

Required. The name of the AgentAnomalyDetectionScope resource. Format: projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAgentAnomalyDetectionScope

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agentAnomalyDetectionScopes/[AGENT_ANOMALY_DETECTION_SCOPE]";
// Make the request
AgentAnomalyDetectionScope response = await agentAnomalyDetectionServiceClient.GetAgentAnomalyDetectionScopeAsync(name);

GetAnalyzedInvocation(AnalyzedInvocationName, CallSettings)

public virtual AnalyzedInvocation GetAnalyzedInvocation(AnalyzedInvocationName name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
name AnalyzedInvocationName

Required. The name of the AnalyzedInvocation resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzedInvocation

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
AnalyzedInvocationName name = AnalyzedInvocationName.FromProjectLocationMonitoredAgentAnalyzedSessionAnalyzedInvocation("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]", "[ANALYZED_INVOCATION]");
// Make the request
AnalyzedInvocation response = agentAnomalyDetectionServiceClient.GetAnalyzedInvocation(name);

GetAnalyzedInvocation(GetAnalyzedInvocationRequest, CallSettings)

public virtual AnalyzedInvocation GetAnalyzedInvocation(GetAnalyzedInvocationRequest request, CallSettings callSettings = null)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
request GetAnalyzedInvocationRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzedInvocation

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
GetAnalyzedInvocationRequest request = new GetAnalyzedInvocationRequest
{
    AnalyzedInvocationName = AnalyzedInvocationName.FromProjectLocationMonitoredAgentAnalyzedSessionAnalyzedInvocation("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]", "[ANALYZED_INVOCATION]"),
};
// Make the request
AnalyzedInvocation response = agentAnomalyDetectionServiceClient.GetAnalyzedInvocation(request);

GetAnalyzedInvocation(string, CallSettings)

public virtual AnalyzedInvocation GetAnalyzedInvocation(string name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
name string

Required. The name of the AnalyzedInvocation resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzedInvocation

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]/analyzedInvocations/[ANALYZED_INVOCATION]";
// Make the request
AnalyzedInvocation response = agentAnomalyDetectionServiceClient.GetAnalyzedInvocation(name);

GetAnalyzedInvocationAsync(AnalyzedInvocationName, CallSettings)

public virtual Task<AnalyzedInvocation> GetAnalyzedInvocationAsync(AnalyzedInvocationName name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
name AnalyzedInvocationName

Required. The name of the AnalyzedInvocation resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzedInvocation

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzedInvocationName name = AnalyzedInvocationName.FromProjectLocationMonitoredAgentAnalyzedSessionAnalyzedInvocation("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]", "[ANALYZED_INVOCATION]");
// Make the request
AnalyzedInvocation response = await agentAnomalyDetectionServiceClient.GetAnalyzedInvocationAsync(name);

GetAnalyzedInvocationAsync(AnalyzedInvocationName, CancellationToken)

public virtual Task<AnalyzedInvocation> GetAnalyzedInvocationAsync(AnalyzedInvocationName name, CancellationToken cancellationToken)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
name AnalyzedInvocationName

Required. The name of the AnalyzedInvocation resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzedInvocation

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzedInvocationName name = AnalyzedInvocationName.FromProjectLocationMonitoredAgentAnalyzedSessionAnalyzedInvocation("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]", "[ANALYZED_INVOCATION]");
// Make the request
AnalyzedInvocation response = await agentAnomalyDetectionServiceClient.GetAnalyzedInvocationAsync(name);

GetAnalyzedInvocationAsync(GetAnalyzedInvocationRequest, CallSettings)

public virtual Task<AnalyzedInvocation> GetAnalyzedInvocationAsync(GetAnalyzedInvocationRequest request, CallSettings callSettings = null)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
request GetAnalyzedInvocationRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzedInvocation

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetAnalyzedInvocationRequest request = new GetAnalyzedInvocationRequest
{
    AnalyzedInvocationName = AnalyzedInvocationName.FromProjectLocationMonitoredAgentAnalyzedSessionAnalyzedInvocation("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]", "[ANALYZED_INVOCATION]"),
};
// Make the request
AnalyzedInvocation response = await agentAnomalyDetectionServiceClient.GetAnalyzedInvocationAsync(request);

GetAnalyzedInvocationAsync(GetAnalyzedInvocationRequest, CancellationToken)

public virtual Task<AnalyzedInvocation> GetAnalyzedInvocationAsync(GetAnalyzedInvocationRequest request, CancellationToken cancellationToken)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
request GetAnalyzedInvocationRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzedInvocation

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetAnalyzedInvocationRequest request = new GetAnalyzedInvocationRequest
{
    AnalyzedInvocationName = AnalyzedInvocationName.FromProjectLocationMonitoredAgentAnalyzedSessionAnalyzedInvocation("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]", "[ANALYZED_INVOCATION]"),
};
// Make the request
AnalyzedInvocation response = await agentAnomalyDetectionServiceClient.GetAnalyzedInvocationAsync(request);

GetAnalyzedInvocationAsync(string, CallSettings)

public virtual Task<AnalyzedInvocation> GetAnalyzedInvocationAsync(string name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
name string

Required. The name of the AnalyzedInvocation resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzedInvocation

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]/analyzedInvocations/[ANALYZED_INVOCATION]";
// Make the request
AnalyzedInvocation response = await agentAnomalyDetectionServiceClient.GetAnalyzedInvocationAsync(name);

GetAnalyzedInvocationAsync(string, CancellationToken)

public virtual Task<AnalyzedInvocation> GetAnalyzedInvocationAsync(string name, CancellationToken cancellationToken)

Gets the details of a specific AnalyzedInvocation.

Parameters
Name Description
name string

Required. The name of the AnalyzedInvocation resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzedInvocation

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]/analyzedInvocations/[ANALYZED_INVOCATION]";
// Make the request
AnalyzedInvocation response = await agentAnomalyDetectionServiceClient.GetAnalyzedInvocationAsync(name);

GetAnalyzedSession(AnalyzedSessionName, CallSettings)

public virtual AnalyzedSession GetAnalyzedSession(AnalyzedSessionName name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
name AnalyzedSessionName

Required. The name of the AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzedSession

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
AnalyzedSessionName name = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]");
// Make the request
AnalyzedSession response = agentAnomalyDetectionServiceClient.GetAnalyzedSession(name);

GetAnalyzedSession(GetAnalyzedSessionRequest, CallSettings)

public virtual AnalyzedSession GetAnalyzedSession(GetAnalyzedSessionRequest request, CallSettings callSettings = null)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
request GetAnalyzedSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzedSession

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
GetAnalyzedSessionRequest request = new GetAnalyzedSessionRequest
{
    AnalyzedSessionName = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]"),
    View = AnalyzedSessionView.Unspecified,
};
// Make the request
AnalyzedSession response = agentAnomalyDetectionServiceClient.GetAnalyzedSession(request);

GetAnalyzedSession(string, CallSettings)

public virtual AnalyzedSession GetAnalyzedSession(string name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
name string

Required. The name of the AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzedSession

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]";
// Make the request
AnalyzedSession response = agentAnomalyDetectionServiceClient.GetAnalyzedSession(name);

GetAnalyzedSessionAsync(AnalyzedSessionName, CallSettings)

public virtual Task<AnalyzedSession> GetAnalyzedSessionAsync(AnalyzedSessionName name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
name AnalyzedSessionName

Required. The name of the AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzedSession

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzedSessionName name = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]");
// Make the request
AnalyzedSession response = await agentAnomalyDetectionServiceClient.GetAnalyzedSessionAsync(name);

GetAnalyzedSessionAsync(AnalyzedSessionName, CancellationToken)

public virtual Task<AnalyzedSession> GetAnalyzedSessionAsync(AnalyzedSessionName name, CancellationToken cancellationToken)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
name AnalyzedSessionName

Required. The name of the AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzedSession

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzedSessionName name = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]");
// Make the request
AnalyzedSession response = await agentAnomalyDetectionServiceClient.GetAnalyzedSessionAsync(name);

GetAnalyzedSessionAsync(GetAnalyzedSessionRequest, CallSettings)

public virtual Task<AnalyzedSession> GetAnalyzedSessionAsync(GetAnalyzedSessionRequest request, CallSettings callSettings = null)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
request GetAnalyzedSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzedSession

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetAnalyzedSessionRequest request = new GetAnalyzedSessionRequest
{
    AnalyzedSessionName = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]"),
    View = AnalyzedSessionView.Unspecified,
};
// Make the request
AnalyzedSession response = await agentAnomalyDetectionServiceClient.GetAnalyzedSessionAsync(request);

GetAnalyzedSessionAsync(GetAnalyzedSessionRequest, CancellationToken)

public virtual Task<AnalyzedSession> GetAnalyzedSessionAsync(GetAnalyzedSessionRequest request, CancellationToken cancellationToken)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
request GetAnalyzedSessionRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzedSession

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetAnalyzedSessionRequest request = new GetAnalyzedSessionRequest
{
    AnalyzedSessionName = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]"),
    View = AnalyzedSessionView.Unspecified,
};
// Make the request
AnalyzedSession response = await agentAnomalyDetectionServiceClient.GetAnalyzedSessionAsync(request);

GetAnalyzedSessionAsync(string, CallSettings)

public virtual Task<AnalyzedSession> GetAnalyzedSessionAsync(string name, CallSettings callSettings = null)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
name string

Required. The name of the AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzedSession

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]";
// Make the request
AnalyzedSession response = await agentAnomalyDetectionServiceClient.GetAnalyzedSessionAsync(name);

GetAnalyzedSessionAsync(string, CancellationToken)

public virtual Task<AnalyzedSession> GetAnalyzedSessionAsync(string name, CancellationToken cancellationToken)

Gets the details of a specific AnalyzedSession.

Parameters
Name Description
name string

Required. The name of the AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzedSession

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]";
// Make the request
AnalyzedSession response = await agentAnomalyDetectionServiceClient.GetAnalyzedSessionAsync(name);

GetMonitoredAgent(GetMonitoredAgentRequest, CallSettings)

public virtual MonitoredAgent GetMonitoredAgent(GetMonitoredAgentRequest request, CallSettings callSettings = null)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
request GetMonitoredAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MonitoredAgent

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
GetMonitoredAgentRequest request = new GetMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
MonitoredAgent response = agentAnomalyDetectionServiceClient.GetMonitoredAgent(request);

GetMonitoredAgent(MonitoredAgentName, CallSettings)

public virtual MonitoredAgent GetMonitoredAgent(MonitoredAgentName name, CallSettings callSettings = null)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MonitoredAgent

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
MonitoredAgent response = agentAnomalyDetectionServiceClient.GetMonitoredAgent(name);

GetMonitoredAgent(string, CallSettings)

public virtual MonitoredAgent GetMonitoredAgent(string name, CallSettings callSettings = null)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
MonitoredAgent

The RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
MonitoredAgent response = agentAnomalyDetectionServiceClient.GetMonitoredAgent(name);

GetMonitoredAgentAsync(GetMonitoredAgentRequest, CallSettings)

public virtual Task<MonitoredAgent> GetMonitoredAgentAsync(GetMonitoredAgentRequest request, CallSettings callSettings = null)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
request GetMonitoredAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMonitoredAgent

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetMonitoredAgentRequest request = new GetMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
MonitoredAgent response = await agentAnomalyDetectionServiceClient.GetMonitoredAgentAsync(request);

GetMonitoredAgentAsync(GetMonitoredAgentRequest, CancellationToken)

public virtual Task<MonitoredAgent> GetMonitoredAgentAsync(GetMonitoredAgentRequest request, CancellationToken cancellationToken)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
request GetMonitoredAgentRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskMonitoredAgent

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetMonitoredAgentRequest request = new GetMonitoredAgentRequest
{
    MonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
};
// Make the request
MonitoredAgent response = await agentAnomalyDetectionServiceClient.GetMonitoredAgentAsync(request);

GetMonitoredAgentAsync(MonitoredAgentName, CallSettings)

public virtual Task<MonitoredAgent> GetMonitoredAgentAsync(MonitoredAgentName name, CallSettings callSettings = null)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMonitoredAgent

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
MonitoredAgent response = await agentAnomalyDetectionServiceClient.GetMonitoredAgentAsync(name);

GetMonitoredAgentAsync(MonitoredAgentName, CancellationToken)

public virtual Task<MonitoredAgent> GetMonitoredAgentAsync(MonitoredAgentName name, CancellationToken cancellationToken)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
name MonitoredAgentName

Required. The name of the MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskMonitoredAgent

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName name = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
MonitoredAgent response = await agentAnomalyDetectionServiceClient.GetMonitoredAgentAsync(name);

GetMonitoredAgentAsync(string, CallSettings)

public virtual Task<MonitoredAgent> GetMonitoredAgentAsync(string name, CallSettings callSettings = null)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMonitoredAgent

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
MonitoredAgent response = await agentAnomalyDetectionServiceClient.GetMonitoredAgentAsync(name);

GetMonitoredAgentAsync(string, CancellationToken)

public virtual Task<MonitoredAgent> GetMonitoredAgentAsync(string name, CancellationToken cancellationToken)

Gets the details of a specific MonitoredAgent.

Parameters
Name Description
name string

Required. The name of the MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskMonitoredAgent

A Task containing the RPC response.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
MonitoredAgent response = await agentAnomalyDetectionServiceClient.GetMonitoredAgentAsync(name);

ListAgentAnomalyDetectionScopes(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> ListAgentAnomalyDetectionScopes(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AgentAnomalyDetectionScopes in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the AgentAnomalyDetectionScopes from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAgentAnomalyDetectionScopesResponseAgentAnomalyDetectionScope

A pageable sequence of AgentAnomalyDetectionScope resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> response = agentAnomalyDetectionServiceClient.ListAgentAnomalyDetectionScopes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AgentAnomalyDetectionScope item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAgentAnomalyDetectionScopesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AgentAnomalyDetectionScope item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AgentAnomalyDetectionScope> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AgentAnomalyDetectionScope item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAgentAnomalyDetectionScopes(ListAgentAnomalyDetectionScopesRequest, CallSettings)

public virtual PagedEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> ListAgentAnomalyDetectionScopes(ListAgentAnomalyDetectionScopesRequest request, CallSettings callSettings = null)

Lists AgentAnomalyDetectionScopes in a Location.

Parameters
Name Description
request ListAgentAnomalyDetectionScopesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAgentAnomalyDetectionScopesResponseAgentAnomalyDetectionScope

A pageable sequence of AgentAnomalyDetectionScope resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
ListAgentAnomalyDetectionScopesRequest request = new ListAgentAnomalyDetectionScopesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> response = agentAnomalyDetectionServiceClient.ListAgentAnomalyDetectionScopes(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AgentAnomalyDetectionScope item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAgentAnomalyDetectionScopesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AgentAnomalyDetectionScope item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AgentAnomalyDetectionScope> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AgentAnomalyDetectionScope item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAgentAnomalyDetectionScopes(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> ListAgentAnomalyDetectionScopes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AgentAnomalyDetectionScopes in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the AgentAnomalyDetectionScopes from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAgentAnomalyDetectionScopesResponseAgentAnomalyDetectionScope

A pageable sequence of AgentAnomalyDetectionScope resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> response = agentAnomalyDetectionServiceClient.ListAgentAnomalyDetectionScopes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AgentAnomalyDetectionScope item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAgentAnomalyDetectionScopesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AgentAnomalyDetectionScope item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AgentAnomalyDetectionScope> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AgentAnomalyDetectionScope item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAgentAnomalyDetectionScopesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> ListAgentAnomalyDetectionScopesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AgentAnomalyDetectionScopes in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the AgentAnomalyDetectionScopes from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAgentAnomalyDetectionScopesResponseAgentAnomalyDetectionScope

A pageable asynchronous sequence of AgentAnomalyDetectionScope resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> response = agentAnomalyDetectionServiceClient.ListAgentAnomalyDetectionScopesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AgentAnomalyDetectionScope item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAgentAnomalyDetectionScopesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AgentAnomalyDetectionScope item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AgentAnomalyDetectionScope> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AgentAnomalyDetectionScope item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAgentAnomalyDetectionScopesAsync(ListAgentAnomalyDetectionScopesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> ListAgentAnomalyDetectionScopesAsync(ListAgentAnomalyDetectionScopesRequest request, CallSettings callSettings = null)

Lists AgentAnomalyDetectionScopes in a Location.

Parameters
Name Description
request ListAgentAnomalyDetectionScopesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAgentAnomalyDetectionScopesResponseAgentAnomalyDetectionScope

A pageable asynchronous sequence of AgentAnomalyDetectionScope resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
ListAgentAnomalyDetectionScopesRequest request = new ListAgentAnomalyDetectionScopesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> response = agentAnomalyDetectionServiceClient.ListAgentAnomalyDetectionScopesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AgentAnomalyDetectionScope item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAgentAnomalyDetectionScopesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AgentAnomalyDetectionScope item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AgentAnomalyDetectionScope> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AgentAnomalyDetectionScope item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAgentAnomalyDetectionScopesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> ListAgentAnomalyDetectionScopesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AgentAnomalyDetectionScopes in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the AgentAnomalyDetectionScopes from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAgentAnomalyDetectionScopesResponseAgentAnomalyDetectionScope

A pageable asynchronous sequence of AgentAnomalyDetectionScope resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListAgentAnomalyDetectionScopesResponse, AgentAnomalyDetectionScope> response = agentAnomalyDetectionServiceClient.ListAgentAnomalyDetectionScopesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AgentAnomalyDetectionScope item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAgentAnomalyDetectionScopesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AgentAnomalyDetectionScope item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AgentAnomalyDetectionScope> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AgentAnomalyDetectionScope item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedInvocations(AnalyzedSessionName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> ListAnalyzedInvocations(AnalyzedSessionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.

Parameters
Name Description
parent AnalyzedSessionName

Required. The parent AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAnalyzedInvocationsResponseAnalyzedInvocation

A pageable sequence of AnalyzedInvocation resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
AnalyzedSessionName parent = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]");
// Make the request
PagedEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> response = agentAnomalyDetectionServiceClient.ListAnalyzedInvocations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzedInvocation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyzedInvocationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedInvocation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedInvocation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedInvocation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedInvocations(ListAnalyzedInvocationsRequest, CallSettings)

public virtual PagedEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> ListAnalyzedInvocations(ListAnalyzedInvocationsRequest request, CallSettings callSettings = null)

Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.

Parameters
Name Description
request ListAnalyzedInvocationsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAnalyzedInvocationsResponseAnalyzedInvocation

A pageable sequence of AnalyzedInvocation resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
ListAnalyzedInvocationsRequest request = new ListAnalyzedInvocationsRequest
{
    ParentAsAnalyzedSessionName = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]"),
};
// Make the request
PagedEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> response = agentAnomalyDetectionServiceClient.ListAnalyzedInvocations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzedInvocation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyzedInvocationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedInvocation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedInvocation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedInvocation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedInvocations(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> ListAnalyzedInvocations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.

Parameters
Name Description
parent string

Required. The parent AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAnalyzedInvocationsResponseAnalyzedInvocation

A pageable sequence of AnalyzedInvocation resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]";
// Make the request
PagedEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> response = agentAnomalyDetectionServiceClient.ListAnalyzedInvocations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzedInvocation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyzedInvocationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedInvocation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedInvocation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedInvocation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedInvocationsAsync(AnalyzedSessionName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> ListAnalyzedInvocationsAsync(AnalyzedSessionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.

Parameters
Name Description
parent AnalyzedSessionName

Required. The parent AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAnalyzedInvocationsResponseAnalyzedInvocation

A pageable asynchronous sequence of AnalyzedInvocation resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzedSessionName parent = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]");
// Make the request
PagedAsyncEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> response = agentAnomalyDetectionServiceClient.ListAnalyzedInvocationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AnalyzedInvocation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAnalyzedInvocationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedInvocation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedInvocation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedInvocation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedInvocationsAsync(ListAnalyzedInvocationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> ListAnalyzedInvocationsAsync(ListAnalyzedInvocationsRequest request, CallSettings callSettings = null)

Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.

Parameters
Name Description
request ListAnalyzedInvocationsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAnalyzedInvocationsResponseAnalyzedInvocation

A pageable asynchronous sequence of AnalyzedInvocation resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
ListAnalyzedInvocationsRequest request = new ListAnalyzedInvocationsRequest
{
    ParentAsAnalyzedSessionName = AnalyzedSessionName.FromProjectLocationMonitoredAgentAnalyzedSession("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]", "[ANALYZED_SESSION]"),
};
// Make the request
PagedAsyncEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> response = agentAnomalyDetectionServiceClient.ListAnalyzedInvocationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AnalyzedInvocation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAnalyzedInvocationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedInvocation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedInvocation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedInvocation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedInvocationsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> ListAnalyzedInvocationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.

Parameters
Name Description
parent string

Required. The parent AnalyzedSession resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAnalyzedInvocationsResponseAnalyzedInvocation

A pageable asynchronous sequence of AnalyzedInvocation resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]/analyzedSessions/[ANALYZED_SESSION]";
// Make the request
PagedAsyncEnumerable<ListAnalyzedInvocationsResponse, AnalyzedInvocation> response = agentAnomalyDetectionServiceClient.ListAnalyzedInvocationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AnalyzedInvocation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAnalyzedInvocationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedInvocation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedInvocation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedInvocation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedSessions(ListAnalyzedSessionsRequest, CallSettings)

public virtual PagedEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> ListAnalyzedSessions(ListAnalyzedSessionsRequest request, CallSettings callSettings = null)

Lists AnalyzedSessions in a MonitoredAgent.

Parameters
Name Description
request ListAnalyzedSessionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAnalyzedSessionsResponseAnalyzedSession

A pageable sequence of AnalyzedSession resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
ListAnalyzedSessionsRequest request = new ListAnalyzedSessionsRequest
{
    ParentAsMonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
    Filter = "",
    View = AnalyzedSessionView.Unspecified,
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> response = agentAnomalyDetectionServiceClient.ListAnalyzedSessions(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzedSession item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedSession item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedSession> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedSession item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedSessions(MonitoredAgentName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> ListAnalyzedSessions(MonitoredAgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedSessions in a MonitoredAgent.

Parameters
Name Description
parent MonitoredAgentName

Required. The parent MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAnalyzedSessionsResponseAnalyzedSession

A pageable sequence of AnalyzedSession resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
MonitoredAgentName parent = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
PagedEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> response = agentAnomalyDetectionServiceClient.ListAnalyzedSessions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzedSession item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedSession item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedSession> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedSession item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedSessions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> ListAnalyzedSessions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedSessions in a MonitoredAgent.

Parameters
Name Description
parent string

Required. The parent MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAnalyzedSessionsResponseAnalyzedSession

A pageable sequence of AnalyzedSession resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
PagedEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> response = agentAnomalyDetectionServiceClient.ListAnalyzedSessions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzedSession item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedSession item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedSession> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedSession item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedSessionsAsync(ListAnalyzedSessionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> ListAnalyzedSessionsAsync(ListAnalyzedSessionsRequest request, CallSettings callSettings = null)

Lists AnalyzedSessions in a MonitoredAgent.

Parameters
Name Description
request ListAnalyzedSessionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAnalyzedSessionsResponseAnalyzedSession

A pageable asynchronous sequence of AnalyzedSession resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
ListAnalyzedSessionsRequest request = new ListAnalyzedSessionsRequest
{
    ParentAsMonitoredAgentName = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]"),
    Filter = "",
    View = AnalyzedSessionView.Unspecified,
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> response = agentAnomalyDetectionServiceClient.ListAnalyzedSessionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AnalyzedSession item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedSession item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedSession> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedSession item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedSessionsAsync(MonitoredAgentName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> ListAnalyzedSessionsAsync(MonitoredAgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedSessions in a MonitoredAgent.

Parameters
Name Description
parent MonitoredAgentName

Required. The parent MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAnalyzedSessionsResponseAnalyzedSession

A pageable asynchronous sequence of AnalyzedSession resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredAgentName parent = MonitoredAgentName.FromProjectLocationMonitoredAgent("[PROJECT]", "[LOCATION]", "[MONITORED_AGENT]");
// Make the request
PagedAsyncEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> response = agentAnomalyDetectionServiceClient.ListAnalyzedSessionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AnalyzedSession item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedSession item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedSession> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedSession item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAnalyzedSessionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> ListAnalyzedSessionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists AnalyzedSessions in a MonitoredAgent.

Parameters
Name Description
parent string

Required. The parent MonitoredAgent resource. Format: projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAnalyzedSessionsResponseAnalyzedSession

A pageable asynchronous sequence of AnalyzedSession resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/monitoredAgents/[MONITORED_AGENT]";
// Make the request
PagedAsyncEnumerable<ListAnalyzedSessionsResponse, AnalyzedSession> response = agentAnomalyDetectionServiceClient.ListAnalyzedSessionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (AnalyzedSession item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAnalyzedSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (AnalyzedSession item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyzedSession> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyzedSession item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMonitoredAgents(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> ListMonitoredAgents(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists MonitoredAgents in a specific Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the MonitoredAgents from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListMonitoredAgentsResponseMonitoredAgent

A pageable sequence of MonitoredAgent resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> response = agentAnomalyDetectionServiceClient.ListMonitoredAgents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredAgent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredAgent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredAgent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredAgent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMonitoredAgents(ListMonitoredAgentsRequest, CallSettings)

public virtual PagedEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> ListMonitoredAgents(ListMonitoredAgentsRequest request, CallSettings callSettings = null)

Lists MonitoredAgents in a specific Location.

Parameters
Name Description
request ListMonitoredAgentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListMonitoredAgentsResponseMonitoredAgent

A pageable sequence of MonitoredAgent resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
ListMonitoredAgentsRequest request = new ListMonitoredAgentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> response = agentAnomalyDetectionServiceClient.ListMonitoredAgents(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredAgent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredAgent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredAgent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredAgent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMonitoredAgents(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> ListMonitoredAgents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists MonitoredAgents in a specific Location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the MonitoredAgents from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListMonitoredAgentsResponseMonitoredAgent

A pageable sequence of MonitoredAgent resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = AgentAnomalyDetectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> response = agentAnomalyDetectionServiceClient.ListMonitoredAgents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredAgent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredAgent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredAgent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredAgent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMonitoredAgentsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> ListMonitoredAgentsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists MonitoredAgents in a specific Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the MonitoredAgents from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListMonitoredAgentsResponseMonitoredAgent

A pageable asynchronous sequence of MonitoredAgent resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> response = agentAnomalyDetectionServiceClient.ListMonitoredAgentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (MonitoredAgent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListMonitoredAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredAgent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredAgent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredAgent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMonitoredAgentsAsync(ListMonitoredAgentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> ListMonitoredAgentsAsync(ListMonitoredAgentsRequest request, CallSettings callSettings = null)

Lists MonitoredAgents in a specific Location.

Parameters
Name Description
request ListMonitoredAgentsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListMonitoredAgentsResponseMonitoredAgent

A pageable asynchronous sequence of MonitoredAgent resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
ListMonitoredAgentsRequest request = new ListMonitoredAgentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> response = agentAnomalyDetectionServiceClient.ListMonitoredAgentsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (MonitoredAgent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListMonitoredAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredAgent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredAgent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredAgent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMonitoredAgentsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> ListMonitoredAgentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists MonitoredAgents in a specific Location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the MonitoredAgents from. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListMonitoredAgentsResponseMonitoredAgent

A pageable asynchronous sequence of MonitoredAgent resources.

Example
// Create client
AgentAnomalyDetectionServiceClient agentAnomalyDetectionServiceClient = await AgentAnomalyDetectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListMonitoredAgentsResponse, MonitoredAgent> response = agentAnomalyDetectionServiceClient.ListMonitoredAgentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (MonitoredAgent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListMonitoredAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredAgent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredAgent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredAgent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceClearTrainingData(string, CallSettings)

public virtual Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata> PollOnceClearTrainingData(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ClearTrainingData .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClearTrainingDataResponseClearTrainingDataOperationMetadata

The result of polling the operation.

PollOnceClearTrainingDataAsync(string, CallSettings)

public virtual Task<Operation<ClearTrainingDataResponse, ClearTrainingDataOperationMetadata>> PollOnceClearTrainingDataAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ClearTrainingData.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClearTrainingDataResponseClearTrainingDataOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateAgentAnomalyDetectionScope(string, CallSettings)

public virtual Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata> PollOnceCreateAgentAnomalyDetectionScope(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateAgentAnomalyDetectionScope.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

The result of polling the operation.

PollOnceCreateAgentAnomalyDetectionScopeAsync(string, CallSettings)

public virtual Task<Operation<AgentAnomalyDetectionScope, CreateAgentAnomalyDetectionScopeOperationMetadata>> PollOnceCreateAgentAnomalyDetectionScopeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateAgentAnomalyDetectionScope.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAgentAnomalyDetectionScopeCreateAgentAnomalyDetectionScopeOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteAgentAnomalyDetectionScope(string, CallSettings)

public virtual Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata> PollOnceDeleteAgentAnomalyDetectionScope(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteAgentAnomalyDetectionScope.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

The result of polling the operation.

PollOnceDeleteAgentAnomalyDetectionScopeAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteAgentAnomalyDetectionScopeOperationMetadata>> PollOnceDeleteAgentAnomalyDetectionScopeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteAgentAnomalyDetectionScope.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteAgentAnomalyDetectionScopeOperationMetadata

A task representing the result of polling the operation.

PollOnceDisableMonitoredAgent(string, CallSettings)

public virtual Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata> PollOnceDisableMonitoredAgent(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DisableMonitoredAgent .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentDisableMonitoredAgentOperationMetadata

The result of polling the operation.

PollOnceDisableMonitoredAgentAsync(string, CallSettings)

public virtual Task<Operation<MonitoredAgent, DisableMonitoredAgentOperationMetadata>> PollOnceDisableMonitoredAgentAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DisableMonitoredAgent.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentDisableMonitoredAgentOperationMetadata

A task representing the result of polling the operation.

PollOnceEnableMonitoredAgent(string, CallSettings)

public virtual Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata> PollOnceEnableMonitoredAgent(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of EnableMonitoredAgent .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMonitoredAgentEnableMonitoredAgentOperationMetadata

The result of polling the operation.

PollOnceEnableMonitoredAgentAsync(string, CallSettings)

public virtual Task<Operation<MonitoredAgent, EnableMonitoredAgentOperationMetadata>> PollOnceEnableMonitoredAgentAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of EnableMonitoredAgent.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMonitoredAgentEnableMonitoredAgentOperationMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.