AlertsOperations Class

AlertsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
AlertsOperations

Constructor

AlertsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

dismiss

Dismisses the specified alert.

get

Gets the alert for the scope by alert ID.

list

Lists the alerts for scope defined.

list_external

Lists the Alerts for external cloud provider type defined.

dismiss

Dismisses the specified alert.

async dismiss(scope: str, alert_id: str, parameters: azure.mgmt.costmanagement.models._models_py3.DismissAlertPayload, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.Alert

Parameters

scope
str
Required

The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

alert_id
str
Required

Alert ID.

parameters
DismissAlertPayload
Required

Parameters supplied to the Dismiss Alert operation.

cls
callable

A custom type or function that will be passed the direct response

Returns

Alert, or the result of cls(response)

Return type

Exceptions

get

Gets the alert for the scope by alert ID.

async get(scope: str, alert_id: str, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.Alert

Parameters

scope
str
Required

The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

alert_id
str
Required

Alert ID.

cls
callable

A custom type or function that will be passed the direct response

Returns

Alert, or the result of cls(response)

Return type

Exceptions

list

Lists the alerts for scope defined.

async list(scope: str, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.AlertsResult

Parameters

scope
str
Required

The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

cls
callable

A custom type or function that will be passed the direct response

Returns

AlertsResult, or the result of cls(response)

Return type

Exceptions

list_external

Lists the Alerts for external cloud provider type defined.

async list_external(external_cloud_provider_type: Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.ExternalCloudProviderType], external_cloud_provider_id: str, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.AlertsResult

Parameters

external_cloud_provider_type
str or ExternalCloudProviderType
Required

The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.

external_cloud_provider_id
str
Required

This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.

cls
callable

A custom type or function that will be passed the direct response

Returns

AlertsResult, or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.costmanagement.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\costmanagement\\models\\__init__.py'>