azure.mgmt.costmanagement.operations module¶
-
class
azure.mgmt.costmanagement.operations.
AlertsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’salerts
attribute.-
dismiss
(scope: str, alert_id: str, parameters: _models.DismissAlertPayload, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Alert[source]¶ -
dismiss
(scope: str, alert_id: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Alert Dismisses the specified alert.
- Parameters
scope (str) – The scope associated with alerts operations. This includes ‘/subscriptions/{subscriptionId}/’ for subscription scope, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for billingProfile scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}’ for invoiceSection scope, and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}’ specific for partners. Required.
alert_id (str) – Alert ID. Required.
parameters (DismissAlertPayload or IO) – Parameters supplied to the Dismiss Alert operation. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
Alert or the result of cls(response)
- Return type
- Raises
-
get
(scope: str, alert_id: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.Alert[source]¶ Gets the alert for the scope by alert ID.
- Parameters
scope (str) – The scope associated with alerts operations. This includes ‘/subscriptions/{subscriptionId}/’ for subscription scope, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for billingProfile scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}’ for invoiceSection scope, and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}’ specific for partners. Required.
alert_id (str) – Alert ID. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Alert or the result of cls(response)
- Return type
- Raises
-
list
(scope: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.AlertsResult[source]¶ Lists the alerts for scope defined.
- Parameters
scope (str) – The scope associated with alerts operations. This includes ‘/subscriptions/{subscriptionId}/’ for subscription scope, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for billingProfile scope, ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}’ for invoiceSection scope, and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}’ specific for partners. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
AlertsResult or the result of cls(response)
- Return type
- Raises
-
list_external
(external_cloud_provider_type: Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.ExternalCloudProviderType], external_cloud_provider_id: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.AlertsResult[source]¶ Lists the Alerts for external cloud provider type defined.
- Parameters
external_cloud_provider_type (str or ExternalCloudProviderType) – The external cloud provider type associated with dimension/query operations. This includes ‘externalSubscriptions’ for linked account and ‘externalBillingAccounts’ for consolidated account. Known values are: “externalSubscriptions” and “externalBillingAccounts”. Required.
external_cloud_provider_id (str) – This can be ‘{externalSubscriptionId}’ for linked account or ‘{externalBillingAccountId}’ for consolidated account used with dimension/query operations. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
AlertsResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
BenefitRecommendationsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sbenefit_recommendations
attribute.-
list
(billing_scope: str, filter: Optional[str] = None, orderby: Optional[str] = None, expand: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.BenefitRecommendationModel][source]¶ List of recommendations for purchasing savings plan.
- Parameters
billing_scope (str) – The scope associated with benefit recommendation operations. This includes ‘/subscriptions/{subscriptionId}/’ for subscription scope, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resource group scope, /providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for enterprise agreement scope, and ‘/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for billing profile scope. Required.
filter (str) – Can be used to filter benefitRecommendations by: properties/scope with allowed values [‘Single’, ‘Shared’] and default value ‘Shared’; and properties/lookBackPeriod with allowed values [‘Last7Days’, ‘Last30Days’, ‘Last60Days’] and default value ‘Last60Days’; properties/term with allowed values [‘P1Y’, ‘P3Y’] and default value ‘P3Y’; properties/subscriptionId; properties/resourceGroup. Default value is None.
orderby (str) – May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. There is no need to use this clause. Default value is None.
expand (str) – May be used to expand the properties by: properties/usage, properties/allRecommendationDetails. 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 BenefitRecommendationModel or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
BenefitUtilizationSummariesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sbenefit_utilization_summaries
attribute.-
list_by_billing_account_id
(billing_account_id: str, grain_parameter: Optional[Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.GrainParameter]] = None, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummary][source]¶ Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: ‘Daily’ and ‘Monthly’.
- Parameters
billing_account_id (str) – Billing account ID. Required.
grain_parameter (str or GrainParameter) – Grain. Known values are: “Hourly”, “Daily”, and “Monthly”. Default value is None.
filter (str) – Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. 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 BenefitUtilizationSummary or the result of cls(response)
- Return type
- Raises
-
list_by_billing_profile_id
(billing_account_id: str, billing_profile_id: str, grain_parameter: Optional[Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.GrainParameter]] = None, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummary][source]¶ Lists savings plan utilization summaries for billing profile. Supported at grain values: ‘Daily’ and ‘Monthly’.
- Parameters
billing_account_id (str) – Billing account ID. Required.
billing_profile_id (str) – Billing profile ID. Required.
grain_parameter (str or GrainParameter) – Grain. Known values are: “Hourly”, “Daily”, and “Monthly”. Default value is None.
filter (str) – Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. 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 BenefitUtilizationSummary or the result of cls(response)
- Return type
- Raises
-
list_by_savings_plan_id
(savings_plan_order_id: str, savings_plan_id: str, filter: Optional[str] = None, grain_parameter: Optional[Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.GrainParameter]] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummary][source]¶ Lists the savings plan utilization summaries for daily or monthly grain.
- Parameters
savings_plan_order_id (str) – Savings plan order ID. Required.
savings_plan_id (str) – Savings plan ID. Required.
filter (str) – Supports filtering by properties/usageDate. Default value is None.
grain_parameter (str or GrainParameter) – Grain. Known values are: “Hourly”, “Daily”, and “Monthly”. 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 BenefitUtilizationSummary or the result of cls(response)
- Return type
- Raises
-
list_by_savings_plan_order
(savings_plan_order_id: str, filter: Optional[str] = None, grain_parameter: Optional[Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.GrainParameter]] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummary][source]¶ Lists the savings plan utilization summaries for daily or monthly grain.
- Parameters
savings_plan_order_id (str) – Savings plan order ID. Required.
filter (str) – Supports filtering by properties/usageDate. Default value is None.
grain_parameter (str or GrainParameter) – Grain. Known values are: “Hourly”, “Daily”, and “Monthly”. 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 BenefitUtilizationSummary or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
DimensionsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sdimensions
attribute.-
by_external_cloud_provider_type
(external_cloud_provider_type: Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.ExternalCloudProviderType], external_cloud_provider_id: str, filter: Optional[str] = None, expand: Optional[str] = None, skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.Dimension][source]¶ Lists the dimensions by the external cloud provider type.
- Parameters
external_cloud_provider_type (str or ExternalCloudProviderType) – The external cloud provider type associated with dimension/query operations. This includes ‘externalSubscriptions’ for linked account and ‘externalBillingAccounts’ for consolidated account. Known values are: “externalSubscriptions” and “externalBillingAccounts”. Required.
external_cloud_provider_id (str) – This can be ‘{externalSubscriptionId}’ for linked account or ‘{externalBillingAccountId}’ for consolidated account used with dimension/query operations. Required.
filter (str) – May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are ‘eq’,’lt’, ‘gt’, ‘le’, ‘ge’. Default value is None.
expand (str) – May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. 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 dimension data. 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 Dimension or the result of cls(response)
- Return type
- Raises
-
list
(scope: str, filter: Optional[str] = None, expand: Optional[str] = None, skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.Dimension][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. Required.
filter (str) – May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are ‘eq’,’lt’, ‘gt’, ‘le’, ‘ge’. Default value is None.
expand (str) – May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions. 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 dimension data. 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 Dimension or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
ExportsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sexports
attribute.-
create_or_update
(scope: str, export_name: str, parameters: _models.Export, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Export[source]¶ -
create_or_update
(scope: str, export_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Export 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 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. Required.
export_name (str) – Export Name. Required.
parameters (Export or IO) – Parameters supplied to the CreateOrUpdate Export operation. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
Export or the result of cls(response)
- Return type
- Raises
-
delete
(scope: str, export_name: str, **kwargs: Any) → None[source]¶ The operation to delete a export.
- Parameters
scope (str) – The scope associated with 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. Required.
export_name (str) – Export 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
-
execute
(scope: str, export_name: str, **kwargs: Any) → None[source]¶ The operation to run an export.
- Parameters
scope (str) – The scope associated with 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. Required.
export_name (str) – Export 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, export_name: str, expand: Optional[str] = None, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.Export[source]¶ The operation to get the export for the defined scope by export name.
- Parameters
scope (str) – The scope associated with 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. Required.
export_name (str) – Export Name. Required.
expand (str) – May be used to expand the properties within an export. Currently only ‘runHistory’ is supported and will return information for the last 10 runs of the export. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Export or the result of cls(response)
- Return type
- Raises
-
get_execution_history
(scope: str, export_name: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.ExportExecutionListResult[source]¶ The operation to get the run history of an export for the defined scope and export name.
- Parameters
scope (str) – The scope associated with 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. Required.
export_name (str) – Export Name. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ExportExecutionListResult or the result of cls(response)
- Return type
- Raises
-
list
(scope: str, expand: Optional[str] = None, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.ExportListResult[source]¶ The operation to list all exports at the given scope.
- Parameters
scope (str) – The scope associated with 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. Required.
expand (str) – May be used to expand the properties within an export. Currently only ‘runHistory’ is supported and will return information for the last run of each export. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ExportListResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
ForecastOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sforecast
attribute.-
external_cloud_provider_usage
(external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, parameters: _models.ForecastDefinition, filter: Optional[str] = None, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ForecastResult[source]¶ -
external_cloud_provider_usage
(external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, parameters: IO, filter: Optional[str] = None, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ForecastResult Lists the forecast charges for external cloud provider type defined.
- Parameters
external_cloud_provider_type (str or ExternalCloudProviderType) – The external cloud provider type associated with dimension/query operations. This includes ‘externalSubscriptions’ for linked account and ‘externalBillingAccounts’ for consolidated account. Known values are: “externalSubscriptions” and “externalBillingAccounts”. Required.
external_cloud_provider_id (str) – This can be ‘{externalSubscriptionId}’ for linked account or ‘{externalBillingAccountId}’ for consolidated account used with dimension/query operations. Required.
parameters (ForecastDefinition or IO) – Parameters supplied to the CreateOrUpdate Forecast Config operation. Is either a model type or a IO type. Required.
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’. Default value is None.
- Keyword Arguments
- Returns
ForecastResult or the result of cls(response)
- Return type
- Raises
-
usage
(scope: str, parameters: _models.ForecastDefinition, filter: Optional[str] = None, *, content_type: str = "'application/json'", **kwargs: Any) → Optional[_models.ForecastResult][source]¶ -
usage
(scope: str, parameters: IO, filter: Optional[str] = None, *, content_type: str = "'application/json'", **kwargs: Any) → Optional[_models.ForecastResult] Lists the forecast charges for scope defined.
- Parameters
scope (str) – The scope associated with forecast 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. Required.
parameters (ForecastDefinition or IO) – Parameters supplied to the CreateOrUpdate Forecast Config operation. Is either a model type or a IO type. Required.
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’. Default value is None.
- Keyword Arguments
- Returns
ForecastResult or None or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
GenerateCostDetailsReportOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sgenerate_cost_details_report
attribute.-
begin_create_operation
(scope: str, parameters: _models.GenerateCostDetailsReportRequestDefinition, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.CostDetailsOperationResults][source]¶ -
begin_create_operation
(scope: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.CostDetailsOperationResults] This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. The initial call to request a report will return a 202 with a ‘Location’ and ‘Retry-After’ header. The ‘Location’ header will provide the endpoint to poll to get the result of the report generation. The ‘Retry-After’ provides the duration to wait before polling for the generated report. A call to poll the report operation will provide a 202 response with a ‘Location’ header if the operation is still in progress. Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body.
- Parameters
scope (str) – The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required.
parameters (GenerateCostDetailsReportRequestDefinition or IO) – Parameters supplied to the Create cost details operation. Is either a model type or a IO type. Required.
- Keyword Arguments
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either CostDetailsOperationResults or the result of cls(response)
- Return type
- Raises
-
begin_get_operation_results
(scope: str, operation_id: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[azure.mgmt.costmanagement.models._models_py3.CostDetailsOperationResults][source]¶ Get the result of the specified operation. This link is provided in the CostDetails creation request response Location header.
- Parameters
scope (str) – The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required.
operation_id (str) – The target operation Id. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either CostDetailsOperationResults or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
GenerateDetailedCostReportOperationResultsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sgenerate_detailed_cost_report_operation_results
attribute.-
begin_get
(operation_id: str, scope: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[azure.mgmt.costmanagement.models._models_py3.GenerateDetailedCostReportOperationResult][source]¶ Gets the result of the specified operation. The link with this operationId is provided as a response header of the initial request.
- Parameters
operation_id (str) – The target operation Id. Required.
scope (str) – The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
GenerateDetailedCostReportOperationStatusOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sgenerate_detailed_cost_report_operation_status
attribute.-
get
(operation_id: str, scope: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.GenerateDetailedCostReportOperationStatuses[source]¶ Get the status of the specified operation. This link is provided in the GenerateDetailedCostReport creation request response header.
- Parameters
operation_id (str) – The target operation Id. Required.
scope (str) – The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
GenerateDetailedCostReportOperationStatuses or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
GenerateDetailedCostReportOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sgenerate_detailed_cost_report
attribute.-
begin_create_operation
(scope: str, parameters: _models.GenerateDetailedCostReportDefinition, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.GenerateDetailedCostReportOperationResult][source]¶ -
begin_create_operation
(scope: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.GenerateDetailedCostReportOperationResult] Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored.
- Parameters
scope (str) – The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required.
parameters (GenerateDetailedCostReportDefinition or IO) – Parameters supplied to the Create detailed cost report operation. Is either a model type or a IO type. Required.
- Keyword Arguments
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
GenerateReservationDetailsReportOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sgenerate_reservation_details_report
attribute.-
begin_by_billing_account_id
(billing_account_id: str, start_date: str, end_date: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[azure.mgmt.costmanagement.models._models_py3.OperationStatus][source]¶ Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either OperationStatus or the result of cls(response)
- Return type
- Raises
-
begin_by_billing_profile_id
(billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[azure.mgmt.costmanagement.models._models_py3.OperationStatus][source]¶ Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either OperationStatus or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
Operations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’soperations
attribute.-
list
(**kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.CostManagementOperation][source]¶ Lists all of the available cost management 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 CostManagementOperation or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
PriceSheetOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sprice_sheet
attribute.-
begin_download
(billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[azure.mgmt.costmanagement.models._models_py3.DownloadURL][source]¶ Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either DownloadURL or the result of cls(response)
- Return type
- Raises
-
begin_download_by_billing_profile
(billing_account_name: str, billing_profile_name: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[azure.mgmt.costmanagement.models._models_py3.DownloadURL][source]¶ Gets a URL to download the current month’s pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either DownloadURL or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
QueryOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’squery
attribute.-
usage
(scope: str, parameters: _models.QueryDefinition, *, content_type: str = "'application/json'", **kwargs: Any) → Optional[_models.QueryResult][source]¶ -
usage
(scope: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → Optional[_models.QueryResult] 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. Required.
parameters (QueryDefinition or IO) – Parameters supplied to the CreateOrUpdate Query Config operation. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
QueryResult or None or the result of cls(response)
- Return type
QueryResult or None
- Raises
-
usage_by_external_cloud_provider_type
(external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, parameters: _models.QueryDefinition, *, content_type: str = "'application/json'", **kwargs: Any) → _models.QueryResult[source]¶ -
usage_by_external_cloud_provider_type
(external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.QueryResult Query the usage data for external cloud provider type defined.
- Parameters
external_cloud_provider_type (str or ExternalCloudProviderType) – The external cloud provider type associated with dimension/query operations. This includes ‘externalSubscriptions’ for linked account and ‘externalBillingAccounts’ for consolidated account. Known values are: “externalSubscriptions” and “externalBillingAccounts”. Required.
external_cloud_provider_id (str) – This can be ‘{externalSubscriptionId}’ for linked account or ‘{externalBillingAccountId}’ for consolidated account used with dimension/query operations. Required.
parameters (QueryDefinition or IO) – Parameters supplied to the CreateOrUpdate Query Config operation. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
QueryResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
ScheduledActionsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sscheduled_actions
attribute.-
check_name_availability
(check_name_availability_request: _models.CheckNameAvailabilityRequest, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckNameAvailabilityResponse[source]¶ -
check_name_availability
(check_name_availability_request: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckNameAvailabilityResponse Checks availability and correctness of the name for a scheduled action.
- Parameters
check_name_availability_request (CheckNameAvailabilityRequest or IO) – Scheduled action to be created or updated. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
CheckNameAvailabilityResponse or the result of cls(response)
- Return type
- Raises
-
check_name_availability_by_scope
(scope: str, check_name_availability_request: _models.CheckNameAvailabilityRequest, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckNameAvailabilityResponse[source]¶ -
check_name_availability_by_scope
(scope: str, check_name_availability_request: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckNameAvailabilityResponse Checks availability and correctness of the name for a scheduled action within the given scope.
- Parameters
scope (str) – The scope associated with scheduled action operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Note: Insight Alerts are only available on subscription scope. Required.
check_name_availability_request (CheckNameAvailabilityRequest or IO) – Scheduled action to be created or updated. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
CheckNameAvailabilityResponse or the result of cls(response)
- Return type
- Raises
-
create_or_update
(name: str, scheduled_action: _models.ScheduledAction, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ScheduledAction[source]¶ -
create_or_update
(name: str, scheduled_action: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ScheduledAction Create or update a private scheduled action.
- Parameters
name (str) – Scheduled action name. Required.
scheduled_action (ScheduledAction or IO) – Scheduled action to be created or updated. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
ScheduledAction or the result of cls(response)
- Return type
- Raises
-
create_or_update_by_scope
(scope: str, name: str, scheduled_action: _models.ScheduledAction, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ScheduledAction[source]¶ -
create_or_update_by_scope
(scope: str, name: str, scheduled_action: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ScheduledAction Create or update a shared scheduled action within the given scope.
- Parameters
scope (str) – The scope associated with scheduled action operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Note: Insight Alerts are only available on subscription scope. Required.
name (str) – Scheduled action name. Required.
scheduled_action (ScheduledAction or IO) – Scheduled action to be created or updated. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
ScheduledAction or the result of cls(response)
- Return type
- Raises
-
delete
(name: str, **kwargs: Any) → None[source]¶ Delete a private scheduled action.
-
delete_by_scope
(scope: str, name: str, **kwargs: Any) → None[source]¶ Delete a scheduled action within the given scope.
- Parameters
scope (str) – The scope associated with scheduled action operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Note: Insight Alerts are only available on subscription scope. Required.
name (str) – Scheduled action 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
(name: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.ScheduledAction[source]¶ Get the private scheduled action by name.
-
get_by_scope
(scope: str, name: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.ScheduledAction[source]¶ Get the shared scheduled action from the given scope by name.
- Parameters
scope (str) – The scope associated with scheduled action operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Note: Insight Alerts are only available on subscription scope. Required.
name (str) – Scheduled action name. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ScheduledAction or the result of cls(response)
- Return type
- Raises
-
list
(filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.ScheduledAction][source]¶ List all private scheduled actions.
- Parameters
filter (str) – May be used to filter scheduled actions by properties/viewId. Supported operator is ‘eq’. 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 ScheduledAction or the result of cls(response)
- Return type
- Raises
-
list_by_scope
(scope: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.ScheduledAction][source]¶ List all shared scheduled actions within the given scope.
- Parameters
scope (str) – The scope associated with scheduled action operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Note: Insight Alerts are only available on subscription scope. Required.
filter (str) – May be used to filter scheduled actions by properties/viewId. Supported operator is ‘eq’. 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 ScheduledAction or the result of cls(response)
- Return type
- Raises
-
run
(name: str, **kwargs: Any) → None[source]¶ Processes a private scheduled action.
-
run_by_scope
(scope: str, name: str, **kwargs: Any) → None[source]¶ Runs a shared scheduled action within the given scope.
- Parameters
scope (str) – The scope associated with scheduled action operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Note: Insight Alerts are only available on subscription scope. Required.
name (str) – Scheduled action 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
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-
-
class
azure.mgmt.costmanagement.operations.
ViewsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CostManagementClient
’sviews
attribute.-
create_or_update
(view_name: str, parameters: _models.View, *, content_type: str = "'application/json'", **kwargs: Any) → _models.View[source]¶ -
create_or_update
(view_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.View The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
- Parameters
- Keyword Arguments
- Returns
View or the result of cls(response)
- Return type
- Raises
-
create_or_update_by_scope
(scope: str, view_name: str, parameters: _models.View, *, content_type: str = "'application/json'", **kwargs: Any) → _models.View[source]¶ -
create_or_update_by_scope
(scope: str, view_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.View The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
- Parameters
scope (str) – The scope associated with view operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Required.
view_name (str) – View name. Required.
parameters (View or IO) – Parameters supplied to the CreateOrUpdate View operation. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
View or the result of cls(response)
- Return type
- Raises
-
delete
(view_name: str, **kwargs: Any) → None[source]¶ The operation to delete a view.
-
delete_by_scope
(scope: str, view_name: str, **kwargs: Any) → None[source]¶ The operation to delete a view.
- Parameters
scope (str) – The scope associated with view operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Required.
view_name (str) – View 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
(view_name: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.View[source]¶ Gets the view by view name.
-
get_by_scope
(scope: str, view_name: str, **kwargs: Any) → azure.mgmt.costmanagement.models._models_py3.View[source]¶ Gets the view for the defined scope by view name.
- Parameters
scope (str) – The scope associated with view operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Required.
view_name (str) – View name. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
View or the result of cls(response)
- Return type
- Raises
-
list
(**kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.View][source]¶ Lists all views by tenant and object.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either View or the result of cls(response)
- Return type
- Raises
-
list_by_scope
(scope: str, **kwargs: Any) → Iterable[azure.mgmt.costmanagement.models._models_py3.View][source]¶ Lists all views at the given scope.
- Parameters
scope (str) – The scope associated with view operations. This includes ‘subscriptions/{subscriptionId}’ for subscription scope, ‘subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for resourceGroup scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}’ for Billing Account scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}’ for Department scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}’ for EnrollmentAccount scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}’ for BillingProfile scope, ‘providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}’ for InvoiceSection scope, ‘providers/Microsoft.Management/managementGroups/{managementGroupId}’ for Management Group scope, ‘providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}’ for External Billing Account scope and ‘providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for External Subscription scope. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either View or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.costmanagement.models' from '/mnt/vss/_work/1/s/sdk/costmanagement/azure-mgmt-costmanagement/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/costmanagement/models/__init__.py'>¶
-