azure.mgmt.consumption.operations module

class azure.mgmt.consumption.operations.UsageDetailsOperations(client, config, serializer, deserializer)[source]

Bases: object

UsageDetailsOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

download(scope, metric=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Download usage details data.

Parameters
  • scope (str) – The scope associated with usage details 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/departments/{departmentId}’ for Department scope, ‘/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope and ‘/providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope. For subscription, billing account, department, enrollment account and management group, you can also add billing period to the scope using ‘/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’. For e.g. to specify billing period at department scope use ‘/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’

  • metric (str or Metrictype) – Allows to select different type of cost/usage records. Possible values include: ‘ActualCostMetricType’, ‘AmortizedCostMetricType’, ‘UsageMetricType’

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

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns UsageDetailsDownloadResponse or ClientRawResponse<UsageDetailsDownloadResponse> if raw==True

Return type

AzureOperationPoller[UsageDetailsDownloadResponse] or AzureOperationPoller[ClientRawResponse[UsageDetailsDownloadResponse]]

Raises

ErrorResponseException

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

Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later.

Parameters
  • scope (str) – The scope associated with usage details 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/departments/{departmentId}’ for Department scope, ‘/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope and ‘/providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope. For subscription, billing account, department, enrollment account and management group, you can also add billing period to the scope using ‘/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’. For e.g. to specify billing period at department scope use ‘/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’

  • expand (str) – May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.

  • filter (str) – May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/resourceId, properties/chargeType, properties/reservationId or tags. The filter supports ‘eq’, ‘lt’, ‘gt’, ‘le’, ‘ge’, and ‘and’. It does not currently support ‘ne’, ‘or’, or ‘not’. Tag filter is a key value pair string where key and value is separated by a colon (:).

  • 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 usageDetails.

  • metric (str or Metrictype) – Allows to select different type of cost/usage records. Possible values include: ‘ActualCostMetricType’, ‘AmortizedCostMetricType’, ‘UsageMetricType’

  • 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 UsageDetail

Return type

UsageDetailPaged[UsageDetail]

Raises

ErrorResponseException

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

Bases: object

MarketplacesOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.

Parameters
  • scope (str) – The scope associated with marketplace 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/departments/{departmentId}’ for Department scope, ‘/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope and ‘/providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope. For subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing period to the scope using ‘/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’. For e.g. to specify billing period at department scope use ‘/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’

  • filter (str) – May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports ‘eq’, ‘lt’, ‘gt’, ‘le’, ‘ge’, and ‘and’. It does not currently support ‘ne’, ‘or’, or ‘not’.

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

  • 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.

  • 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 Marketplace

Return type

MarketplacePaged[Marketplace]

Raises

ErrorResponseException

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

Bases: object

BudgetsOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

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

Parameters
  • scope (str) – The scope associated with budget 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}/invoiceSections/{invoiceSectionId}’ for invoiceSection scope.

  • budget_name (str) – Budget Name.

  • parameters (Budget) – Parameters supplied to the Create Budget 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

Budget or ClientRawResponse if raw=true

Return type

Budget or ClientRawResponse

Raises

ErrorResponseException

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

The operation to delete a budget.

Parameters
  • scope (str) – The scope associated with budget 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}/invoiceSections/{invoiceSectionId}’ for invoiceSection scope.

  • budget_name (str) – Budget 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, budget_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the budget for the scope by budget name.

Parameters
  • scope (str) – The scope associated with budget 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}/invoiceSections/{invoiceSectionId}’ for invoiceSection scope.

  • budget_name (str) – Budget 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

Budget or ClientRawResponse if raw=true

Return type

Budget or ClientRawResponse

Raises

ErrorResponseException

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

Lists all budgets for the defined scope.

Parameters
  • scope (str) – The scope associated with budget 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}/invoiceSections/{invoiceSectionId}’ for invoiceSection scope.

  • 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 Budget

Return type

BudgetPaged[Budget]

Raises

ErrorResponseException

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

Bases: object

TagsOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

Get all available tag keys for the defined scope.

Parameters
  • scope (str) – The scope associated with tags 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 and ‘/providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope..

  • 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

TagsResult or ClientRawResponse if raw=true

Return type

TagsResult or ClientRawResponse

Raises

ErrorResponseException

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

Bases: object

ChargesOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

Lists the charges based for the defined scope.

Parameters
  • scope (str) – The scope associated with usage details operations. This includes ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope using ‘/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’. For e.g. to specify billing period at department scope use ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’

  • filter (str) – May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time). The filter supports ‘eq’, ‘lt’, ‘gt’, ‘le’, ‘ge’, and ‘and’. It does not currently support ‘ne’, ‘or’, or ‘not’. Tag filter is a key value pair string where key and value is separated by a colon (:).

  • 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

ChargeSummary or ClientRawResponse if raw=true

Return type

ChargeSummary or ClientRawResponse

Raises

ErrorResponseException

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

Bases: object

BalancesOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later.

Parameters
  • billing_account_id (str) – BillingAccount ID

  • 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

Balance or ClientRawResponse if raw=true

