BetaVoiceAgentsTelephonyOperations Class

Warning

DO NOT instantiate this class directly.

Instead, access these operations through

AIProjectClient's beta.voice_agents.telephony attribute.

Constructor

BetaVoiceAgentsTelephonyOperations(*args, **kwargs)

Methods

begin_cancel

Cancel a validating or running telephony campaign.

Stops new calls and retries; connected calls finish naturally. The final Campaign GET is guarded by the initiating operation ID.

begin_create

Create or replace a failed telephony campaign.

All recipients must validate and have CallJobs before dialing. Immediate calls may begin before preparation finishes. The final Campaign GET is guarded by the initiating operation ID.

begin_delete

Delete a terminal telephony campaign and its recipient/task data.

Completion does not fetch the deleted Campaign. Dataset, connections, Agent, independent jobs, and call history are preserved.

get

Get a telephony campaign.

Gets Campaign configuration and execution state without inline recipients. Absent or deleted Campaigns return 404.

get_operation

Get a campaign operation.

Gets the initiating operation's status. PUT/cancel pollers finish with a guarded Campaign GET; deletion completes without a resource result.

list

List telephony campaigns.

Lists the Agent's Campaigns without inline recipients. Filters are live views, not snapshots.

list_validation_errors

List campaign validation errors.

Lists current-round row validation errors. Results may be partial during preparation; an empty page does not establish success. Execution errors are in CallJobs; non-row failures are in Campaign.error.

begin_cancel

Cancel a validating or running telephony campaign.

Stops new calls and retries; connected calls finish naturally. The final Campaign GET is guarded by the initiating operation ID.

begin_cancel(agent_name: str, campaign_name: str, *, etag: str, match_condition: MatchConditions, operation_id: str | None = None, **kwargs: Any) -> LROPoller[TelephonyCampaign]

Parameters

Name Description
agent_name
Required
str

Owning Agent. Required.

campaign_name
Required
str

Campaign name. Required.

Keyword-Only Parameters

Name Description
etag
str

Exact current Campaign ETag. Required.

match_condition

The match condition to use with the ETag. Required.

operation_id
str

Optional retry key.

Default value: None

Returns

Type Description

A poller returning the Campaign after cancellation.

Exceptions

Type Description

begin_create

Create or replace a failed telephony campaign.

All recipients must validate and have CallJobs before dialing. Immediate calls may begin before preparation finishes. The final Campaign GET is guarded by the initiating operation ID.

begin_create(agent_name: str, campaign_name: str, campaign: _models.TelephonyCampaign, *, operation_id: str | None = None, content_type: str = 'application/json', etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> LROPoller[_models.TelephonyCampaign]

Parameters

Name Description
agent_name
Required
str

Owning Agent. Required.

campaign_name
Required
str

Campaign name. Only failed preparation permits replacement. Required.

campaign
Required

Complete campaign configuration. Required.

Keyword-Only Parameters

Name Description
operation_id
str

Optional retry key. Conflicting reuse returns an error.

Default value: None
etag
str

Resource ETag used with match_condition.

Default value: None
match_condition

The match condition to use with the ETag.

Default value: None

Returns

Type Description

A poller returning the Campaign after preparation.

Exceptions

Type Description

begin_delete

Delete a terminal telephony campaign and its recipient/task data.

Completion does not fetch the deleted Campaign. Dataset, connections, Agent, independent jobs, and call history are preserved.

begin_delete(agent_name: str, campaign_name: str, *, etag: str, match_condition: MatchConditions, operation_id: str | None = None, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
agent_name
Required
str

Owning Agent. Required.

campaign_name
Required
str

Campaign name. Required.

Keyword-Only Parameters

Name Description
etag
str

Exact current Campaign ETag. Required.

match_condition

The match condition to use with the ETag. Required.

operation_id
str

Optional retry key.

Default value: None

Returns

Type Description

A poller returning None after deletion.

Exceptions

Type Description

get

Get a telephony campaign.

Gets Campaign configuration and execution state without inline recipients. Absent or deleted Campaigns return 404.

get(agent_name: str, campaign_name: str, *, operation_id: str | None = None, **kwargs: Any) -> TelephonyCampaign

Parameters

Name Description
agent_name
Required
str

Owning Agent; never overridden in recipient inputs. Required.

campaign_name
Required
str

Immutable Campaign name. Required.

Keyword-Only Parameters

Name Description
operation_id
str

Original response's Operation-Id guards its instance/round and survives same-round actions. Replacement/name reuse: 409 campaign_operation_mismatch; missing/expired/wrong-scope operation: 404. Default value is None.

Default value: None

Returns

Type Description

TelephonyCampaign. The TelephonyCampaign is compatible with MutableMapping

Exceptions

Type Description

get_operation

Get a campaign operation.

Gets the initiating operation's status. PUT/cancel pollers finish with a guarded Campaign GET; deletion completes without a resource result.

get_operation(agent_name: str, campaign_name: str, operation_id: str, **kwargs: Any) -> TelephonyCampaignOperation

Parameters

Name Description
agent_name
Required
str

Owning Agent. Required.

campaign_name
Required
str

Immutable Campaign name. Required.

operation_id
Required
str

Operation-Id from the initiating response. Saved project/Agent authorization still applies after resource deletion. Required.

Returns

Type Description

TelephonyCampaignOperation. The TelephonyCampaignOperation is compatible with MutableMapping

Exceptions

Type Description

list

List telephony campaigns.

Lists the Agent's Campaigns without inline recipients. Filters are live views, not snapshots.

list(agent_name: str, *, limit: int | None = None, order: str | PageOrder | None = None, before: str | None = None, status: str | TelephonyCampaignStatus | None = None, **kwargs: Any) -> ItemPaged[TelephonyCampaign]

Parameters

Name Description
agent_name
Required
str

Owning Agent; never overridden in recipient inputs. Required.

Keyword-Only Parameters

Name Description
limit
int

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 created_at timestamp of the objects. asc for ascending order anddesc for descending order. Known values are: "asc" and "desc". Default value is None.

Default value: None
before
str

Opaque first_id for backward paging with unchanged scope/filters/order; exclusive with after. Default value is None.

Default value: None
status

Filter by Campaign business state. Known values are: "validating", "running", "cancelling", "completed", "failed", "cancelled", and "deleting". Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of TelephonyCampaign

Exceptions

Type Description

list_validation_errors

List campaign validation errors.

Lists current-round row validation errors. Results may be partial during preparation; an empty page does not establish success. Execution errors are in CallJobs; non-row failures are in Campaign.error.

list_validation_errors(agent_name: str, campaign_name: str, *, limit: int | None = None, before: str | None = None, order: str | PageOrder | None = None, **kwargs: Any) -> ItemPaged[TelephonyCampaignValidationError]

Parameters

Name Description
agent_name
Required
str

Owning Agent; never overridden in recipient inputs. Required.

campaign_name
Required
str

Campaign name. Deleting returns 409 campaign_deleting; absent/deleted returns 404. Required.

Keyword-Only Parameters

Name Description
limit
int

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
before
str

Opaque first_id for backward paging with unchanged scope/filters/order; exclusive with after. Default value is None.

Default value: None
order

Sort invalid rows by their original row_number. Known values are: "asc" and "desc". Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of TelephonyCampaignValidationError

Exceptions

Type Description