BetaAgentsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:agents> attribute.
Constructor
BetaAgentsOperations(*args, **kwargs)
Methods
| begin_create_optimization_job |
Create an agent optimization job. Creates an optimization job and returns the queued job. Honors |
| cancel_optimization_job |
Cancel an agent optimization job. Requests cancellation of a running or queued job and returns an error if the job is already in a terminal state. |
| delete_optimization_job |
Delete an agent optimization job. Deletes the job and its candidate artifacts, canceling the job first if it is non-terminal. |
| get_optimization_job |
Get an agent optimization job. Retrieves an optimization job by its identifier. |
| list_optimization_jobs |
List agent optimization jobs. Lists optimization jobs with cursor pagination and optional status or agent name filters. |
begin_create_optimization_job
Create an agent optimization job.
Creates an optimization job and returns the queued job. Honors Operation-Id for idempotent
retry.
begin_create_optimization_job(job: _models.OptimizationJob, *, operation_id: str | None = None, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.OptimizationJobResult]
Parameters
| Name | Description |
|---|---|
|
job
Required
|
The job to create. Is one of the following types: OptimizationJob, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
operation_id
|
Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns OptimizationJobResult. The OptimizationJobResult is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
cancel_optimization_job
Cancel an agent optimization job.
Requests cancellation of a running or queued job and returns an error if the job is already in a terminal state.
cancel_optimization_job(job_id: str, **kwargs: Any) -> OptimizationJob
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the job to cancel. Required. |
Returns
| Type | Description |
|---|---|
|
OptimizationJob. The OptimizationJob is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
delete_optimization_job
Delete an agent optimization job.
Deletes the job and its candidate artifacts, canceling the job first if it is non-terminal.
delete_optimization_job(job_id: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the job to delete. Required. |
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
get_optimization_job
Get an agent optimization job.
Retrieves an optimization job by its identifier.
get_optimization_job(job_id: str, **kwargs: Any) -> OptimizationJob
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the job. Required. |
Returns
| Type | Description |
|---|---|
|
OptimizationJob. The OptimizationJob is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list_optimization_jobs
List agent optimization jobs.
Lists optimization jobs with cursor pagination and optional status or agent name filters.
list_optimization_jobs(*, limit: int | None = None, order: str | PageOrder | None = None, before: str | None = None, status: str | JobStatus | None = None, agent_name: str | None = None, **kwargs: Any) -> ItemPaged[OptimizationJobListItem]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
limit
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None. Default value: None
|
|
order
|
Sort order by the Default value: None
|
|
before
|
A cursor for use in pagination. Default value: None
|
|
status
|
Filter to jobs in this lifecycle state. Known values are: "queued", "in_progress", "succeeded", "failed", and "cancelled". Default value is None. Default value: None
|
|
agent_name
|
Filter to jobs targeting this agent name. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of OptimizationJobListItem |
Exceptions
| Type | Description |
|---|---|