Return type

Balance or ClientRawResponse

Raises

ErrorResponseException

get_for_billing_period_by_billing_account(billing_account_id, billing_period_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later.

Parameters
  • billing_account_id (str) – BillingAccount ID

  • billing_period_name (str) – Billing Period 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

Balance or ClientRawResponse if raw=true

Return type

Balance or ClientRawResponse

Raises

ErrorResponseException

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

Bases: object

ReservationsSummariesOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

list_by_reservation_order(reservation_order_id, grain, filter=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the reservations summaries for daily or monthly grain.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • grain (str or Datagrain) – Can be daily or monthly. Possible values include: ‘DailyGrain’, ‘MonthlyGrain’

  • filter (str) – Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’

  • 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 ReservationSummary

Return type

ReservationSummaryPaged[ReservationSummary]

Raises

ErrorResponseException

list_by_reservation_order_and_reservation(reservation_order_id, reservation_id, grain, filter=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the reservations summaries for daily or monthly grain.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • reservation_id (str) – Id of the reservation

  • grain (str or Datagrain) – Can be daily or monthly. Possible values include: ‘DailyGrain’, ‘MonthlyGrain’

  • filter (str) – Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’

  • 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 ReservationSummary

Return type

ReservationSummaryPaged[ReservationSummary]

Raises

ErrorResponseException

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

Bases: object

ReservationsDetailsOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

list_by_reservation_order(reservation_order_id, filter, custom_headers=None, raw=False, **operation_config)[source]

Lists the reservations details for provided date range.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • filter (str) – Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’

  • 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 ReservationDetail

Return type

ReservationDetailPaged[ReservationDetail]

Raises

ErrorResponseException

list_by_reservation_order_and_reservation(reservation_order_id, reservation_id, filter, custom_headers=None, raw=False, **operation_config)[source]

Lists the reservations details for provided date range.

Parameters
  • reservation_order_id (str) – Order Id of the reservation

  • reservation_id (str) – Id of the reservation

  • filter (str) – Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’

  • 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 ReservationDetail

Return type

ReservationDetailPaged[ReservationDetail]

Raises

ErrorResponseException

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

Bases: object

ReservationRecommendationsOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

List of recommendations for purchasing reserved instances.

Parameters
  • filter (str) – May be used to filter reservationRecommendations by properties/scope and properties/lookBackPeriod.

  • 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 ReservationRecommendation

Return type

ReservationRecommendationPaged[ReservationRecommendation]

Raises

ErrorResponseException

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

Bases: object

PriceSheetOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later.

Parameters
  • expand (str) – May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet.

  • 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 top N results.

  • 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

PriceSheetResult or ClientRawResponse if raw=true

Return type

PriceSheetResult or ClientRawResponse

Raises

ErrorResponseException

get_by_billing_period(billing_period_name, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config)[source]

Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later.

Parameters
  • billing_period_name (str) – Billing Period Name.

  • expand (str) – May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet.

  • 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 top N results.

  • 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

PriceSheetResult or ClientRawResponse if raw=true

Return type

PriceSheetResult or ClientRawResponse

Raises

ErrorResponseException

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

Bases: object

ForecastsOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

Lists the forecast charges by subscriptionId.

Parameters
  • filter (str) – May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports ‘eq’, ‘lt’, ‘gt’, ‘le’, ‘ge’, and ‘and’. It does not currently support ‘ne’, ‘or’, or ‘not’.

  • 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 Forecast

Return type

ForecastPaged[Forecast]

Raises

ErrorResponseException

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

Bases: object

Operations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

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

Lists all of the available consumption 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.consumption.models' from '/home/vsts/work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/consumption/models/__init__.py'>
class azure.mgmt.consumption.operations.AggregatedCostOperations(client, config, serializer, deserializer)[source]

Bases: object

AggregatedCostOperations operations.

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-04-01-preview. Constant value: “2019-04-01-preview”.

get_by_management_group(management_group_id, filter=None, custom_headers=None, raw=False, **operation_config)[source]

Provides the aggregate cost of a management group and all child management groups by current billing period.

Parameters
  • management_group_id (str) – Azure Management Group ID.

  • filter (str) – May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc time). The filter supports ‘eq’, ‘lt’, ‘gt’, ‘le’, ‘ge’, and ‘and’. It does not currently support ‘ne’, ‘or’, or ‘not’. Tag filter is a key value pair string where key and value is separated by a colon (:).

  • 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

ManagementGroupAggregatedCostResult or ClientRawResponse if raw=true

Return type

ManagementGroupAggregatedCostResult or ClientRawResponse

Raises

ErrorResponseException

get_for_billing_period_by_management_group(management_group_id, billing_period_name, custom_headers=None, raw=False, **operation_config)[source]

Provides the aggregate cost of a management group and all child management groups by specified billing period.

Parameters
  • management_group_id (str) – Azure Management Group ID.

  • billing_period_name (str) – Billing Period 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

ManagementGroupAggregatedCostResult or ClientRawResponse if raw=true

Return type

ManagementGroupAggregatedCostResult or ClientRawResponse

Raises

ErrorResponseException

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