azure.mgmt.costmanagement.operations module

class azure.mgmt.costmanagement.operations.DimensionsOperations(client, config, serializer, deserializer)[source]

Bases: object

DimensionsOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. The current version is 2019-11-01. Constant value: “2019-11-01”.

list(scope, filter=None, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the dimensions by the defined scope.

Parameters
  • scope (str) – The scope associated with dimension 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.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.

  • filter (str) – May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are ‘eq’,’lt’, ‘gt’, ‘le’, ‘ge’.

  • expand (str) – May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.

  • skiptoken (str) – Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.

  • top (int) – May be used to limit the number of results to the most recent N dimension data.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Dimension

Return type

DimensionPaged[Dimension]

Raises

ErrorResponseException

models = <module 'azure.mgmt.costmanagement.models' from '/home/vsts/work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/costmanagement/models/__init__.py'>
class azure.mgmt.costmanagement.operations.QueryOperations(client, config, serializer, deserializer)[source]

Bases: object

QueryOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. The current version is 2019-11-01. Constant value: “2019-11-01”.

usage(scope, parameters, custom_headers=None, raw=False, **operation_config)[source]

Query the usage data for scope defined.

Parameters
  • scope (str) – The scope associated with query and export 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.

  • parameters (QueryDefinition) – Parameters supplied to the CreateOrUpdate Query Config operation.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

QueryResult or ClientRawResponse if raw=true

Return type

QueryResult or ClientRawResponse

Raises

ErrorResponseException

models = <module 'azure.mgmt.costmanagement.models' from '/home/vsts/work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/costmanagement/models/__init__.py'>
class azure.mgmt.costmanagement.operations.ExportsOperations(client, config, serializer, deserializer)[source]

Bases: object

ExportsOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. The current version is 2019-11-01. Constant value: “2019-11-01”.

create_or_update(scope, export_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

The operation to create or update a export. 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.

Parameters
  • scope (str) – The scope associated with query and export 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.

  • export_name (str) – Export Name.

  • parameters (Export) – Parameters supplied to the CreateOrUpdate Export operation.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

Export or ClientRawResponse if raw=true

Return type

Export or ClientRawResponse

Raises

ErrorResponseException

delete(scope, export_name, custom_headers=None, raw=False, **operation_config)[source]

The operation to delete a export.

Parameters
  • scope (str) – The scope associated with query and export 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.

  • export_name (str) – Export Name.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

ErrorResponseException

execute(scope, export_name, custom_headers=None, raw=False, **operation_config)[source]

The operation to execute a export.

Parameters
  • scope (str) – The scope associated with query and export 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.

  • export_name (str) – Export Name.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

ErrorResponseException

get(scope, export_name, custom_headers=None, raw=False, **operation_config)[source]

The operation to get the export for the defined scope by export name.

Parameters
  • scope (str) – The scope associated with query and export 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.

  • export_name (str) – Export Name.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

Export or ClientRawResponse if raw=true

Return type

Export or ClientRawResponse

Raises

ErrorResponseException

get_execution_history(scope, export_name, custom_headers=None, raw=False, **operation_config)[source]

The operation to get the execution history of an export for the defined scope by export name.

Parameters
  • scope (str) – The scope associated with query and export 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.

  • export_name (str) – Export Name.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

ExportExecutionListResult or ClientRawResponse if raw=true

Return type

ExportExecutionListResult or ClientRawResponse

Raises

ErrorResponseException

list(scope, custom_headers=None, raw=False, **operation_config)[source]

The operation to list all exports at the given scope.

Parameters
  • scope (str) – The scope associated with query and export 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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

ExportListResult or ClientRawResponse if raw=true

Return type

ExportListResult or ClientRawResponse

Raises

ErrorResponseException

models = <module 'azure.mgmt.costmanagement.models' from '/home/vsts/work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/costmanagement/models/__init__.py'>
class azure.mgmt.costmanagement.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. The current version is 2019-11-01. Constant value: “2019-11-01”.

list(custom_headers=None, raw=False, **operation_config)[source]

Lists all of the available cost management REST API operations.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Operation

Return type

OperationPaged[Operation]

Raises

ErrorResponseException

models = <module 'azure.mgmt.costmanagement.models' from '/home/vsts/work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/costmanagement/models/__init__.py'>