ViewsOperations Class

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

Constructor

ViewsOperations(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

create_or_update

The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

create_or_update_by_scope

The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

delete

The operation to delete a view.

delete_by_scope

The operation to delete a view.

get

Gets the view by view name.

get_by_scope

Gets the view for the defined scope by view name.

list

Lists all views by tenant and object.

list_by_scope

Lists all views at the given scope.

create_or_update

The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

async create_or_update(view_name: str, parameters: azure.mgmt.costmanagement.models._models_py3.View, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.View

Parameters

view_name
str
Required

View name.

parameters
View
Required

Parameters supplied to the CreateOrUpdate View operation.

cls
callable

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

Returns

View, or the result of cls(response)

Return type

Exceptions

create_or_update_by_scope

The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

async create_or_update_by_scope(scope: str, view_name: str, parameters: azure.mgmt.costmanagement.models._models_py3.View, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.View

Parameters

scope
str
Required

The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.

view_name
str
Required

View name.

parameters
View
Required

Parameters supplied to the CreateOrUpdate View operation.

cls
callable

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

Returns

View, or the result of cls(response)

Return type

Exceptions

delete

The operation to delete a view.

async delete(view_name: str, **kwargs: Any) -> None

Parameters

view_name
str
Required

View name.

cls
callable

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

Returns

None, or the result of cls(response)

Return type

Exceptions

delete_by_scope

The operation to delete a view.

async delete_by_scope(scope: str, view_name: str, **kwargs: Any) -> None

Parameters

scope
str
Required

The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.

view_name
str
Required

View name.

cls
callable

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

Returns

None, or the result of cls(response)

Return type

Exceptions

get

Gets the view by view name.

async get(view_name: str, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.View

Parameters

view_name
str
Required

View name.

cls
callable

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

Returns

View, or the result of cls(response)

Return type

Exceptions

get_by_scope

Gets the view for the defined scope by view name.

async get_by_scope(scope: str, view_name: str, **kwargs: Any) -> azure.mgmt.costmanagement.models._models_py3.View

Parameters

scope
str
Required

The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.

view_name
str
Required

View name.

cls
callable

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

Returns

View, or the result of cls(response)

Return type

Exceptions

list

Lists all views by tenant and object.

list(**kwargs: Any) -> AsyncIterable[azure.mgmt.costmanagement.models._models_py3.ViewListResult]

Parameters

cls
callable

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

Returns

An iterator like instance of either ViewListResult or the result of cls(response)

Return type

AsyncItemPaged[<xref:azure.mgmt.costmanagement.models.ViewListResultor None>]

Exceptions

list_by_scope

Lists all views at the given scope.

list_by_scope(scope: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.costmanagement.models._models_py3.ViewListResult]

Parameters

scope
str
Required

The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.

cls
callable

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

Returns

An iterator like instance of either ViewListResult or the result of cls(response)

Return type

AsyncItemPaged[<xref:azure.mgmt.costmanagement.models.ViewListResultor None>]

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