azure.mgmt.consumption.operations module¶
-
class
azure.mgmt.consumption.operations.
AggregatedCostOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’saggregated_cost
attribute.-
get_by_management_group
(management_group_id: str, filter: Optional[str] = None, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.ManagementGroupAggregatedCostResult[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. Required.
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 (:). Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ManagementGroupAggregatedCostResult or the result of cls(response)
- Return type
- Raises
-
get_for_billing_period_by_management_group
(management_group_id: str, billing_period_name: str, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.ManagementGroupAggregatedCostResult[source]¶ Provides the aggregate cost of a management group and all child management groups by specified billing period.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ManagementGroupAggregatedCostResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
BalancesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sbalances
attribute.-
get_by_billing_account
(billing_account_id: str, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.Balance[source]¶ Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later.
-
get_for_billing_period_by_billing_account
(billing_account_id: str, billing_period_name: str, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.Balance[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
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Balance or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
BudgetsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sbudgets
attribute.-
create_or_update
(scope: str, budget_name: str, parameters: _models.Budget, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Budget[source]¶ -
create_or_update
(scope: str, budget_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Budget The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
- 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. Required.
budget_name (str) – Budget Name. Required.
parameters (Budget or IO) – Parameters supplied to the Create Budget operation. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
Budget or the result of cls(response)
- Return type
- Raises
-
delete
(scope: str, budget_name: str, **kwargs: Any) → None[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. Required.
budget_name (str) – Budget Name. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
None or the result of cls(response)
- Return type
- Raises
-
get
(scope: str, budget_name: str, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.Budget[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. Required.
budget_name (str) – Budget Name. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Budget or the result of cls(response)
- Return type
- Raises
-
list
(scope: str, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.Budget][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. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Budget or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
ChargesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’scharges
attribute.-
list
(scope: str, start_date: Optional[str] = None, end_date: Optional[str] = None, filter: Optional[str] = None, apply: Optional[str] = None, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.ChargesListResult[source]¶ Lists the charges based for the defined scope.
- Parameters
scope (str) – The scope associated with charges 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}’. Also, Modern Commerce Account scopes are ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for billingAccount 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. Required.
start_date (str) – Start date. Default value is None.
end_date (str) – End date. Default value is None.
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 (:). Default value is None.
apply (str) – May be used to group charges for billingAccount scope by properties/billingProfileId, properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by properties/invoiceSectionId. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ChargesListResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
CreditsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’scredits
attribute.-
get
(billing_account_id: str, billing_profile_id: str, **kwargs: Any) → Optional[azure.mgmt.consumption.models._models_py3.CreditSummary][source]¶ The credit summary by billingAccountId and billingProfileId.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
CreditSummary or None or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
EventsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sevents
attribute.-
list_by_billing_account
(billing_account_id: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.EventSummary][source]¶ Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date.
- Parameters
billing_account_id (str) – BillingAccount ID. Required.
filter (str) – May be used to filter the events by lotId, lotSource etc. 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 (:). Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either EventSummary or the result of cls(response)
- Return type
- Raises
-
list_by_billing_profile
(billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.EventSummary][source]¶ Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either EventSummary or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
LotsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’slots
attribute.-
list_by_billing_account
(billing_account_id: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.LotSummary][source]¶ Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.
- Parameters
billing_account_id (str) – BillingAccount ID. Required.
filter (str) – May be used to filter the lots by Status, Source etc. 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 (:). Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either LotSummary or the result of cls(response)
- Return type
- Raises
-
list_by_billing_profile
(billing_account_id: str, billing_profile_id: str, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.LotSummary][source]¶ Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft Customer Agreements (MCA) billing accounts.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either LotSummary or the result of cls(response)
- Return type
- Raises
-
list_by_customer
(billing_account_id: str, customer_id: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.LotSummary][source]¶ Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing accounts.
- Parameters
billing_account_id (str) – BillingAccount ID. Required.
customer_id (str) – Customer ID. Required.
filter (str) – May be used to filter the lots by Status, Source etc. The filter supports ‘eq’, ‘lt’, ‘gt’, ‘le’, ‘ge’, and ‘and’. Tag filter is a key value pair string where key and value is separated by a colon (:). Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either LotSummary or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
MarketplacesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’smarketplaces
attribute.-
list
(scope: str, filter: Optional[str] = None, top: Optional[int] = None, skiptoken: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.Marketplace][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, ‘/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}’. Required.
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’. Default value is None.
top (int) – May be used to limit the number of results to the most recent N marketplaces. Default value is None.
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. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Marketplace or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
Operations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’soperations
attribute.-
list
(**kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.Operation][source]¶ Lists all of the available consumption REST API operations.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Operation or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
PriceSheetOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sprice_sheet
attribute.-
get
(expand: Optional[str] = None, skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.PriceSheetResult[source]¶ Gets the price sheet for a subscription. 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. Default value is None.
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. Default value is None.
top (int) – May be used to limit the number of results to the top N results. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
PriceSheetResult or the result of cls(response)
- Return type
- Raises
-
get_by_billing_period
(billing_period_name: str, expand: Optional[str] = None, skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → azure.mgmt.consumption.models._models_py3.PriceSheetResult[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. Required.
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. Default value is None.
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. Default value is None.
top (int) – May be used to limit the number of results to the top N results. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
PriceSheetResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
ReservationRecommendationDetailsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sreservation_recommendation_details
attribute.-
get
(resource_scope: str, scope: Union[str, azure.mgmt.consumption.models._consumption_management_client_enums.Scope], region: str, term: Union[str, azure.mgmt.consumption.models._consumption_management_client_enums.Term], look_back_period: Union[str, azure.mgmt.consumption.models._consumption_management_client_enums.LookBackPeriod], product: str, **kwargs: Any) → Optional[azure.mgmt.consumption.models._models_py3.ReservationRecommendationDetailsModel][source]¶ Details of a reservation recommendation for what-if analysis of reserved instances.
- Parameters
resource_scope (str) – The scope associated with reservation recommendation details operations. This includes ‘/subscriptions/{subscriptionId}/’ for subscription scope, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resource group scope, /providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for BillingAccount scope, and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for billingProfile scope. Required.
scope (str or Scope) – Scope of the reservation. Known values are: “Single” and “Shared”. Required.
region (str) – Used to select the region the recommendation should be generated for. Required.
term (str or Term) – Specify length of reservation recommendation term. Known values are: “P1Y” and “P3Y”. Required.
look_back_period (str or LookBackPeriod) – Filter the time period on which reservation recommendation results are based. Known values are: “Last7Days”, “Last30Days”, and “Last60Days”. Required.
product (str) – Filter the products for which reservation recommendation results are generated. Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks). Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ReservationRecommendationDetailsModel or None or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
ReservationRecommendationsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sreservation_recommendations
attribute.-
list
(resource_scope: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationRecommendation][source]¶ List of recommendations for purchasing reserved instances.
- Parameters
resource_scope (str) – The scope associated with reservation recommendations operations. This includes ‘/subscriptions/{subscriptionId}/’ for subscription scope, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resource group scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for BillingAccount scope, and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for billingProfile scope. Required.
filter (str) – May be used to filter reservationRecommendations by: properties/scope with allowed values [‘Single’, ‘Shared’] and default value ‘Single’; properties/resourceType with allowed values [‘VirtualMachines’, ‘SQLDatabases’, ‘PostgreSQL’, ‘ManagedDisk’, ‘MySQL’, ‘RedHat’, ‘MariaDB’, ‘RedisCache’, ‘CosmosDB’, ‘SqlDataWarehouse’, ‘SUSELinux’, ‘AppService’, ‘BlockBlob’, ‘AzureDataExplorer’, ‘VMwareCloudSimple’] and default value ‘VirtualMachines’; and properties/lookBackPeriod with allowed values [‘Last7Days’, ‘Last30Days’, ‘Last60Days’] and default value ‘Last7Days’. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationRecommendation or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
ReservationTransactionsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sreservation_transactions
attribute.-
list
(billing_account_id: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationTransaction][source]¶ List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was made.
- Parameters
billing_account_id (str) – BillingAccount ID. Required.
filter (str) – Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports ‘le’ and ‘ge’. Note: API returns data for the entire start date’s and end date’s billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will include data for the entire December 2020 month (i.e. will contain records for dates December 30 and 31). Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationTransaction or the result of cls(response)
- Return type
- Raises
-
list_by_billing_profile
(billing_account_id: str, billing_profile_id: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ModernReservationTransaction][source]¶ List of transactions for reserved instances on billing profile scope. The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was made.
- Parameters
billing_account_id (str) – BillingAccount ID. Required.
billing_profile_id (str) – Azure Billing Profile ID. Required.
filter (str) – Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports ‘le’ and ‘ge’. Note: API returns data for the entire start date’s and end date’s billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will include data for entire December 2020 month (i.e. will contain records for dates December 30 and 31). Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ModernReservationTransaction or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
ReservationsDetailsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sreservations_details
attribute.-
list
(resource_scope: str, start_date: Optional[str] = None, end_date: Optional[str] = None, filter: Optional[str] = None, reservation_id: Optional[str] = None, reservation_order_id: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationDetail][source]¶ Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit of 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
- Parameters
resource_scope (str) – The scope associated with reservations details operations. This includes ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for BillingAccount scope (legacy), and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope (modern). Required.
start_date (str) – Start date. Only applicable when querying with billing profile. Default value is None.
end_date (str) – End date. Only applicable when querying with billing profile. Default value is None.
filter (str) – Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’. Not applicable when querying with billing profile. Default value is None.
reservation_id (str) – Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation. Default value is None.
reservation_order_id (str) – Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationDetail or the result of cls(response)
- Return type
- Raises
-
list_by_reservation_order
(reservation_order_id: str, filter: str, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationDetail][source]¶ Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationDetail or the result of cls(response)
- Return type
- Raises
-
list_by_reservation_order_and_reservation
(reservation_order_id: str, reservation_id: str, filter: str, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationDetail][source]¶ Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationDetail or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
ReservationsSummariesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’sreservations_summaries
attribute.-
list
(resource_scope: str, grain: Union[str, azure.mgmt.consumption.models._consumption_management_client_enums.Datagrain], start_date: Optional[str] = None, end_date: Optional[str] = None, filter: Optional[str] = None, reservation_id: Optional[str] = None, reservation_order_id: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationSummary][source]¶ Lists the reservations summaries for the defined scope daily or monthly grain.
- Parameters
resource_scope (str) – The scope associated with reservations summaries operations. This includes ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for BillingAccount scope (legacy), and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope (modern). Required.
grain (str or Datagrain) – Can be daily or monthly. Known values are: “daily” and “monthly”. Required.
start_date (str) – Start date. Only applicable when querying with billing profile. Default value is None.
end_date (str) – End date. Only applicable when querying with billing profile. Default value is None.
filter (str) – Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’. Not applicable when querying with billing profile. Default value is None.
reservation_id (str) – Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation. Default value is None.
reservation_order_id (str) – Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationSummary or the result of cls(response)
- Return type
- Raises
-
list_by_reservation_order
(reservation_order_id: str, grain: Union[str, azure.mgmt.consumption.models._consumption_management_client_enums.Datagrain], filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationSummary][source]¶ Lists the reservations summaries for daily or monthly grain.
- Parameters
reservation_order_id (str) – Order Id of the reservation. Required.
grain (str or Datagrain) – Can be daily or monthly. Known values are: “daily” and “monthly”. Required.
filter (str) – Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationSummary or the result of cls(response)
- Return type
- Raises
-
list_by_reservation_order_and_reservation
(reservation_order_id: str, reservation_id: str, grain: Union[str, azure.mgmt.consumption.models._consumption_management_client_enums.Datagrain], filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.ReservationSummary][source]¶ Lists the reservations summaries for daily or monthly grain.
- Parameters
reservation_order_id (str) – Order Id of the reservation. Required.
reservation_id (str) – Id of the reservation. Required.
grain (str or Datagrain) – Can be daily or monthly. Known values are: “daily” and “monthly”. Required.
filter (str) – Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports ‘le’ and ‘ge’. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ReservationSummary or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
TagsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’stags
attribute.-
get
(scope: str, **kwargs: Any) → Optional[azure.mgmt.consumption.models._models_py3.TagsResult][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.. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
TagsResult or None or the result of cls(response)
- Return type
TagsResult or None
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-
-
class
azure.mgmt.consumption.operations.
UsageDetailsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
ConsumptionManagementClient
’susage_details
attribute.-
list
(scope: str, expand: Optional[str] = None, filter: Optional[str] = None, skiptoken: Optional[str] = None, top: Optional[int] = None, metric: Optional[Union[str, azure.mgmt.consumption.models._consumption_management_client_enums.Metrictype]] = None, **kwargs: Any) → Iterable[azure.mgmt.consumption.models._models_py3.UsageDetail][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, ‘/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}’. Also, Modern Commerce Account scopes are ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for billingAccount 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. Required.
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. Default value is None.
filter (str) – May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType 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 (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type. Default value is None.
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. Default value is None.
top (int) – May be used to limit the number of results to the most recent N usageDetails. Default value is None.
metric (str or Metrictype) – Allows to select different type of cost/usage records. Known values are: “actualcost”, “amortizedcost”, and “usage”. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either UsageDetail or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.consumption.models' from '/mnt/vss/_work/1/s/sdk/consumption/azure-mgmt-consumption/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/consumption/models/__init__.py'>¶
-