BetaAgentInsightMonitorsOperations Class
Custom operations for beta Agent Insights monitors.
Constructor
BetaAgentInsightMonitorsOperations(*args, **kwargs)
Methods
| begin_create_run |
Start an Agent Insights run for a monitor. |
| cancel_run |
Cancel an Agent Insights run. |
| create |
Create an Agent Insights monitor for an agent. |
| delete |
Delete an Agent Insights monitor and all of its runs, insights, and state. |
| get |
Get an Agent Insights monitor. |
| get_insight |
Get a full insight for an Agent Insights monitor. |
| get_run |
Get an Agent Insights run. |
| list |
List Agent Insights monitors, optionally filtered by agent name. |
| list_insights |
List current insights for an Agent Insights monitor. |
| list_runs |
List Agent Insights runs for a monitor. |
| reset |
Reset an Agent Insights monitor's overview, checkpoint, and active insight state. |
| update |
Update an Agent Insights monitor. |
| update_insight |
Update the lifecycle status of an insight. |
begin_create_run
Start an Agent Insights run for a monitor.
begin_create_run(monitor_id: str, run: _models.AgentInsightRunCreate, *, operation_id: str | None = None, content_type: str = 'application/json', **kwargs: Any) -> AgentInsightRunLROPoller
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
run
Required
|
Run inputs. Send an empty object to use the default 168-hour lookback window. Is one of the following types: AgentInsightRunCreate, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
operation_id
|
Client-generated unique ID for idempotent retries. When absent, the server creates the run unconditionally. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
A poller that returns AgentInsightRunResult and exposes the run ID in |
Exceptions
| Type | Description |
|---|---|
cancel_run
Cancel an Agent Insights run.
cancel_run(monitor_id: str, run_id: str, **kwargs: Any) -> AgentInsightRun
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
run_id
Required
|
The identifier of the run. Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightRun. The AgentInsightRun is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
create
Create an Agent Insights monitor for an agent.
create(monitor: AgentInsightMonitorCreate | MutableMapping[str, Any] | IO[bytes], **kwargs: Any) -> AgentInsightMonitor
Parameters
| Name | Description |
|---|---|
|
monitor
Required
|
The monitor to create. Is one of the following types: AgentInsightMonitorCreate, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightMonitor. The AgentInsightMonitor is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
delete
Delete an Agent Insights monitor and all of its runs, insights, and state.
delete(monitor_id: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
get
Get an Agent Insights monitor.
get(monitor_id: str, **kwargs: Any) -> AgentInsightMonitor
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightMonitor. The AgentInsightMonitor is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_insight
Get a full insight for an Agent Insights monitor.
get_insight(monitor_id: str, insight_id: str, *, include_details: bool | None = None, **kwargs: Any) -> AgentInsight
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
insight_id
Required
|
The identifier of the insight. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
include_details
|
Whether to include expanded insight details such as evidence and run links in the response. Defaults to false. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
AgentInsight. The AgentInsight is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_run
Get an Agent Insights run.
get_run(monitor_id: str, run_id: str, **kwargs: Any) -> AgentInsightRun
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
run_id
Required
|
The identifier of the run. Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightRun. The AgentInsightRun is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list
List Agent Insights monitors, optionally filtered by agent name.
list(*, before: str | None = None, limit: int | None = None, order: str | PageOrder | None = None, agent_name: str | None = None, **kwargs: Any) -> ItemPaged[AgentInsightMonitorListItem]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
before
|
A cursor that identifies the first item in the next page. Default value is None. Default value: None
|
|
limit
|
The maximum number of items to return. Defaults to 20. Default value is None. Default value: None
|
|
order
|
Sort order by creation time. Defaults to descending. Known values are: "asc" and "desc". Default value is None. Default value: None
|
|
agent_name
|
Filter monitors by agent name. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of AgentInsightMonitorListItem |
Exceptions
| Type | Description |
|---|---|
list_insights
List current insights for an Agent Insights monitor.
list_insights(monitor_id: str, *, before: str | None = None, limit: int | None = None, order: str | PageOrder | None = None, category: str | None = None, severity: str | AgentInsightSeverity | None = None, status: str | AgentInsightStatus | None = None, include_details: bool | None = None, **kwargs: Any) -> ItemPaged[AgentInsight]
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
before
|
A cursor that identifies the first item in the next page. Default value is None. Default value: None
|
|
limit
|
The maximum number of items to return. Defaults to 20. Default value is None. Default value: None
|
|
order
|
Sort order by creation time. Defaults to descending. Known values are: "asc" and "desc". Default value is None. Default value: None
|
|
category
|
Filter insights by category. Default value is None. Default value: None
|
|
severity
|
Filter insights by severity. Known values are: "high", "medium", and "low". Default value is None. Default value: None
|
|
status
|
Filter insights by lifecycle status. Known values are: "active", "resolved", and "ignored". Default value is None. Default value: None
|
|
include_details
|
Whether to include expanded insight details such as evidence and run links in the response. Defaults to false. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of AgentInsight |
Exceptions
| Type | Description |
|---|---|
list_runs
List Agent Insights runs for a monitor.
list_runs(monitor_id: str, *, before: str | None = None, limit: int | None = None, order: str | PageOrder | None = None, status: str | JobStatus | None = None, trigger: str | AgentInsightRunTrigger | None = None, **kwargs: Any) -> ItemPaged[AgentInsightRun]
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
before
|
A cursor that identifies the first item in the next page. Default value is None. Default value: None
|
|
limit
|
The maximum number of items to return. Defaults to 20. Default value is None. Default value: None
|
|
order
|
Sort order by creation time. Defaults to descending. Known values are: "asc" and "desc". Default value is None. Default value: None
|
|
status
|
Filter runs by status. Known values are: "queued", "in_progress", "succeeded", "failed", and "cancelled". Default value is None. Default value: None
|
|
trigger
|
Filter runs by trigger. Known values are: "on_demand" and "scheduled". Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of AgentInsightRun |
Exceptions
| Type | Description |
|---|---|
reset
Reset an Agent Insights monitor's overview, checkpoint, and active insight state.
reset(monitor_id: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
update
Update an Agent Insights monitor.
update(monitor_id: str, monitor: AgentInsightMonitorUpdate | MutableMapping[str, Any] | IO[bytes], **kwargs: Any) -> AgentInsightMonitor
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
monitor
Required
|
The monitor fields to update. Is one of the following types: AgentInsightMonitorUpdate, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsightMonitor. The AgentInsightMonitor is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
update_insight
Update the lifecycle status of an insight.
update_insight(monitor_id: str, insight_id: str, update: AgentInsightUpdate | MutableMapping[str, Any] | IO[bytes], **kwargs: Any) -> AgentInsight
Parameters
| Name | Description |
|---|---|
|
monitor_id
Required
|
The identifier of the monitor. Required. |
|
insight_id
Required
|
The identifier of the insight. Required. |
|
update
Required
|
The insight fields to update. Is one of the following types: AgentInsightUpdate, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
AgentInsight. The AgentInsight is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|