azure.mgmt.costmanagement.models module

class azure.mgmt.costmanagement.models.AccumulatedType(value)[source]

Bases: str, enum.Enum

Show costs accumulated over time.

FALSE = 'false'
TRUE = 'true'
class azure.mgmt.costmanagement.models.ActionType(value)[source]

Bases: str, enum.Enum

Enum. Indicates the action type. “Internal” refers to actions that are for internal only APIs.

INTERNAL = 'Internal'
class azure.mgmt.costmanagement.models.Alert(*, e_tag: Optional[str] = None, definition: Optional[_models.AlertPropertiesDefinition] = None, description: Optional[str] = None, source: Optional[Union[str, _models.AlertSource]] = None, details: Optional[_models.AlertPropertiesDetails] = None, cost_entity_id: Optional[str] = None, status: Optional[Union[str, _models.AlertStatus]] = None, creation_time: Optional[str] = None, close_time: Optional[str] = None, modification_time: Optional[str] = None, status_modification_user_name: Optional[str] = None, status_modification_time: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CostManagementProxyResource

An individual alert.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • definition (AlertPropertiesDefinition) – defines the type of alert.

  • description (str) – Alert description.

  • source (str or AlertSource) – Source of alert. Known values are: “Preset” and “User”.

  • details (AlertPropertiesDetails) – Alert details.

  • cost_entity_id (str) – related budget.

  • status (str or AlertStatus) – alert status. Known values are: “None”, “Active”, “Overridden”, “Resolved”, and “Dismissed”.

  • creation_time (str) – dateTime in which alert was created.

  • close_time (str) – dateTime in which alert was closed.

  • modification_time (str) – dateTime in which alert was last modified.

  • status_modification_user_name (str) – User who last modified the alert.

  • status_modification_time (str) – dateTime in which the alert status was last modified.

Keyword Arguments
  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • definition (AlertPropertiesDefinition) – defines the type of alert.

  • description (str) – Alert description.

  • source (str or AlertSource) – Source of alert. Known values are: “Preset” and “User”.

  • details (AlertPropertiesDetails) – Alert details.

  • cost_entity_id (str) – related budget.

  • status (str or AlertStatus) – alert status. Known values are: “None”, “Active”, “Overridden”, “Resolved”, and “Dismissed”.

  • creation_time (str) – dateTime in which alert was created.

  • close_time (str) – dateTime in which alert was closed.

  • modification_time (str) – dateTime in which alert was last modified.

  • status_modification_user_name (str) – User who last modified the alert.

  • status_modification_time (str) – dateTime in which the alert status was last modified.

class azure.mgmt.costmanagement.models.AlertCategory(value)[source]

Bases: str, enum.Enum

Alert category.

BILLING = 'Billing'
COST = 'Cost'
SYSTEM = 'System'
USAGE = 'Usage'
class azure.mgmt.costmanagement.models.AlertCriteria(value)[source]

Bases: str, enum.Enum

Criteria that triggered alert.

COST_THRESHOLD_EXCEEDED = 'CostThresholdExceeded'
CREDIT_THRESHOLD_APPROACHING = 'CreditThresholdApproaching'
CREDIT_THRESHOLD_REACHED = 'CreditThresholdReached'
CROSS_CLOUD_COLLECTION_ERROR = 'CrossCloudCollectionError'
CROSS_CLOUD_NEW_DATA_AVAILABLE = 'CrossCloudNewDataAvailable'
FORECAST_COST_THRESHOLD_EXCEEDED = 'ForecastCostThresholdExceeded'
FORECAST_USAGE_THRESHOLD_EXCEEDED = 'ForecastUsageThresholdExceeded'
GENERAL_THRESHOLD_ERROR = 'GeneralThresholdError'
INVOICE_DUE_DATE_APPROACHING = 'InvoiceDueDateApproaching'
INVOICE_DUE_DATE_REACHED = 'InvoiceDueDateReached'
MULTI_CURRENCY = 'MultiCurrency'
QUOTA_THRESHOLD_APPROACHING = 'QuotaThresholdApproaching'
QUOTA_THRESHOLD_REACHED = 'QuotaThresholdReached'
USAGE_THRESHOLD_EXCEEDED = 'UsageThresholdExceeded'
class azure.mgmt.costmanagement.models.AlertOperator(value)[source]

Bases: str, enum.Enum

operator used to compare currentSpend with amount.

EQUAL_TO = 'EqualTo'
GREATER_THAN = 'GreaterThan'
GREATER_THAN_OR_EQUAL_TO = 'GreaterThanOrEqualTo'
LESS_THAN = 'LessThan'
LESS_THAN_OR_EQUAL_TO = 'LessThanOrEqualTo'
NONE = 'None'
class azure.mgmt.costmanagement.models.AlertPropertiesDefinition(*, type: Optional[Union[str, _models.AlertType]] = None, category: Optional[Union[str, _models.AlertCategory]] = None, criteria: Optional[Union[str, _models.AlertCriteria]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

defines the type of alert.

Variables
  • type (str or AlertType) – type of alert. Known values are: “Budget”, “Invoice”, “Credit”, “Quota”, “General”, “xCloud”, and “BudgetForecast”.

  • category (str or AlertCategory) – Alert category. Known values are: “Cost”, “Usage”, “Billing”, and “System”.

  • criteria (str or AlertCriteria) – Criteria that triggered alert. Known values are: “CostThresholdExceeded”, “UsageThresholdExceeded”, “CreditThresholdApproaching”, “CreditThresholdReached”, “QuotaThresholdApproaching”, “QuotaThresholdReached”, “MultiCurrency”, “ForecastCostThresholdExceeded”, “ForecastUsageThresholdExceeded”, “InvoiceDueDateApproaching”, “InvoiceDueDateReached”, “CrossCloudNewDataAvailable”, “CrossCloudCollectionError”, and “GeneralThresholdError”.

Keyword Arguments
  • type (str or AlertType) – type of alert. Known values are: “Budget”, “Invoice”, “Credit”, “Quota”, “General”, “xCloud”, and “BudgetForecast”.

  • category (str or AlertCategory) – Alert category. Known values are: “Cost”, “Usage”, “Billing”, and “System”.

  • criteria (str or AlertCriteria) – Criteria that triggered alert. Known values are: “CostThresholdExceeded”, “UsageThresholdExceeded”, “CreditThresholdApproaching”, “CreditThresholdReached”, “QuotaThresholdApproaching”, “QuotaThresholdReached”, “MultiCurrency”, “ForecastCostThresholdExceeded”, “ForecastUsageThresholdExceeded”, “InvoiceDueDateApproaching”, “InvoiceDueDateReached”, “CrossCloudNewDataAvailable”, “CrossCloudCollectionError”, and “GeneralThresholdError”.

class azure.mgmt.costmanagement.models.AlertPropertiesDetails(*, time_grain_type: Optional[Union[str, _models.AlertTimeGrainType]] = None, period_start_date: Optional[str] = None, triggered_by: Optional[str] = None, resource_group_filter: Optional[List[Any]] = None, resource_filter: Optional[List[Any]] = None, meter_filter: Optional[List[Any]] = None, tag_filter: Optional[collections.abc.MutableMapping[str, Any]] = None, threshold: Optional[float] = None, operator: Optional[Union[str, _models.AlertOperator]] = None, amount: Optional[float] = None, unit: Optional[str] = None, current_spend: Optional[float] = None, contact_emails: Optional[List[str]] = None, contact_groups: Optional[List[str]] = None, contact_roles: Optional[List[str]] = None, overriding_alert: Optional[str] = None, department_name: Optional[str] = None, company_name: Optional[str] = None, enrollment_number: Optional[str] = None, enrollment_start_date: Optional[str] = None, enrollment_end_date: Optional[str] = None, invoicing_threshold: Optional[float] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Alert details.

Variables
  • time_grain_type (str or AlertTimeGrainType) – Type of timegrain cadence. Known values are: “None”, “Monthly”, “Quarterly”, “Annually”, “BillingMonth”, “BillingQuarter”, and “BillingAnnual”.

  • period_start_date (str) – datetime of periodStartDate.

  • triggered_by (str) – notificationId that triggered this alert.

  • resource_group_filter (list[any]) – array of resourceGroups to filter by.

  • resource_filter (list[any]) – array of resources to filter by.

  • meter_filter (list[any]) – array of meters to filter by.

  • tag_filter (JSON) – tags to filter by.

  • threshold (float) – notification threshold percentage as a decimal which activated this alert.

  • operator (str or AlertOperator) – operator used to compare currentSpend with amount. Known values are: “None”, “EqualTo”, “GreaterThan”, “GreaterThanOrEqualTo”, “LessThan”, and “LessThanOrEqualTo”.

  • amount (float) – budget threshold amount.

  • unit (str) – unit of currency being used.

  • current_spend (float) – current spend.

  • contact_emails (list[str]) – list of emails to contact.

  • contact_groups (list[str]) – list of action groups to broadcast to.

  • contact_roles (list[str]) – list of contact roles.

  • overriding_alert (str) – overriding alert.

  • department_name (str) – department name.

  • company_name (str) – company name.

  • enrollment_number (str) – enrollment number.

  • enrollment_start_date (str) – datetime of enrollmentStartDate.

  • enrollment_end_date (str) – datetime of enrollmentEndDate.

  • invoicing_threshold (float) – invoicing threshold.

Keyword Arguments
  • time_grain_type (str or AlertTimeGrainType) – Type of timegrain cadence. Known values are: “None”, “Monthly”, “Quarterly”, “Annually”, “BillingMonth”, “BillingQuarter”, and “BillingAnnual”.

  • period_start_date (str) – datetime of periodStartDate.

  • triggered_by (str) – notificationId that triggered this alert.

  • resource_group_filter (list[any]) – array of resourceGroups to filter by.

  • resource_filter (list[any]) – array of resources to filter by.

  • meter_filter (list[any]) – array of meters to filter by.

  • tag_filter (JSON) – tags to filter by.

  • threshold (float) – notification threshold percentage as a decimal which activated this alert.

  • operator (str or AlertOperator) – operator used to compare currentSpend with amount. Known values are: “None”, “EqualTo”, “GreaterThan”, “GreaterThanOrEqualTo”, “LessThan”, and “LessThanOrEqualTo”.

  • amount (float) – budget threshold amount.

  • unit (str) – unit of currency being used.

  • current_spend (float) – current spend.

  • contact_emails (list[str]) – list of emails to contact.

  • contact_groups (list[str]) – list of action groups to broadcast to.

  • contact_roles (list[str]) – list of contact roles.

  • overriding_alert (str) – overriding alert.

  • department_name (str) – department name.

  • company_name (str) – company name.

  • enrollment_number (str) – enrollment number.

  • enrollment_start_date (str) – datetime of enrollmentStartDate.

  • enrollment_end_date (str) – datetime of enrollmentEndDate.

  • invoicing_threshold (float) – invoicing threshold.

class azure.mgmt.costmanagement.models.AlertSource(value)[source]

Bases: str, enum.Enum

Source of alert.

PRESET = 'Preset'
USER = 'User'
class azure.mgmt.costmanagement.models.AlertStatus(value)[source]

Bases: str, enum.Enum

alert status.

ACTIVE = 'Active'
DISMISSED = 'Dismissed'
NONE = 'None'
OVERRIDDEN = 'Overridden'
RESOLVED = 'Resolved'
class azure.mgmt.costmanagement.models.AlertTimeGrainType(value)[source]

Bases: str, enum.Enum

Type of timegrain cadence.

ANNUALLY = 'Annually'
BILLING_ANNUAL = 'BillingAnnual'
BILLING_MONTH = 'BillingMonth'
BILLING_QUARTER = 'BillingQuarter'
MONTHLY = 'Monthly'
NONE = 'None'
QUARTERLY = 'Quarterly'
class azure.mgmt.costmanagement.models.AlertType(value)[source]

Bases: str, enum.Enum

type of alert.

BUDGET = 'Budget'
BUDGET_FORECAST = 'BudgetForecast'
CREDIT = 'Credit'
GENERAL = 'General'
INVOICE = 'Invoice'
QUOTA = 'Quota'
X_CLOUD = 'xCloud'
class azure.mgmt.costmanagement.models.AlertsResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Result of alerts.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • value (list[Alert]) – List of alerts.

  • next_link (str) – URL to get the next set of alerts results if there are any.

class azure.mgmt.costmanagement.models.AllSavingsBenefitDetails(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Benefit recommendation details.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • overage_cost (float) – The difference between total cost and benefit cost for the ‘totalHours’ in the look-back period.

  • benefit_cost (float) – The estimated cost with benefit for the ‘totalHours’ in the look-back period. It’s equal to (commitmentAmount * totalHours).

  • total_cost (float) – Total cost, which is sum of benefit cost and overage cost.

  • savings_amount (float) – The amount saved for the ‘totalHours’ in the look-back period, by purchasing the recommended quantity of the benefit.

  • savings_percentage (float) – The savings in percentage for the ‘totalHours’ in the look-back period, by purchasing the recommended quantity of benefit.

  • coverage_percentage (float) – Estimated benefit coverage percentage for the ‘totalHours’ in the look-back period, with this commitment.

  • commitment_amount (float) – The commitment amount at the commitmentGranularity.

  • average_utilization_percentage (float) – Estimated average utilization percentage for the ‘totalHours’ in the look-back period, with this commitment.

  • wastage_cost (float) – Estimated unused portion of the ‘benefitCost’.

class azure.mgmt.costmanagement.models.AllSavingsList(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The list of all benefit recommendations with the recommendation details.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • value (list[AllSavingsBenefitDetails]) – The list of benefit recommendations with the recommendation details..

  • next_link (str) – The link (URL) to the next page of results.

class azure.mgmt.costmanagement.models.BenefitKind(value)[source]

Bases: str, enum.Enum

Kind/type of the benefit.

INCLUDED_QUANTITY = 'IncludedQuantity'

Benefit is IncludedQuantity.

RESERVATION = 'Reservation'

Benefit is Reservation.

SAVINGS_PLAN = 'SavingsPlan'

Benefit is SavingsPlan.

class azure.mgmt.costmanagement.models.BenefitRecommendationModel(*, kind: Optional[Union[str, _models.BenefitKind]] = None, properties: Optional[_models.BenefitRecommendationProperties] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.BenefitResource

benefit plan recommendation details.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

  • kind (str or BenefitKind) – Reservation or SavingsPlan. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • properties (BenefitRecommendationProperties) – The properties of the benefit recommendations.

Keyword Arguments
  • kind (str or BenefitKind) – Reservation or SavingsPlan. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • properties (BenefitRecommendationProperties) – The properties of the benefit recommendations.

class azure.mgmt.costmanagement.models.BenefitRecommendationProperties(*, look_back_period: Optional[Union[str, _models.LookBackPeriod]] = None, usage: Optional[_models.RecommendationUsageDetails] = None, term: Optional[Union[str, _models.Term]] = None, commitment_granularity: Optional[Union[str, _models.Grain]] = None, recommendation_details: Optional[_models.AllSavingsBenefitDetails] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The properties of the benefit recommendations.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: SharedScopeBenefitRecommendationProperties, SingleScopeBenefitRecommendationProperties

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • first_consumption_date (datetime) – The first usage date used for looking back for computing the recommendations.

  • last_consumption_date (datetime) – The last usage date used for looking back for computing the recommendations.

  • look_back_period (str or LookBackPeriod) – The number of days of usage evaluated for computing the recommendations. Known values are: “Last7Days”, “Last30Days”, and “Last60Days”.

  • total_hours (int) – The total hours for which the cost is covered. Its equal to number of records in a property ‘properties/usage/charges’.

  • usage (RecommendationUsageDetails) – On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

  • arm_sku_name (str) – ARM SKU name. ‘Compute_Savings_Plan’ for SavingsPlan.

  • term (str or Term) – Term period of the benefit. For example, P1Y or P3Y. Known values are: “P1Y” and “P3Y”.

  • commitment_granularity (str or Grain) – Grain of the proposed commitment amount. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

  • currency_code (str) – An ISO 4217 currency code identifier for the costs and savings amounts.

  • cost_without_benefit (float) – The current cost without benefit, corresponds to ‘totalHours’ in the look-back period.

  • recommendation_details (AllSavingsBenefitDetails) – The details of the proposed recommendation.

  • all_recommendation_details (AllSavingsList) – The list of all benefit recommendations with the recommendation details.

  • scope (str or Scope) – Benefit scope. For example, Single or Shared. Required. Known values are: “Single” and “Shared”.

Keyword Arguments
  • look_back_period (str or LookBackPeriod) – The number of days of usage evaluated for computing the recommendations. Known values are: “Last7Days”, “Last30Days”, and “Last60Days”.

  • usage (RecommendationUsageDetails) – On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

  • term (str or Term) – Term period of the benefit. For example, P1Y or P3Y. Known values are: “P1Y” and “P3Y”.

  • commitment_granularity (str or Grain) – Grain of the proposed commitment amount. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

  • recommendation_details (AllSavingsBenefitDetails) – The details of the proposed recommendation.

class azure.mgmt.costmanagement.models.BenefitRecommendationsListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Result of listing benefit recommendations.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
class azure.mgmt.costmanagement.models.BenefitResource(*, kind: Optional[Union[str, _models.BenefitKind]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.Resource

The benefit resource model definition.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

  • kind (str or BenefitKind) – Reservation or SavingsPlan. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

Keyword Arguments

kind (str or BenefitKind) – Reservation or SavingsPlan. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

class azure.mgmt.costmanagement.models.BenefitUtilizationSummariesListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

List of benefit utilization summaries.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
class azure.mgmt.costmanagement.models.BenefitUtilizationSummary(**kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.Resource

Benefit utilization summary resource.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: IncludedQuantityUtilizationSummary, SavingsPlanUtilizationSummary

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

  • kind (str or BenefitKind) – Supported values: ‘SavingsPlan’. Required. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

class azure.mgmt.costmanagement.models.BenefitUtilizationSummaryProperties(*, benefit_type: Optional[Union[str, _models.BenefitKind]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The properties of a benefit utilization summary.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • arm_sku_name (str) – ARM SKU name. For example, ‘Compute_Savings_Plan’ for savings plan.

  • benefit_id (str) – The benefit ID is the identifier of the benefit.

  • benefit_order_id (str) – The benefit order ID is the identifier for a benefit purchase.

  • benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • usage_date (datetime) – Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.

Keyword Arguments

benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

class azure.mgmt.costmanagement.models.BlobInfo(*, blob_link: Optional[str] = None, byte_count: Optional[int] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The blob information generated by this operation.

Variables
  • blob_link (str) – Link to the blob to download file.

  • byte_count (int) – Bytes in the blob.

Keyword Arguments
  • blob_link (str) – Link to the blob to download file.

  • byte_count (int) – Bytes in the blob.

class azure.mgmt.costmanagement.models.ChartType(value)[source]

Bases: str, enum.Enum

Chart type of the main view in Cost Analysis. Required.

AREA = 'Area'
GROUPED_COLUMN = 'GroupedColumn'
LINE = 'Line'
STACKED_COLUMN = 'StackedColumn'
TABLE = 'Table'
class azure.mgmt.costmanagement.models.CheckNameAvailabilityReason(value)[source]

Bases: str, enum.Enum

The reason why the given name is not available.

ALREADY_EXISTS = 'AlreadyExists'
INVALID = 'Invalid'
class azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest(*, name: Optional[str] = None, type: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The check availability request body.

Variables
  • name (str) – The name of the resource for which availability needs to be checked.

  • type (str) – The resource type.

Keyword Arguments
  • name (str) – The name of the resource for which availability needs to be checked.

  • type (str) – The resource type.

class azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse(*, name_available: Optional[bool] = None, reason: Optional[Union[str, _models.CheckNameAvailabilityReason]] = None, message: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The check availability result.

Variables
  • name_available (bool) – Indicates if the resource name is available.

  • reason (str or CheckNameAvailabilityReason) – The reason why the given name is not available. Known values are: “Invalid” and “AlreadyExists”.

  • message (str) – Detailed reason why the given name is available.

Keyword Arguments
  • name_available (bool) – Indicates if the resource name is available.

  • reason (str or CheckNameAvailabilityReason) – The reason why the given name is not available. Known values are: “Invalid” and “AlreadyExists”.

  • message (str) – Detailed reason why the given name is available.

class azure.mgmt.costmanagement.models.CommonExportProperties(*, delivery_info: _models.ExportDeliveryInfo, definition: _models.ExportDefinition, format: Optional[Union[str, _models.FormatType]] = None, run_history: Optional[_models.ExportExecutionListResult] = None, partition_data: Optional[bool] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The common properties of the export.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • format (str or FormatType) – The format of the export being delivered. Currently only ‘Csv’ is supported. “Csv”

  • delivery_info (ExportDeliveryInfo) – Has delivery information for the export. Required.

  • definition (ExportDefinition) – Has the definition for the export. Required.

  • run_history (ExportExecutionListResult) – If requested, has the most recent run history for the export.

  • partition_data (bool) – If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.

  • next_run_time_estimate (datetime) – If the export has an active schedule, provides an estimate of the next run time.

Keyword Arguments
  • format (str or FormatType) – The format of the export being delivered. Currently only ‘Csv’ is supported. “Csv”

  • delivery_info (ExportDeliveryInfo) – Has delivery information for the export. Required.

  • definition (ExportDefinition) – Has the definition for the export. Required.

  • run_history (ExportExecutionListResult) – If requested, has the most recent run history for the export.

  • partition_data (bool) – If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.

class azure.mgmt.costmanagement.models.CostDetailsDataFormat(value)[source]

Bases: str, enum.Enum

The data format of the report.

CSV_COST_DETAILS_DATA_FORMAT = 'Csv'

Csv data format.

class azure.mgmt.costmanagement.models.CostDetailsMetricType(value)[source]

Bases: str, enum.Enum

The type of the detailed report. By default ActualCost is provided.

ACTUAL_COST_COST_DETAILS_METRIC_TYPE = 'ActualCost'

Actual cost data.

AMORTIZED_COST_COST_DETAILS_METRIC_TYPE = 'AmortizedCost'

Amortized cost data.

class azure.mgmt.costmanagement.models.CostDetailsOperationResults(*, id: Optional[str] = None, name: Optional[str] = None, type: Optional[str] = None, status: Optional[Union[str, _models.CostDetailsStatusType]] = None, valid_till: Optional[datetime.datetime] = None, error: Optional[_models.ErrorDetails] = None, manifest_version: Optional[str] = None, data_format: Optional[Union[str, _models.CostDetailsDataFormat]] = None, byte_count: Optional[int] = None, blob_count: Optional[int] = None, compress_data: Optional[bool] = None, blobs: Optional[List[_models.BlobInfo]] = None, request_scope: Optional[str] = None, request_body: Optional[_models.GenerateCostDetailsReportRequestDefinition] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The result of the long running operation for cost details Api.

Variables
  • id (str) – The id of the long running operation.

  • name (str) – The name of the long running operation.

  • type (str) – The type of the long running operation.

  • status (str or CostDetailsStatusType) – The status of the cost details operation. Known values are: “Completed”, “NoDataFound”, and “Failed”.

  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • error (ErrorDetails) – The details of the error.

  • manifest_version (str) – The Manifest version.

  • data_format (str or CostDetailsDataFormat) – The data format of the report. “Csv”

  • byte_count (int) – The total number of bytes in all blobs.

  • blob_count (int) – The total number of blobs.

  • compress_data (bool) – Is the data in compressed format.

  • blobs (list[BlobInfo]) – List of blob information generated by this operation.

  • request_scope (str) – The request scope of the request.

  • request_body (GenerateCostDetailsReportRequestDefinition) – The request payload body provided in Cost Details call.

Keyword Arguments
  • id (str) – The id of the long running operation.

  • name (str) – The name of the long running operation.

  • type (str) – The type of the long running operation.

  • status (str or CostDetailsStatusType) – The status of the cost details operation. Known values are: “Completed”, “NoDataFound”, and “Failed”.

  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • error (ErrorDetails) – The details of the error.

  • manifest_version (str) – The Manifest version.

  • data_format (str or CostDetailsDataFormat) – The data format of the report. “Csv”

  • byte_count (int) – The total number of bytes in all blobs.

  • blob_count (int) – The total number of blobs.

  • compress_data (bool) – Is the data in compressed format.

  • blobs (list[BlobInfo]) – List of blob information generated by this operation.

  • request_scope (str) – The request scope of the request.

  • request_body (GenerateCostDetailsReportRequestDefinition) – The request payload body provided in Cost Details call.

class azure.mgmt.costmanagement.models.CostDetailsStatusType(value)[source]

Bases: str, enum.Enum

The status of the cost details operation.

COMPLETED_COST_DETAILS_STATUS_TYPE = 'Completed'

Operation is Completed.

FAILED_COST_DETAILS_STATUS_TYPE = 'Failed'

Operation Failed.

NO_DATA_FOUND_COST_DETAILS_STATUS_TYPE = 'NoDataFound'

Operation is Completed and no cost data found.

class azure.mgmt.costmanagement.models.CostDetailsTimePeriod(*, start: str, end: str, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The start and end date for pulling data for the cost detailed report. API only allows data to be pulled for 1 month or less and no older than 13 months.

All required parameters must be populated in order to send to Azure.

Variables
  • start (str) – The start date to pull data from. example format 2020-03-15. Required.

  • end (str) – The end date to pull data to. example format 2020-03-15. Required.

Keyword Arguments
  • start (str) – The start date to pull data from. example format 2020-03-15. Required.

  • end (str) – The end date to pull data to. example format 2020-03-15. Required.

class azure.mgmt.costmanagement.models.CostManagementOperation(*, display: Optional[_models.OperationDisplay] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.Operation

A Cost management REST API operation.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • name (str) – The name of the operation, as per Resource-Based Access Control (RBAC). Examples: “Microsoft.Compute/virtualMachines/write”, “Microsoft.Compute/virtualMachines/capture/action”.

  • is_data_action (bool) – Whether the operation applies to data-plane. This is “true” for data-plane operations and “false” for ARM/control-plane operations.

  • display (OperationDisplay) – Localized display information for this particular operation.

  • origin (str or Origin) – The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is “user,system”. Known values are: “user”, “system”, and “user,system”.

  • action_type (str or ActionType) – Enum. Indicates the action type. “Internal” refers to actions that are for internal only APIs. “Internal”

  • id (str) – Operation id: {provider}/{resource}/{operation}.

Keyword Arguments

display (OperationDisplay) – Localized display information for this particular operation.

class azure.mgmt.costmanagement.models.CostManagementProxyResource(*, e_tag: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The Resource model definition.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

Keyword Arguments

e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

class azure.mgmt.costmanagement.models.CostManagementResource(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The Resource model definition.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • location (str) – Location of the resource.

  • sku (str) – SKU of the resource.

  • e_tag (str) – ETag of the resource.

  • tags (dict[str, str]) – Resource tags.

class azure.mgmt.costmanagement.models.CreatedByType(value)[source]

Bases: str, enum.Enum

The type of identity that created the resource.

APPLICATION = 'Application'
KEY = 'Key'
MANAGED_IDENTITY = 'ManagedIdentity'
USER = 'User'
class azure.mgmt.costmanagement.models.DaysOfWeek(value)[source]

Bases: str, enum.Enum

Days of Week.

FRIDAY = 'Friday'
MONDAY = 'Monday'
SATURDAY = 'Saturday'
SUNDAY = 'Sunday'
THURSDAY = 'Thursday'
TUESDAY = 'Tuesday'
WEDNESDAY = 'Wednesday'
class azure.mgmt.costmanagement.models.Dimension(*, data: Optional[List[str]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CostManagementResource

List of Dimension.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • location (str) – Location of the resource.

  • sku (str) – SKU of the resource.

  • e_tag (str) – ETag of the resource.

  • tags (dict[str, str]) – Resource tags.

  • description (str) – Dimension description.

  • filter_enabled (bool) – Filter enabled.

  • grouping_enabled (bool) – Grouping enabled.

  • data (list[str]) – Dimension data.

  • total (int) – Total number of data for the dimension.

  • category (str) – Dimension category.

  • usage_start (datetime) – Usage start.

  • usage_end (datetime) – Usage end.

  • next_link (str) – The link (url) to the next page of results.

Keyword Arguments

data (list[str]) – Dimension data.

class azure.mgmt.costmanagement.models.DimensionsListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Result of listing dimensions. It contains a list of available dimensions.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

value (list[Dimension]) – The list of dimensions.

class azure.mgmt.costmanagement.models.DismissAlertPayload(*, definition: Optional[_models.AlertPropertiesDefinition] = None, description: Optional[str] = None, source: Optional[Union[str, _models.AlertSource]] = None, details: Optional[_models.AlertPropertiesDetails] = None, cost_entity_id: Optional[str] = None, status: Optional[Union[str, _models.AlertStatus]] = None, creation_time: Optional[str] = None, close_time: Optional[str] = None, modification_time: Optional[str] = None, status_modification_user_name: Optional[str] = None, status_modification_time: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The request payload to update an alert.

Variables
  • definition (AlertPropertiesDefinition) – defines the type of alert.

  • description (str) – Alert description.

  • source (str or AlertSource) – Source of alert. Known values are: “Preset” and “User”.

  • details (AlertPropertiesDetails) – Alert details.

  • cost_entity_id (str) – related budget.

  • status (str or AlertStatus) – alert status. Known values are: “None”, “Active”, “Overridden”, “Resolved”, and “Dismissed”.

  • creation_time (str) – dateTime in which alert was created.

  • close_time (str) – dateTime in which alert was closed.

  • modification_time (str) – dateTime in which alert was last modified.

  • status_modification_user_name (str) – User who last modified the alert.

  • status_modification_time (str) – dateTime in which the alert status was last modified.

Keyword Arguments
  • definition (AlertPropertiesDefinition) – defines the type of alert.

  • description (str) – Alert description.

  • source (str or AlertSource) – Source of alert. Known values are: “Preset” and “User”.

  • details (AlertPropertiesDetails) – Alert details.

  • cost_entity_id (str) – related budget.

  • status (str or AlertStatus) – alert status. Known values are: “None”, “Active”, “Overridden”, “Resolved”, and “Dismissed”.

  • creation_time (str) – dateTime in which alert was created.

  • close_time (str) – dateTime in which alert was closed.

  • modification_time (str) – dateTime in which alert was last modified.

  • status_modification_user_name (str) – User who last modified the alert.

  • status_modification_time (str) – dateTime in which the alert status was last modified.

class azure.mgmt.costmanagement.models.DownloadURL(*, valid_till: Optional[datetime.datetime] = None, download_url: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The URL to download the generated report.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • expiry_time (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • download_url (str) – The URL to download the generated report.

Keyword Arguments
  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • download_url (str) – The URL to download the generated report.

class azure.mgmt.costmanagement.models.ErrorDetails(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The details of the error.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • code (str) – Error code.

  • message (str) – Error message indicating why the operation failed.

class azure.mgmt.costmanagement.models.ErrorResponse(*, error: Optional[_models.ErrorDetails] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

  • 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the “x-ms-ratelimit-microsoft.consumption-retry-after” header.

  • 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the “Retry-After” header.

    ivar error

    The details of the error.

    vartype error

    ~azure.mgmt.costmanagement.models.ErrorDetails

Keyword Arguments

error (ErrorDetails) – The details of the error.

class azure.mgmt.costmanagement.models.ExecutionStatus(value)[source]

Bases: str, enum.Enum

The last known status of the export run.

COMPLETED = 'Completed'
DATA_NOT_AVAILABLE = 'DataNotAvailable'
FAILED = 'Failed'
IN_PROGRESS = 'InProgress'
NEW_DATA_NOT_AVAILABLE = 'NewDataNotAvailable'
QUEUED = 'Queued'
TIMEOUT = 'Timeout'
class azure.mgmt.costmanagement.models.ExecutionType(value)[source]

Bases: str, enum.Enum

The type of the export run.

ON_DEMAND = 'OnDemand'
SCHEDULED = 'Scheduled'
class azure.mgmt.costmanagement.models.Export(*, e_tag: Optional[str] = None, format: Optional[Union[str, _models.FormatType]] = None, delivery_info: Optional[_models.ExportDeliveryInfo] = None, definition: Optional[_models.ExportDefinition] = None, run_history: Optional[_models.ExportExecutionListResult] = None, partition_data: Optional[bool] = None, schedule: Optional[_models.ExportSchedule] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CostManagementProxyResource

An export resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • format (str or FormatType) – The format of the export being delivered. Currently only ‘Csv’ is supported. “Csv”

  • delivery_info (ExportDeliveryInfo) – Has delivery information for the export.

  • definition (ExportDefinition) – Has the definition for the export.

  • run_history (ExportExecutionListResult) – If requested, has the most recent run history for the export.

  • partition_data (bool) – If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.

  • next_run_time_estimate (datetime) – If the export has an active schedule, provides an estimate of the next run time.

  • schedule (ExportSchedule) – Has schedule information for the export.

Keyword Arguments
  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • format (str or FormatType) – The format of the export being delivered. Currently only ‘Csv’ is supported. “Csv”

  • delivery_info (ExportDeliveryInfo) – Has delivery information for the export.

  • definition (ExportDefinition) – Has the definition for the export.

  • run_history (ExportExecutionListResult) – If requested, has the most recent run history for the export.

  • partition_data (bool) – If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.

  • schedule (ExportSchedule) – Has schedule information for the export.

class azure.mgmt.costmanagement.models.ExportDataset(*, granularity: Optional[Union[str, _models.GranularityType]] = None, configuration: Optional[_models.ExportDatasetConfiguration] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition for data in the export.

Variables
Keyword Arguments
class azure.mgmt.costmanagement.models.ExportDatasetConfiguration(*, columns: Optional[List[str]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns.

Variables

columns (list[str]) – Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).

Keyword Arguments

columns (list[str]) – Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).

class azure.mgmt.costmanagement.models.ExportDefinition(*, type: Union[str, _models.ExportType], timeframe: Union[str, _models.TimeframeType], time_period: Optional[_models.ExportTimePeriod] = None, data_set: Optional[_models.ExportDataset] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of an export.

All required parameters must be populated in order to send to Azure.

Variables
  • type (str or ExportType) – The type of the export. Note that ‘Usage’ is equivalent to ‘ActualCost’ and is applicable to exports that do not yet provide data for charges or amortization for service reservations. Required. Known values are: “Usage”, “ActualCost”, and “AmortizedCost”.

  • timeframe (str or TimeframeType) – The time frame for pulling data for the export. If custom, then a specific time period must be provided. Required. Known values are: “MonthToDate”, “BillingMonthToDate”, “TheLastMonth”, “TheLastBillingMonth”, “WeekToDate”, and “Custom”.

  • time_period (ExportTimePeriod) – Has time period for pulling data for the export.

  • data_set (ExportDataset) – The definition for data in the export.

Keyword Arguments
  • type (str or ExportType) – The type of the export. Note that ‘Usage’ is equivalent to ‘ActualCost’ and is applicable to exports that do not yet provide data for charges or amortization for service reservations. Required. Known values are: “Usage”, “ActualCost”, and “AmortizedCost”.

  • timeframe (str or TimeframeType) – The time frame for pulling data for the export. If custom, then a specific time period must be provided. Required. Known values are: “MonthToDate”, “BillingMonthToDate”, “TheLastMonth”, “TheLastBillingMonth”, “WeekToDate”, and “Custom”.

  • time_period (ExportTimePeriod) – Has time period for pulling data for the export.

  • data_set (ExportDataset) – The definition for data in the export.

class azure.mgmt.costmanagement.models.ExportDeliveryDestination(*, container: str, resource_id: Optional[str] = None, root_folder_path: Optional[str] = None, sas_token: Optional[str] = None, storage_account: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

This represents the blob storage account location where exports of costs will be delivered. There are two ways to configure the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This requires a one-time registration of the account’s subscription with the Microsoft.CostManagementExports resource provider in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).

All required parameters must be populated in order to send to Azure.

Variables
  • resource_id (str) – The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified.

  • container (str) – The name of the container where exports will be uploaded. If the container does not exist it will be created. Required.

  • root_folder_path (str) – The name of the directory where exports will be uploaded.

  • sas_token (str) – A SAS token for the storage account. For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId. Note: the value returned by the API for this property will always be obfuscated. Returning this same obfuscated value will not result in the SAS token being updated. To update this value a new SAS token must be specified.

  • storage_account (str) – The storage account where exports will be uploaded. For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId.

Keyword Arguments
  • resource_id (str) – The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified.

  • container (str) – The name of the container where exports will be uploaded. If the container does not exist it will be created. Required.

  • root_folder_path (str) – The name of the directory where exports will be uploaded.

  • sas_token (str) – A SAS token for the storage account. For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId. Note: the value returned by the API for this property will always be obfuscated. Returning this same obfuscated value will not result in the SAS token being updated. To update this value a new SAS token must be specified.

  • storage_account (str) – The storage account where exports will be uploaded. For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId.

class azure.mgmt.costmanagement.models.ExportDeliveryInfo(*, destination: _models.ExportDeliveryDestination, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The delivery information associated with a export.

All required parameters must be populated in order to send to Azure.

Variables

destination (ExportDeliveryDestination) – Has destination for the export being delivered. Required.

Keyword Arguments

destination (ExportDeliveryDestination) – Has destination for the export being delivered. Required.

class azure.mgmt.costmanagement.models.ExportExecutionListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Result of listing the run history of an export.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

value (list[ExportRun]) – A list of export runs.

class azure.mgmt.costmanagement.models.ExportListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Result of listing exports. It contains a list of available exports in the scope provided.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

value (list[Export]) – The list of exports.

class azure.mgmt.costmanagement.models.ExportProperties(*, delivery_info: _models.ExportDeliveryInfo, definition: _models.ExportDefinition, format: Optional[Union[str, _models.FormatType]] = None, run_history: Optional[_models.ExportExecutionListResult] = None, partition_data: Optional[bool] = None, schedule: Optional[_models.ExportSchedule] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CommonExportProperties

The properties of the export.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • format (str or FormatType) – The format of the export being delivered. Currently only ‘Csv’ is supported. “Csv”

  • delivery_info (ExportDeliveryInfo) – Has delivery information for the export. Required.

  • definition (ExportDefinition) – Has the definition for the export. Required.

  • run_history (ExportExecutionListResult) – If requested, has the most recent run history for the export.

  • partition_data (bool) – If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.

  • next_run_time_estimate (datetime) – If the export has an active schedule, provides an estimate of the next run time.

  • schedule (ExportSchedule) – Has schedule information for the export.

Keyword Arguments
  • format (str or FormatType) – The format of the export being delivered. Currently only ‘Csv’ is supported. “Csv”

  • delivery_info (ExportDeliveryInfo) – Has delivery information for the export. Required.

  • definition (ExportDefinition) – Has the definition for the export. Required.

  • run_history (ExportExecutionListResult) – If requested, has the most recent run history for the export.

  • partition_data (bool) – If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.

  • schedule (ExportSchedule) – Has schedule information for the export.

class azure.mgmt.costmanagement.models.ExportRecurrencePeriod(*, from_property: datetime.datetime, to: Optional[datetime.datetime] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The start and end date for recurrence schedule.

All required parameters must be populated in order to send to Azure.

Variables
  • from_property (datetime) – The start date of recurrence. Required.

  • to (datetime) – The end date of recurrence.

Keyword Arguments
  • from_property (datetime) – The start date of recurrence. Required.

  • to (datetime) – The end date of recurrence.

class azure.mgmt.costmanagement.models.ExportRun(*, e_tag: Optional[str] = None, execution_type: Optional[Union[str, _models.ExecutionType]] = None, status: Optional[Union[str, _models.ExecutionStatus]] = None, submitted_by: Optional[str] = None, submitted_time: Optional[datetime.datetime] = None, processing_start_time: Optional[datetime.datetime] = None, processing_end_time: Optional[datetime.datetime] = None, file_name: Optional[str] = None, run_settings: Optional[_models.CommonExportProperties] = None, error: Optional[_models.ErrorDetails] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CostManagementProxyResource

An export run.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • execution_type (str or ExecutionType) – The type of the export run. Known values are: “OnDemand” and “Scheduled”.

  • status (str or ExecutionStatus) – The last known status of the export run. Known values are: “Queued”, “InProgress”, “Completed”, “Failed”, “Timeout”, “NewDataNotAvailable”, and “DataNotAvailable”.

  • submitted_by (str) – The identifier for the entity that triggered the export. For on-demand runs it is the user email. For scheduled runs it is ‘System’.

  • submitted_time (datetime) – The time when export was queued to be run.

  • processing_start_time (datetime) – The time when export was picked up to be run.

  • processing_end_time (datetime) – The time when the export run finished.

  • file_name (str) – The name of the exported file.

  • run_settings (CommonExportProperties) – The export settings that were in effect for this run.

  • error (ErrorDetails) – The details of any error.

Keyword Arguments
  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • execution_type (str or ExecutionType) – The type of the export run. Known values are: “OnDemand” and “Scheduled”.

  • status (str or ExecutionStatus) – The last known status of the export run. Known values are: “Queued”, “InProgress”, “Completed”, “Failed”, “Timeout”, “NewDataNotAvailable”, and “DataNotAvailable”.

  • submitted_by (str) – The identifier for the entity that triggered the export. For on-demand runs it is the user email. For scheduled runs it is ‘System’.

  • submitted_time (datetime) – The time when export was queued to be run.

  • processing_start_time (datetime) – The time when export was picked up to be run.

  • processing_end_time (datetime) – The time when the export run finished.

  • file_name (str) – The name of the exported file.

  • run_settings (CommonExportProperties) – The export settings that were in effect for this run.

  • error (ErrorDetails) – The details of any error.

class azure.mgmt.costmanagement.models.ExportSchedule(*, status: Optional[Union[str, _models.StatusType]] = None, recurrence: Optional[Union[str, _models.RecurrenceType]] = None, recurrence_period: Optional[_models.ExportRecurrencePeriod] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The schedule associated with the export.

Variables
  • status (str or StatusType) – The status of the export’s schedule. If ‘Inactive’, the export’s schedule is paused. Known values are: “Active” and “Inactive”.

  • recurrence (str or RecurrenceType) – The schedule recurrence. Known values are: “Daily”, “Weekly”, “Monthly”, and “Annually”.

  • recurrence_period (ExportRecurrencePeriod) – Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date.

Keyword Arguments
  • status (str or StatusType) – The status of the export’s schedule. If ‘Inactive’, the export’s schedule is paused. Known values are: “Active” and “Inactive”.

  • recurrence (str or RecurrenceType) – The schedule recurrence. Known values are: “Daily”, “Weekly”, “Monthly”, and “Annually”.

  • recurrence_period (ExportRecurrencePeriod) – Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date.

class azure.mgmt.costmanagement.models.ExportTimePeriod(*, from_property: datetime.datetime, to: datetime.datetime, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The date range for data in the export. This should only be specified with timeFrame set to ‘Custom’. The maximum date range is 3 months.

All required parameters must be populated in order to send to Azure.

Variables
  • from_property (datetime) – The start date for export data. Required.

  • to (datetime) – The end date for export data. Required.

Keyword Arguments
  • from_property (datetime) – The start date for export data. Required.

  • to (datetime) – The end date for export data. Required.

class azure.mgmt.costmanagement.models.ExportType(value)[source]

Bases: str, enum.Enum

The type of the query.

ACTUAL_COST = 'ActualCost'
AMORTIZED_COST = 'AmortizedCost'
USAGE = 'Usage'
class azure.mgmt.costmanagement.models.ExternalCloudProviderType(value)[source]

Bases: str, enum.Enum

ExternalCloudProviderType.

EXTERNAL_BILLING_ACCOUNTS = 'externalBillingAccounts'
EXTERNAL_SUBSCRIPTIONS = 'externalSubscriptions'
class azure.mgmt.costmanagement.models.FileDestination(*, file_formats: Optional[List[Union[str, _models.FileFormat]]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Destination of the view data. This is optional. Currently only CSV format is supported.

Variables

file_formats (list[str or FileFormat]) – Destination of the view data. Currently only CSV format is supported.

Keyword Arguments

file_formats (list[str or FileFormat]) – Destination of the view data. Currently only CSV format is supported.

class azure.mgmt.costmanagement.models.FileFormat(value)[source]

Bases: str, enum.Enum

Destination of the view data. Currently only CSV format is supported.

CSV = 'Csv'
class azure.mgmt.costmanagement.models.ForecastAggregation(*, name: Union[str, _models.FunctionName], function: Union[str, _models.FunctionType], **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The aggregation expression to be used in the forecast.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str or FunctionName) – The name of the column to aggregate. Required. Known values are: “PreTaxCostUSD”, “Cost”, “CostUSD”, and “PreTaxCost”.

  • function (str or FunctionType) – The name of the aggregation function to use. Required. “Sum”

Keyword Arguments
  • name (str or FunctionName) – The name of the column to aggregate. Required. Known values are: “PreTaxCostUSD”, “Cost”, “CostUSD”, and “PreTaxCost”.

  • function (str or FunctionType) – The name of the aggregation function to use. Required. “Sum”

class azure.mgmt.costmanagement.models.ForecastColumn(*, name: Optional[str] = None, type: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Forecast column properties.

Variables
  • name (str) – The name of column.

  • type (str) – The type of column.

Keyword Arguments
  • name (str) – The name of column.

  • type (str) – The type of column.

class azure.mgmt.costmanagement.models.ForecastComparisonExpression(*, name: str, operator: Union[str, _models.ForecastOperatorType], values: List[str], **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The comparison expression to be used in the forecast.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str) – The name of the column to use in comparison. Required.

  • operator (str or ForecastOperatorType) – The operator to use for comparison. Required. “In”

  • values (list[str]) – Array of values to use for comparison. Required.

Keyword Arguments
  • name (str) – The name of the column to use in comparison. Required.

  • operator (str or ForecastOperatorType) – The operator to use for comparison. Required. “In”

  • values (list[str]) – Array of values to use for comparison. Required.

class azure.mgmt.costmanagement.models.ForecastDataset(*, aggregation: Dict[str, _models.ForecastAggregation], granularity: Optional[Union[str, _models.GranularityType]] = None, configuration: Optional[_models.ForecastDatasetConfiguration] = None, filter: Optional[_models.ForecastFilter] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of data present in the forecast.

All required parameters must be populated in order to send to Azure.

Variables
  • granularity (str or GranularityType) – The granularity of rows in the forecast. “Daily”

  • configuration (ForecastDatasetConfiguration) – Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.

  • aggregation (dict[str, ForecastAggregation]) – Dictionary of aggregation expression to use in the forecast. The key of each item in the dictionary is the alias for the aggregated column. forecast can have up to 2 aggregation clauses. Required.

  • filter (ForecastFilter) – Has filter expression to use in the forecast.

Keyword Arguments
  • granularity (str or GranularityType) – The granularity of rows in the forecast. “Daily”

  • configuration (ForecastDatasetConfiguration) – Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.

  • aggregation (dict[str, ForecastAggregation]) – Dictionary of aggregation expression to use in the forecast. The key of each item in the dictionary is the alias for the aggregated column. forecast can have up to 2 aggregation clauses. Required.

  • filter (ForecastFilter) – Has filter expression to use in the forecast.

class azure.mgmt.costmanagement.models.ForecastDatasetConfiguration(*, columns: Optional[List[str]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The configuration of dataset in the forecast.

Variables

columns (list[str]) – Array of column names to be included in the forecast. Any valid forecast column name is allowed. If not provided, then forecast includes all columns.

Keyword Arguments

columns (list[str]) – Array of column names to be included in the forecast. Any valid forecast column name is allowed. If not provided, then forecast includes all columns.

class azure.mgmt.costmanagement.models.ForecastDefinition(*, type: Union[str, _models.ForecastType], timeframe: Union[str, _models.ForecastTimeframe], dataset: _models.ForecastDataset, time_period: Optional[_models.ForecastTimePeriod] = None, include_actual_cost: Optional[bool] = None, include_fresh_partial_cost: Optional[bool] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of a forecast.

All required parameters must be populated in order to send to Azure.

Variables
  • type (str or ForecastType) – The type of the forecast. Required. Known values are: “Usage”, “ActualCost”, and “AmortizedCost”.

  • timeframe (str or ForecastTimeframe) – The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. Required. “Custom”

  • time_period (ForecastTimePeriod) – Has time period for pulling data for the forecast.

  • dataset (ForecastDataset) – Has definition for data in this forecast. Required.

  • include_actual_cost (bool) – A boolean determining if actualCost will be included.

  • include_fresh_partial_cost (bool) – A boolean determining if FreshPartialCost will be included.

Keyword Arguments
  • type (str or ForecastType) – The type of the forecast. Required. Known values are: “Usage”, “ActualCost”, and “AmortizedCost”.

  • timeframe (str or ForecastTimeframe) – The time frame for pulling data for the forecast. If custom, then a specific time period must be provided. Required. “Custom”

  • time_period (ForecastTimePeriod) – Has time period for pulling data for the forecast.

  • dataset (ForecastDataset) – Has definition for data in this forecast. Required.

  • include_actual_cost (bool) – A boolean determining if actualCost will be included.

  • include_fresh_partial_cost (bool) – A boolean determining if FreshPartialCost will be included.

class azure.mgmt.costmanagement.models.ForecastFilter(*, and_property: Optional[List[_models.ForecastFilter]] = None, or_property: Optional[List[_models.ForecastFilter]] = None, dimensions: Optional[_models.ForecastComparisonExpression] = None, tags: Optional[_models.ForecastComparisonExpression] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The filter expression to be used in the export.

Variables
Keyword Arguments
class azure.mgmt.costmanagement.models.ForecastOperatorType(value)[source]

Bases: str, enum.Enum

The operator to use for comparison.

IN = 'In'
class azure.mgmt.costmanagement.models.ForecastResult(*, next_link: Optional[str] = None, columns: Optional[List[_models.ForecastColumn]] = None, rows: Optional[List[List[Any]]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CostManagementResource

Result of forecast. It contains all columns listed under groupings and aggregation.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • location (str) – Location of the resource.

  • sku (str) – SKU of the resource.

  • e_tag (str) – ETag of the resource.

  • tags (dict[str, str]) – Resource tags.

  • next_link (str) – The link (url) to the next page of results.

  • columns (list[ForecastColumn]) – Array of columns.

  • rows (list[list[any]]) – Array of rows.

Keyword Arguments
  • next_link (str) – The link (url) to the next page of results.

  • columns (list[ForecastColumn]) – Array of columns.

  • rows (list[list[any]]) – Array of rows.

class azure.mgmt.costmanagement.models.ForecastTimePeriod(*, from_property: datetime.datetime, to: datetime.datetime, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Has time period for pulling data for the forecast.

All required parameters must be populated in order to send to Azure.

Variables
  • from_property (datetime) – The start date to pull data from. Required.

  • to (datetime) – The end date to pull data to. Required.

Keyword Arguments
  • from_property (datetime) – The start date to pull data from. Required.

  • to (datetime) – The end date to pull data to. Required.

class azure.mgmt.costmanagement.models.ForecastTimeframe(value)[source]

Bases: str, enum.Enum

The time frame for pulling data for the forecast.

CUSTOM = 'Custom'
class azure.mgmt.costmanagement.models.ForecastType(value)[source]

Bases: str, enum.Enum

The type of the forecast.

ACTUAL_COST = 'ActualCost'
AMORTIZED_COST = 'AmortizedCost'
USAGE = 'Usage'
class azure.mgmt.costmanagement.models.FormatType(value)[source]

Bases: str, enum.Enum

The format of the export being delivered. Currently only ‘Csv’ is supported.

CSV = 'Csv'
class azure.mgmt.costmanagement.models.FunctionName(value)[source]

Bases: str, enum.Enum

The name of the column to aggregate.

COST = 'Cost'
COST_USD = 'CostUSD'
PRE_TAX_COST = 'PreTaxCost'
PRE_TAX_COST_USD = 'PreTaxCostUSD'
class azure.mgmt.costmanagement.models.FunctionType(value)[source]

Bases: str, enum.Enum

The name of the aggregation function to use.

SUM = 'Sum'
class azure.mgmt.costmanagement.models.GenerateCostDetailsReportErrorResponse(*, error: Optional[_models.ErrorDetails] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

  • 400 Bad Request - Invalid Request Payload. Request payload provided is not in a json format or had an invalid member not accepted in the request payload.

  • 400 Bad Request - Invalid request payload: can only have either timePeriod or invoiceId or billingPeriod. API only allows data to be pulled for either timePeriod or invoiceId or billingPeriod. Customer should provide only one of these parameters.

  • 400 Bad Request - Start date must be after . API only allows data to be pulled no older than 13 months from now.

  • 400 Bad Request - The maximum allowed date range is 1 months. API only allows data to be pulled for 1 month or less.

  • 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the “retry-after” header.

  • 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the “Retry-After” header.

    ivar error

    The details of the error.

    vartype error

    ~azure.mgmt.costmanagement.models.ErrorDetails

Keyword Arguments

error (ErrorDetails) – The details of the error.

class azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition(*, metric: Optional[Union[str, _models.CostDetailsMetricType]] = None, time_period: Optional[_models.CostDetailsTimePeriod] = None, billing_period: Optional[str] = None, invoice_id: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of a cost detailed report.

Variables
  • metric (str or CostDetailsMetricType) – The type of the detailed report. By default ActualCost is provided. Known values are: “ActualCost” and “AmortizedCost”.

  • time_period (CostDetailsTimePeriod) – The specific date range of cost details requested for the report. This parameter cannot be used alongside either the invoiceId or billingPeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month’s cost. API only allows data to be pulled for 1 month or less and no older than 13 months. If no timePeriod or billingPeriod or invoiceId is provided the API defaults to the open month time period.

  • billing_period (str) – This parameter can be used only by Enterprise Agreement customers. Use the YearMonth(e.g. 202008) format. This parameter cannot be used alongside either the invoiceId or timePeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month’s cost.

  • invoice_id (str) – This parameter can only be used by Microsoft Customer Agreement customers. Additionally, it can only be used at the Billing Profile or Customer scope. This parameter cannot be used alongside either the billingPeriod or timePeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month’s cost.

Keyword Arguments
  • metric (str or CostDetailsMetricType) – The type of the detailed report. By default ActualCost is provided. Known values are: “ActualCost” and “AmortizedCost”.

  • time_period (CostDetailsTimePeriod) – The specific date range of cost details requested for the report. This parameter cannot be used alongside either the invoiceId or billingPeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month’s cost. API only allows data to be pulled for 1 month or less and no older than 13 months. If no timePeriod or billingPeriod or invoiceId is provided the API defaults to the open month time period.

  • billing_period (str) – This parameter can be used only by Enterprise Agreement customers. Use the YearMonth(e.g. 202008) format. This parameter cannot be used alongside either the invoiceId or timePeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month’s cost.

  • invoice_id (str) – This parameter can only be used by Microsoft Customer Agreement customers. Additionally, it can only be used at the Billing Profile or Customer scope. This parameter cannot be used alongside either the billingPeriod or timePeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month’s cost.

class azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition(*, metric: Optional[Union[str, _models.GenerateDetailedCostReportMetricType]] = None, time_period: Optional[_models.GenerateDetailedCostReportTimePeriod] = None, billing_period: Optional[str] = None, invoice_id: Optional[str] = None, customer_id: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of a cost detailed report.

Variables
  • metric (str or GenerateDetailedCostReportMetricType) – The type of the detailed report. By default ActualCost is provided. Known values are: “ActualCost” and “AmortizedCost”.

  • time_period (GenerateDetailedCostReportTimePeriod) – Has time period for pulling data for the cost detailed report. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.

  • billing_period (str) – Billing period in YearMonth(e.g. 202008) format. Only for legacy enterprise customers can use this. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.

  • invoice_id (str) – Invoice ID for Pay-as-you-go and Microsoft Customer Agreement scopes. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.

  • customer_id (str) – Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also required for this).

Keyword Arguments
  • metric (str or GenerateDetailedCostReportMetricType) – The type of the detailed report. By default ActualCost is provided. Known values are: “ActualCost” and “AmortizedCost”.

  • time_period (GenerateDetailedCostReportTimePeriod) – Has time period for pulling data for the cost detailed report. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.

  • billing_period (str) – Billing period in YearMonth(e.g. 202008) format. Only for legacy enterprise customers can use this. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.

  • invoice_id (str) – Invoice ID for Pay-as-you-go and Microsoft Customer Agreement scopes. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.

  • customer_id (str) – Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also required for this).

class azure.mgmt.costmanagement.models.GenerateDetailedCostReportErrorResponse(*, error: Optional[_models.ErrorDetails] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

  • 413 Request Entity Too Large - Request is throttled. The amount of data required to fulfill the request exceeds the maximum size permitted of 2Gb. Please utilize our Exports feature instead.

  • 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the “x-ms-ratelimit-microsoft.consumption-retry-after” header.

  • 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the “Retry-After” header.

    ivar error

    The details of the error.

    vartype error

    ~azure.mgmt.costmanagement.models.ErrorDetails

Keyword Arguments

error (ErrorDetails) – The details of the error.

class azure.mgmt.costmanagement.models.GenerateDetailedCostReportMetricType(value)[source]

Bases: str, enum.Enum

The type of the detailed report. By default ActualCost is provided.

ACTUAL_COST = 'ActualCost'
AMORTIZED_COST = 'AmortizedCost'
class azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult(*, id: Optional[str] = None, name: Optional[str] = None, type: Optional[str] = None, valid_till: Optional[datetime.datetime] = None, download_url: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The result of the long running operation for cost detailed report.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ARM resource id of the long running operation.

  • name (str) – The name of the long running operation.

  • type (str) – The type of the long running operation.

  • expiry_time (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • download_url (str) – The URL to download the generated report.

Keyword Arguments
  • id (str) – The ARM resource id of the long running operation.

  • name (str) – The name of the long running operation.

  • type (str) – The type of the long running operation.

  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • download_url (str) – The URL to download the generated report.

class azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses(*, id: Optional[str] = None, name: Optional[str] = None, status: Optional[_models.Status] = None, type: Optional[str] = None, error: Optional[_models.ErrorDetails] = None, valid_till: Optional[datetime.datetime] = None, download_url: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The status of the long running operation for cost detailed report.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the long running operation.

  • name (str) – The name of the long running operation.

  • status (Status) – The status of the long running operation.

  • type (str) – The type of the long running operation.

  • error (ErrorDetails) – The details of the error.

  • expiry_time (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • download_url (str) – The URL to download the generated report.

Keyword Arguments
  • id (str) – The ID of the long running operation.

  • name (str) – The name of the long running operation.

  • status (Status) – The status of the long running operation.

  • type (str) – The type of the long running operation.

  • error (ErrorDetails) – The details of the error.

  • valid_till (datetime) – The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.

  • download_url (str) – The URL to download the generated report.

class azure.mgmt.costmanagement.models.GenerateDetailedCostReportTimePeriod(*, start: str, end: str, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The start and end date for pulling data for the cost detailed report.

All required parameters must be populated in order to send to Azure.

Variables
  • start (str) – The start date to pull data from. example format 2020-03-15. Required.

  • end (str) – The end date to pull data to. example format 2020-03-15. Required.

Keyword Arguments
  • start (str) – The start date to pull data from. example format 2020-03-15. Required.

  • end (str) – The end date to pull data to. example format 2020-03-15. Required.

class azure.mgmt.costmanagement.models.Grain(value)[source]

Bases: str, enum.Enum

Grain which corresponds to value.

DAILY = 'Daily'

Hourly grain corresponds to value per day.

HOURLY = 'Hourly'

Hourly grain corresponds to value per hour.

MONTHLY = 'Monthly'

Hourly grain corresponds to value per month.

class azure.mgmt.costmanagement.models.GrainParameter(value)[source]

Bases: str, enum.Enum

GrainParameter.

DAILY = 'Daily'

Hourly grain corresponds to value per day.

HOURLY = 'Hourly'

Hourly grain corresponds to value per hour.

MONTHLY = 'Monthly'

Hourly grain corresponds to value per month.

class azure.mgmt.costmanagement.models.GranularityType(value)[source]

Bases: str, enum.Enum

The granularity of rows in the forecast.

DAILY = 'Daily'
class azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummary(*, benefit_type: Optional[Union[str, _models.BenefitKind]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummary

Included Quantity utilization summary resource.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

  • kind (str or BenefitKind) – Supported values: ‘SavingsPlan’. Required. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • arm_sku_name (str) – ARM SKU name. For example, ‘Compute_Savings_Plan’ for savings plan.

  • benefit_id (str) – The benefit ID is the identifier of the benefit.

  • benefit_order_id (str) – The benefit order ID is the identifier for a benefit purchase.

  • benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • usage_date (datetime) – Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.

  • utilization_percentage (float) – This is the utilized percentage for the benefit ID.

Keyword Arguments

benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

class azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummaryProperties(*, benefit_type: Optional[Union[str, _models.BenefitKind]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummaryProperties

Included Quantity utilization summary properties.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • arm_sku_name (str) – ARM SKU name. For example, ‘Compute_Savings_Plan’ for savings plan.

  • benefit_id (str) – The benefit ID is the identifier of the benefit.

  • benefit_order_id (str) – The benefit order ID is the identifier for a benefit purchase.

  • benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • usage_date (datetime) – Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.

  • utilization_percentage (float) – This is the utilized percentage for the benefit ID.

Keyword Arguments

benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

class azure.mgmt.costmanagement.models.KpiProperties(*, type: Optional[Union[str, _models.KpiType]] = None, id: Optional[str] = None, enabled: Optional[bool] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Each KPI must contain a ‘type’ and ‘enabled’ key.

Variables
  • type (str or KpiType) – KPI type (Forecast, Budget). Known values are: “Forecast” and “Budget”.

  • id (str) – ID of resource related to metric (budget).

  • enabled (bool) – show the KPI in the UI?.

Keyword Arguments
  • type (str or KpiType) – KPI type (Forecast, Budget). Known values are: “Forecast” and “Budget”.

  • id (str) – ID of resource related to metric (budget).

  • enabled (bool) – show the KPI in the UI?.

class azure.mgmt.costmanagement.models.KpiType(value)[source]

Bases: str, enum.Enum

KPI type (Forecast, Budget).

BUDGET = 'Budget'
FORECAST = 'Forecast'
class azure.mgmt.costmanagement.models.LookBackPeriod(value)[source]

Bases: str, enum.Enum

The number of days used to look back.

LAST30_DAYS = 'Last30Days'

30 days used to look back.

LAST60_DAYS = 'Last60Days'

60 days used to look back.

LAST7_DAYS = 'Last7Days'

7 days used to look back.

class azure.mgmt.costmanagement.models.MetricType(value)[source]

Bases: str, enum.Enum

Metric to use when displaying costs.

ACTUAL_COST = 'ActualCost'
AHUB = 'AHUB'
AMORTIZED_COST = 'AmortizedCost'
class azure.mgmt.costmanagement.models.NotificationProperties(*, to: List[str], subject: str, language: Optional[str] = None, message: Optional[str] = None, regional_format: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The properties of the scheduled action notification.

All required parameters must be populated in order to send to Azure.

Variables
  • to (list[str]) – Array of email addresses. Required.

  • language (str) – Locale of the email.

  • message (str) – Optional message to be added in the email. Length is limited to 250 characters.

  • regional_format (str) – Regional format used for formatting date/time and currency values in the email.

  • subject (str) – Subject of the email. Length is limited to 70 characters. Required.

Keyword Arguments
  • to (list[str]) – Array of email addresses. Required.

  • language (str) – Locale of the email.

  • message (str) – Optional message to be added in the email. Length is limited to 250 characters.

  • regional_format (str) – Regional format used for formatting date/time and currency values in the email.

  • subject (str) – Subject of the email. Length is limited to 70 characters. Required.

class azure.mgmt.costmanagement.models.Operation(*, display: Optional[_models.OperationDisplay] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Details of a REST API operation, returned from the Resource Provider Operations API.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • name (str) – The name of the operation, as per Resource-Based Access Control (RBAC). Examples: “Microsoft.Compute/virtualMachines/write”, “Microsoft.Compute/virtualMachines/capture/action”.

  • is_data_action (bool) – Whether the operation applies to data-plane. This is “true” for data-plane operations and “false” for ARM/control-plane operations.

  • display (OperationDisplay) – Localized display information for this particular operation.

  • origin (str or Origin) – The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is “user,system”. Known values are: “user”, “system”, and “user,system”.

  • action_type (str or ActionType) – Enum. Indicates the action type. “Internal” refers to actions that are for internal only APIs. “Internal”

Keyword Arguments

display (OperationDisplay) – Localized display information for this particular operation.

class azure.mgmt.costmanagement.models.OperationDisplay(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Localized display information for this particular operation.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • provider (str) – The localized friendly form of the resource provider name, e.g. “Microsoft Monitoring Insights” or “Microsoft Compute”.

  • resource (str) – The localized friendly name of the resource type related to this operation. E.g. “Virtual Machines” or “Job Schedule Collections”.

  • operation (str) – The concise, localized friendly name for the operation; suitable for dropdowns. E.g. “Create or Update Virtual Machine”, “Restart Virtual Machine”.

  • description (str) – The short, localized friendly description of the operation; suitable for tool tips and detailed views.

class azure.mgmt.costmanagement.models.OperationListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • value (list[CostManagementOperation]) – List of cost management operations supported by the Microsoft.CostManagement resource provider.

  • next_link (str) – URL to get the next set of operation list results if there are any.

class azure.mgmt.costmanagement.models.OperationStatus(*, status: Optional[Union[str, _models.OperationStatusType]] = None, report_url: Optional[Union[str, _models.ReservationReportSchema]] = None, valid_until: Optional[datetime.datetime] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The status of the long running operation.

Variables
  • status (str or OperationStatusType) – The status of the long running operation. Known values are: “Running”, “Completed”, and “Failed”.

  • report_url (str or ReservationReportSchema) – The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity. Known values are: “InstanceFlexibilityGroup”, “InstanceFlexibilityRatio”, “InstanceId”, “Kind”, “ReservationId”, “ReservationOrderId”, “ReservedHours”, “SkuName”, “TotalReservedQuantity”, “UsageDate”, and “UsedHours”.

  • valid_until (datetime) – The time at which report URL becomes invalid.

Keyword Arguments
  • status (str or OperationStatusType) – The status of the long running operation. Known values are: “Running”, “Completed”, and “Failed”.

  • report_url (str or ReservationReportSchema) – The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity. Known values are: “InstanceFlexibilityGroup”, “InstanceFlexibilityRatio”, “InstanceId”, “Kind”, “ReservationId”, “ReservationOrderId”, “ReservedHours”, “SkuName”, “TotalReservedQuantity”, “UsageDate”, and “UsedHours”.

  • valid_until (datetime) – The time at which report URL becomes invalid.

class azure.mgmt.costmanagement.models.OperationStatusType(value)[source]

Bases: str, enum.Enum

The status of the long running operation.

COMPLETED = 'Completed'
FAILED = 'Failed'
RUNNING = 'Running'
class azure.mgmt.costmanagement.models.OperatorType(value)[source]

Bases: str, enum.Enum

The operator to use for comparison.

CONTAINS = 'Contains'
IN = 'In'
class azure.mgmt.costmanagement.models.Origin(value)[source]

Bases: str, enum.Enum

The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is “user,system”.

SYSTEM = 'system'
USER = 'user'
USER_SYSTEM = 'user,system'
class azure.mgmt.costmanagement.models.PivotProperties(*, type: Optional[Union[str, _models.PivotType]] = None, name: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Each pivot must contain a ‘type’ and ‘name’.

Variables
  • type (str or PivotType) – Data type to show in view. Known values are: “Dimension” and “TagKey”.

  • name (str) – Data field to show in view.

Keyword Arguments
  • type (str or PivotType) – Data type to show in view. Known values are: “Dimension” and “TagKey”.

  • name (str) – Data field to show in view.

class azure.mgmt.costmanagement.models.PivotType(value)[source]

Bases: str, enum.Enum

Data type to show in view.

DIMENSION = 'Dimension'
TAG_KEY = 'TagKey'
class azure.mgmt.costmanagement.models.ProxyResource(**kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.Resource

The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

class azure.mgmt.costmanagement.models.QueryAggregation(*, name: str, function: Union[str, _models.FunctionType], **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The aggregation expression to be used in the query.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str) – The name of the column to aggregate. Required.

  • function (str or FunctionType) – The name of the aggregation function to use. Required. “Sum”

Keyword Arguments
  • name (str) – The name of the column to aggregate. Required.

  • function (str or FunctionType) – The name of the aggregation function to use. Required. “Sum”

class azure.mgmt.costmanagement.models.QueryColumn(*, name: Optional[str] = None, type: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

QueryColumn properties.

Variables
  • name (str) – The name of column.

  • type (str) – The type of column.

Keyword Arguments
  • name (str) – The name of column.

  • type (str) – The type of column.

class azure.mgmt.costmanagement.models.QueryColumnType(value)[source]

Bases: str, enum.Enum

The type of the column in the export.

DIMENSION = 'Dimension'
TAG = 'Tag'
class azure.mgmt.costmanagement.models.QueryComparisonExpression(*, name: str, operator: Union[str, _models.QueryOperatorType], values: List[str], **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The comparison expression to be used in the query.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str) – The name of the column to use in comparison. Required.

  • operator (str or QueryOperatorType) – The operator to use for comparison. Required. “In”

  • values (list[str]) – Array of values to use for comparison. Required.

Keyword Arguments
  • name (str) – The name of the column to use in comparison. Required.

  • operator (str or QueryOperatorType) – The operator to use for comparison. Required. “In”

  • values (list[str]) – Array of values to use for comparison. Required.

class azure.mgmt.costmanagement.models.QueryDataset(*, granularity: Optional[Union[str, _models.GranularityType]] = None, configuration: Optional[_models.QueryDatasetConfiguration] = None, aggregation: Optional[Dict[str, _models.QueryAggregation]] = None, grouping: Optional[List[_models.QueryGrouping]] = None, filter: Optional[_models.QueryFilter] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of data present in the query.

Variables
  • granularity (str or GranularityType) – The granularity of rows in the query. “Daily”

  • configuration (QueryDatasetConfiguration) – Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.

  • aggregation (dict[str, QueryAggregation]) – Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses.

  • grouping (list[QueryGrouping]) – Array of group by expression to use in the query. Query can have up to 2 group by clauses.

  • filter (QueryFilter) – The filter expression to use in the query. Please reference our Query API REST documentation for how to properly format the filter.

Keyword Arguments
  • granularity (str or GranularityType) – The granularity of rows in the query. “Daily”

  • configuration (QueryDatasetConfiguration) – Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.

  • aggregation (dict[str, QueryAggregation]) – Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses.

  • grouping (list[QueryGrouping]) – Array of group by expression to use in the query. Query can have up to 2 group by clauses.

  • filter (QueryFilter) – The filter expression to use in the query. Please reference our Query API REST documentation for how to properly format the filter.

class azure.mgmt.costmanagement.models.QueryDatasetConfiguration(*, columns: Optional[List[str]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The configuration of dataset in the query.

Variables

columns (list[str]) – Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns.

Keyword Arguments

columns (list[str]) – Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns.

class azure.mgmt.costmanagement.models.QueryDefinition(*, type: Union[str, _models.ExportType], timeframe: Union[str, _models.TimeframeType], dataset: _models.QueryDataset, time_period: Optional[_models.QueryTimePeriod] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of a query.

All required parameters must be populated in order to send to Azure.

Variables
  • type (str or ExportType) – The type of the query. Required. Known values are: “Usage”, “ActualCost”, and “AmortizedCost”.

  • timeframe (str or TimeframeType) – The time frame for pulling data for the query. If custom, then a specific time period must be provided. Required. Known values are: “MonthToDate”, “BillingMonthToDate”, “TheLastMonth”, “TheLastBillingMonth”, “WeekToDate”, and “Custom”.

  • time_period (QueryTimePeriod) – Has time period for pulling data for the query.

  • dataset (QueryDataset) – Has definition for data in this query. Required.

Keyword Arguments
  • type (str or ExportType) – The type of the query. Required. Known values are: “Usage”, “ActualCost”, and “AmortizedCost”.

  • timeframe (str or TimeframeType) – The time frame for pulling data for the query. If custom, then a specific time period must be provided. Required. Known values are: “MonthToDate”, “BillingMonthToDate”, “TheLastMonth”, “TheLastBillingMonth”, “WeekToDate”, and “Custom”.

  • time_period (QueryTimePeriod) – Has time period for pulling data for the query.

  • dataset (QueryDataset) – Has definition for data in this query. Required.

class azure.mgmt.costmanagement.models.QueryFilter(*, and_property: Optional[List[_models.QueryFilter]] = None, or_property: Optional[List[_models.QueryFilter]] = None, dimensions: Optional[_models.QueryComparisonExpression] = None, tags: Optional[_models.QueryComparisonExpression] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The filter expression to be used in the export.

Variables
Keyword Arguments
class azure.mgmt.costmanagement.models.QueryGrouping(*, type: Union[str, _models.QueryColumnType], name: str, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The group by expression to be used in the query.

All required parameters must be populated in order to send to Azure.

Variables
  • type (str or QueryColumnType) – Has type of the column to group. Required. Known values are: “Tag” and “Dimension”.

  • name (str) – The name of the column to group. Required.

Keyword Arguments
  • type (str or QueryColumnType) – Has type of the column to group. Required. Known values are: “Tag” and “Dimension”.

  • name (str) – The name of the column to group. Required.

class azure.mgmt.costmanagement.models.QueryOperatorType(value)[source]

Bases: str, enum.Enum

The operator to use for comparison.

IN = 'In'
class azure.mgmt.costmanagement.models.QueryResult(*, next_link: Optional[str] = None, columns: Optional[List[_models.QueryColumn]] = None, rows: Optional[List[List[Any]]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CostManagementResource

Result of query. It contains all columns listed under groupings and aggregation.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • location (str) – Location of the resource.

  • sku (str) – SKU of the resource.

  • e_tag (str) – ETag of the resource.

  • tags (dict[str, str]) – Resource tags.

  • next_link (str) – The link (url) to the next page of results.

  • columns (list[QueryColumn]) – Array of columns.

  • rows (list[list[any]]) – Array of rows.

Keyword Arguments
  • next_link (str) – The link (url) to the next page of results.

  • columns (list[QueryColumn]) – Array of columns.

  • rows (list[list[any]]) – Array of rows.

class azure.mgmt.costmanagement.models.QueryTimePeriod(*, from_property: datetime.datetime, to: datetime.datetime, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The start and end date for pulling data for the query.

All required parameters must be populated in order to send to Azure.

Variables
  • from_property (datetime) – The start date to pull data from. Required.

  • to (datetime) – The end date to pull data to. Required.

Keyword Arguments
  • from_property (datetime) – The start date to pull data from. Required.

  • to (datetime) – The end date to pull data to. Required.

class azure.mgmt.costmanagement.models.RecommendationUsageDetails(*, usage_grain: Optional[Union[str, _models.Grain]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • usage_grain (str or Grain) – The grain of the usage. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

  • charges (list[float]) – On-demand charges for each hour between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

Keyword Arguments

usage_grain (str or Grain) – The grain of the usage. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

class azure.mgmt.costmanagement.models.RecurrenceType(value)[source]

Bases: str, enum.Enum

The schedule recurrence.

ANNUALLY = 'Annually'
DAILY = 'Daily'
MONTHLY = 'Monthly'
WEEKLY = 'Weekly'
class azure.mgmt.costmanagement.models.ReportConfigAggregation(*, name: str, function: Union[str, _models.FunctionType], **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The aggregation expression to be used in the report.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str) – The name of the column to aggregate. Required.

  • function (str or FunctionType) – The name of the aggregation function to use. Required. “Sum”

Keyword Arguments
  • name (str) – The name of the column to aggregate. Required.

  • function (str or FunctionType) – The name of the aggregation function to use. Required. “Sum”

class azure.mgmt.costmanagement.models.ReportConfigColumnType(value)[source]

Bases: str, enum.Enum

The type of the column in the report.

DIMENSION = 'Dimension'
TAG = 'Tag'
class azure.mgmt.costmanagement.models.ReportConfigComparisonExpression(*, name: str, operator: Union[str, _models.OperatorType], values: List[str], **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The comparison expression to be used in the report.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str) – The name of the column to use in comparison. Required.

  • operator (str or OperatorType) – The operator to use for comparison. Required. Known values are: “In” and “Contains”.

  • values (list[str]) – Array of values to use for comparison. Required.

Keyword Arguments
  • name (str) – The name of the column to use in comparison. Required.

  • operator (str or OperatorType) – The operator to use for comparison. Required. Known values are: “In” and “Contains”.

  • values (list[str]) – Array of values to use for comparison. Required.

class azure.mgmt.costmanagement.models.ReportConfigDataset(*, granularity: Optional[Union[str, _models.ReportGranularityType]] = None, configuration: Optional[_models.ReportConfigDatasetConfiguration] = None, aggregation: Optional[Dict[str, _models.ReportConfigAggregation]] = None, grouping: Optional[List[_models.ReportConfigGrouping]] = None, sorting: Optional[List[_models.ReportConfigSorting]] = None, filter: Optional[_models.ReportConfigFilter] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The definition of data present in the report.

Variables
  • granularity (str or ReportGranularityType) – The granularity of rows in the report. Known values are: “Daily” and “Monthly”.

  • configuration (ReportConfigDatasetConfiguration) – Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.

  • aggregation (dict[str, ReportConfigAggregation]) – Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.

  • grouping (list[ReportConfigGrouping]) – Array of group by expression to use in the report. Report can have up to 2 group by clauses.

  • sorting (list[ReportConfigSorting]) – Array of order by expression to use in the report.

  • filter (ReportConfigFilter) – Has filter expression to use in the report.

Keyword Arguments
  • granularity (str or ReportGranularityType) – The granularity of rows in the report. Known values are: “Daily” and “Monthly”.

  • configuration (ReportConfigDatasetConfiguration) – Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.

  • aggregation (dict[str, ReportConfigAggregation]) – Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.

  • grouping (list[ReportConfigGrouping]) – Array of group by expression to use in the report. Report can have up to 2 group by clauses.

  • sorting (list[ReportConfigSorting]) – Array of order by expression to use in the report.

  • filter (ReportConfigFilter) – Has filter expression to use in the report.

class azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration(*, columns: Optional[List[str]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The configuration of dataset in the report.

Variables

columns (list[str]) – Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.

Keyword Arguments

columns (list[str]) – Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.

class azure.mgmt.costmanagement.models.ReportConfigFilter(*, and_property: Optional[List[_models.ReportConfigFilter]] = None, or_property: Optional[List[_models.ReportConfigFilter]] = None, dimensions: Optional[_models.ReportConfigComparisonExpression] = None, tags: Optional[_models.ReportConfigComparisonExpression] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The filter expression to be used in the report.

Variables
Keyword Arguments
class azure.mgmt.costmanagement.models.ReportConfigGrouping(*, type: Union[str, _models.ReportConfigColumnType], name: str, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The group by expression to be used in the report.

All required parameters must be populated in order to send to Azure.

Variables
  • type (str or ReportConfigColumnType) – Has type of the column to group. Required. Known values are: “Tag” and “Dimension”.

  • name (str) – The name of the column to group. This version supports subscription lowest possible grain. Required.

Keyword Arguments
  • type (str or ReportConfigColumnType) – Has type of the column to group. Required. Known values are: “Tag” and “Dimension”.

  • name (str) – The name of the column to group. This version supports subscription lowest possible grain. Required.

class azure.mgmt.costmanagement.models.ReportConfigSorting(*, name: str, direction: Optional[Union[str, _models.ReportConfigSortingType]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The order by expression to be used in the report.

All required parameters must be populated in order to send to Azure.

Variables
  • direction (str or ReportConfigSortingType) – Direction of sort. Known values are: “Ascending” and “Descending”.

  • name (str) – The name of the column to sort. Required.

Keyword Arguments
  • direction (str or ReportConfigSortingType) – Direction of sort. Known values are: “Ascending” and “Descending”.

  • name (str) – The name of the column to sort. Required.

class azure.mgmt.costmanagement.models.ReportConfigSortingType(value)[source]

Bases: str, enum.Enum

Direction of sort.

ASCENDING = 'Ascending'
DESCENDING = 'Descending'
class azure.mgmt.costmanagement.models.ReportConfigTimePeriod(*, from_property: datetime.datetime, to: datetime.datetime, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The start and end date for pulling data for the report.

All required parameters must be populated in order to send to Azure.

Variables
  • from_property (datetime) – The start date to pull data from. Required.

  • to (datetime) – The end date to pull data to. Required.

Keyword Arguments
  • from_property (datetime) – The start date to pull data from. Required.

  • to (datetime) – The end date to pull data to. Required.

class azure.mgmt.costmanagement.models.ReportGranularityType(value)[source]

Bases: str, enum.Enum

The granularity of rows in the report.

DAILY = 'Daily'
MONTHLY = 'Monthly'
class azure.mgmt.costmanagement.models.ReportOperationStatusType(value)[source]

Bases: str, enum.Enum

The status of the long running operation.

COMPLETED = 'Completed'
FAILED = 'Failed'
IN_PROGRESS = 'InProgress'
NO_DATA_FOUND = 'NoDataFound'
QUEUED = 'Queued'
READY_TO_DOWNLOAD = 'ReadyToDownload'
TIMED_OUT = 'TimedOut'
class azure.mgmt.costmanagement.models.ReportTimeframeType(value)[source]

Bases: str, enum.Enum

The time frame for pulling data for the report. If custom, then a specific time period must be provided.

CUSTOM = 'Custom'
MONTH_TO_DATE = 'MonthToDate'
WEEK_TO_DATE = 'WeekToDate'
YEAR_TO_DATE = 'YearToDate'
class azure.mgmt.costmanagement.models.ReportType(value)[source]

Bases: str, enum.Enum

The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.

USAGE = 'Usage'
class azure.mgmt.costmanagement.models.ReservationReportSchema(value)[source]

Bases: str, enum.Enum

The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity.

INSTANCE_FLEXIBILITY_GROUP = 'InstanceFlexibilityGroup'
INSTANCE_FLEXIBILITY_RATIO = 'InstanceFlexibilityRatio'
INSTANCE_ID = 'InstanceId'
KIND = 'Kind'
RESERVATION_ID = 'ReservationId'
RESERVATION_ORDER_ID = 'ReservationOrderId'
RESERVED_HOURS = 'ReservedHours'
SKU_NAME = 'SkuName'
TOTAL_RESERVED_QUANTITY = 'TotalReservedQuantity'
USAGE_DATE = 'UsageDate'
USED_HOURS = 'UsedHours'
class azure.mgmt.costmanagement.models.Resource(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Common fields that are returned in the response for all Azure Resource Manager resources.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

class azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummary(*, benefit_type: Optional[Union[str, _models.BenefitKind]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummary

Savings plan utilization summary resource.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

  • kind (str or BenefitKind) – Supported values: ‘SavingsPlan’. Required. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • arm_sku_name (str) – ARM SKU name. For example, ‘Compute_Savings_Plan’ for savings plan.

  • benefit_id (str) – The benefit ID is the identifier of the benefit.

  • benefit_order_id (str) – The benefit order ID is the identifier for a benefit purchase.

  • benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • usage_date (datetime) – Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.

  • avg_utilization_percentage (float) – This is the average hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the avgUtilizationPercentage value will be equal to the average of the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day.

  • min_utilization_percentage (float) – This is the minimum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the minUtilizationPercentage value will be equal to the smallest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the lowest utilization percentage was 10% at hour 4, then the value for the minUtilizationPercentage in the response will be 10%.

  • max_utilization_percentage (float) – This is the maximum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the maxUtilizationPercentage value will be equal to the largest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the largest utilization percentage was 90% at hour 5, then the value for the maxUtilizationPercentage in the response will be 90%.

Keyword Arguments

benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

class azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummaryProperties(*, benefit_type: Optional[Union[str, _models.BenefitKind]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.BenefitUtilizationSummaryProperties

Savings plan utilization summary properties.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • arm_sku_name (str) – ARM SKU name. For example, ‘Compute_Savings_Plan’ for savings plan.

  • benefit_id (str) – The benefit ID is the identifier of the benefit.

  • benefit_order_id (str) – The benefit order ID is the identifier for a benefit purchase.

  • benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

  • usage_date (datetime) – Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.

  • avg_utilization_percentage (float) – This is the average hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the avgUtilizationPercentage value will be equal to the average of the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day.

  • min_utilization_percentage (float) – This is the minimum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the minUtilizationPercentage value will be equal to the smallest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the lowest utilization percentage was 10% at hour 4, then the value for the minUtilizationPercentage in the response will be 10%.

  • max_utilization_percentage (float) – This is the maximum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the maxUtilizationPercentage value will be equal to the largest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the largest utilization percentage was 90% at hour 5, then the value for the maxUtilizationPercentage in the response will be 90%.

Keyword Arguments

benefit_type (str or BenefitKind) – The benefit type. Supported values: ‘SavingsPlan’. Known values are: “IncludedQuantity”, “Reservation”, and “SavingsPlan”.

class azure.mgmt.costmanagement.models.ScheduleFrequency(value)[source]

Bases: str, enum.Enum

Frequency of the schedule.

DAILY = 'Daily'

Cost analysis data will be emailed every day.

MONTHLY = 'Monthly'

Cost analysis data will be emailed every month.

WEEKLY = 'Weekly'

Cost analysis data will be emailed every week.

class azure.mgmt.costmanagement.models.ScheduleProperties(*, frequency: Union[str, _models.ScheduleFrequency], start_date: datetime.datetime, end_date: datetime.datetime, hour_of_day: Optional[int] = None, days_of_week: Optional[List[Union[str, _models.DaysOfWeek]]] = None, weeks_of_month: Optional[List[Union[str, _models.WeeksOfMonth]]] = None, day_of_month: Optional[int] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The properties of the schedule.

All required parameters must be populated in order to send to Azure.

Variables
  • frequency (str or ScheduleFrequency) – Frequency of the schedule. Required. Known values are: “Daily”, “Weekly”, and “Monthly”.

  • hour_of_day (int) – UTC time at which cost analysis data will be emailed.

  • days_of_week (list[str or DaysOfWeek]) – Day names in english on which cost analysis data will be emailed. This property is applicable when frequency is Weekly or Monthly.

  • weeks_of_month (list[str or WeeksOfMonth]) – Weeks in which cost analysis data will be emailed. This property is applicable when frequency is Monthly and used in combination with daysOfWeek.

  • day_of_month (int) – UTC day on which cost analysis data will be emailed. Must be between 1 and 31. This property is applicable when frequency is Monthly and overrides weeksOfMonth or daysOfWeek.

  • start_date (datetime) – The start date and time of the scheduled action (UTC). Required.

  • end_date (datetime) – The end date and time of the scheduled action (UTC). Required.

Keyword Arguments
  • frequency (str or ScheduleFrequency) – Frequency of the schedule. Required. Known values are: “Daily”, “Weekly”, and “Monthly”.

  • hour_of_day (int) – UTC time at which cost analysis data will be emailed.

  • days_of_week (list[str or DaysOfWeek]) – Day names in english on which cost analysis data will be emailed. This property is applicable when frequency is Weekly or Monthly.

  • weeks_of_month (list[str or WeeksOfMonth]) – Weeks in which cost analysis data will be emailed. This property is applicable when frequency is Monthly and used in combination with daysOfWeek.

  • day_of_month (int) – UTC day on which cost analysis data will be emailed. Must be between 1 and 31. This property is applicable when frequency is Monthly and overrides weeksOfMonth or daysOfWeek.

  • start_date (datetime) – The start date and time of the scheduled action (UTC). Required.

  • end_date (datetime) – The end date and time of the scheduled action (UTC). Required.

class azure.mgmt.costmanagement.models.ScheduledAction(*, kind: Optional[Union[str, _models.ScheduledActionKind]] = None, display_name: Optional[str] = None, file_destination: Optional[_models.FileDestination] = None, notification: Optional[_models.NotificationProperties] = None, notification_email: Optional[str] = None, schedule: Optional[_models.ScheduleProperties] = None, scope: Optional[str] = None, status: Optional[Union[str, _models.ScheduledActionStatus]] = None, view_id: Optional[str] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.ScheduledActionProxyResource

Scheduled action definition.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

  • e_tag (str) – Resource Etag.

  • kind (str or ScheduledActionKind) – Kind of the scheduled action. Known values are: “Email” and “InsightAlert”.

  • system_data (SystemData) – Kind of the scheduled action.

  • display_name (str) – Scheduled action name.

  • file_destination (FileDestination) – Destination format of the view data. This is optional.

  • notification (NotificationProperties) – Notification properties based on scheduled action kind.

  • notification_email (str) – Email address of the point of contact that should get the unsubscribe requests and notification emails.

  • schedule (ScheduleProperties) – Schedule of the scheduled action.

  • scope (str) – Cost Management scope like ‘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 ExternalBillingAccount scope, and ‘/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for ExternalSubscription scope.

  • status (str or ScheduledActionStatus) – Status of the scheduled action. Known values are: “Disabled”, “Enabled”, and “Expired”.

  • view_id (str) – Cost analysis viewId used for scheduled action. For example, ‘/providers/Microsoft.CostManagement/views/swaggerExample’.

Keyword Arguments
  • kind (str or ScheduledActionKind) – Kind of the scheduled action. Known values are: “Email” and “InsightAlert”.

  • display_name (str) – Scheduled action name.

  • file_destination (FileDestination) – Destination format of the view data. This is optional.

  • notification (NotificationProperties) – Notification properties based on scheduled action kind.

  • notification_email (str) – Email address of the point of contact that should get the unsubscribe requests and notification emails.

  • schedule (ScheduleProperties) – Schedule of the scheduled action.

  • scope (str) – Cost Management scope like ‘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 ExternalBillingAccount scope, and ‘/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for ExternalSubscription scope.

  • status (str or ScheduledActionStatus) – Status of the scheduled action. Known values are: “Disabled”, “Enabled”, and “Expired”.

  • view_id (str) – Cost analysis viewId used for scheduled action. For example, ‘/providers/Microsoft.CostManagement/views/swaggerExample’.

class azure.mgmt.costmanagement.models.ScheduledActionKind(value)[source]

Bases: str, enum.Enum

Kind of the scheduled action.

EMAIL = 'Email'

Cost analysis data will be emailed.

INSIGHT_ALERT = 'InsightAlert'

Cost anomaly information will be emailed. Available only on subscription scope at daily frequency. If no anomaly is detected on the resource, an email won’t be sent.

class azure.mgmt.costmanagement.models.ScheduledActionListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Scheduled actions list result. It contains a list of scheduled actions.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • value (list[ScheduledAction]) – The list of scheduled actions.

  • next_link (str) – The link (url) to the next page of results.

class azure.mgmt.costmanagement.models.ScheduledActionProxyResource(*, kind: Optional[Union[str, _models.ScheduledActionKind]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.ProxyResource

The Resource model definition.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”.

  • e_tag (str) – Resource Etag.

  • kind (str or ScheduledActionKind) – Kind of the scheduled action. Known values are: “Email” and “InsightAlert”.

  • system_data (SystemData) – Kind of the scheduled action.

Keyword Arguments

kind (str or ScheduledActionKind) – Kind of the scheduled action. Known values are: “Email” and “InsightAlert”.

class azure.mgmt.costmanagement.models.ScheduledActionStatus(value)[source]

Bases: str, enum.Enum

Status of the scheduled action.

DISABLED = 'Disabled'

Scheduled action is saved but will not be run.

ENABLED = 'Enabled'

Scheduled action is saved and will be run.

EXPIRED = 'Expired'

Scheduled action is expired.

class azure.mgmt.costmanagement.models.Scope(value)[source]

Bases: str, enum.Enum

Kind of the recommendation scope.

SHARED = 'Shared'

Shared scope recommendation.

SINGLE = 'Single'

Single scope recommendation.

class azure.mgmt.costmanagement.models.SharedScopeBenefitRecommendationProperties(*, look_back_period: Optional[Union[str, _models.LookBackPeriod]] = None, usage: Optional[_models.RecommendationUsageDetails] = None, term: Optional[Union[str, _models.Term]] = None, commitment_granularity: Optional[Union[str, _models.Grain]] = None, recommendation_details: Optional[_models.AllSavingsBenefitDetails] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.BenefitRecommendationProperties

The properties of the benefit recommendation when scope is ‘Shared’.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • first_consumption_date (datetime) – The first usage date used for looking back for computing the recommendations.

  • last_consumption_date (datetime) – The last usage date used for looking back for computing the recommendations.

  • look_back_period (str or LookBackPeriod) – The number of days of usage evaluated for computing the recommendations. Known values are: “Last7Days”, “Last30Days”, and “Last60Days”.

  • total_hours (int) – The total hours for which the cost is covered. Its equal to number of records in a property ‘properties/usage/charges’.

  • usage (RecommendationUsageDetails) – On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

  • arm_sku_name (str) – ARM SKU name. ‘Compute_Savings_Plan’ for SavingsPlan.

  • term (str or Term) – Term period of the benefit. For example, P1Y or P3Y. Known values are: “P1Y” and “P3Y”.

  • commitment_granularity (str or Grain) – Grain of the proposed commitment amount. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

  • currency_code (str) – An ISO 4217 currency code identifier for the costs and savings amounts.

  • cost_without_benefit (float) – The current cost without benefit, corresponds to ‘totalHours’ in the look-back period.

  • recommendation_details (AllSavingsBenefitDetails) – The details of the proposed recommendation.

  • all_recommendation_details (AllSavingsList) – The list of all benefit recommendations with the recommendation details.

  • scope (str or Scope) – Benefit scope. For example, Single or Shared. Required. Known values are: “Single” and “Shared”.

Keyword Arguments
  • look_back_period (str or LookBackPeriod) – The number of days of usage evaluated for computing the recommendations. Known values are: “Last7Days”, “Last30Days”, and “Last60Days”.

  • usage (RecommendationUsageDetails) – On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

  • term (str or Term) – Term period of the benefit. For example, P1Y or P3Y. Known values are: “P1Y” and “P3Y”.

  • commitment_granularity (str or Grain) – Grain of the proposed commitment amount. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

  • recommendation_details (AllSavingsBenefitDetails) – The details of the proposed recommendation.

class azure.mgmt.costmanagement.models.SingleScopeBenefitRecommendationProperties(*, look_back_period: Optional[Union[str, _models.LookBackPeriod]] = None, usage: Optional[_models.RecommendationUsageDetails] = None, term: Optional[Union[str, _models.Term]] = None, commitment_granularity: Optional[Union[str, _models.Grain]] = None, recommendation_details: Optional[_models.AllSavingsBenefitDetails] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.BenefitRecommendationProperties

The properties of the benefit recommendations when scope is ‘Single’.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • first_consumption_date (datetime) – The first usage date used for looking back for computing the recommendations.

  • last_consumption_date (datetime) – The last usage date used for looking back for computing the recommendations.

  • look_back_period (str or LookBackPeriod) – The number of days of usage evaluated for computing the recommendations. Known values are: “Last7Days”, “Last30Days”, and “Last60Days”.

  • total_hours (int) – The total hours for which the cost is covered. Its equal to number of records in a property ‘properties/usage/charges’.

  • usage (RecommendationUsageDetails) – On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

  • arm_sku_name (str) – ARM SKU name. ‘Compute_Savings_Plan’ for SavingsPlan.

  • term (str or Term) – Term period of the benefit. For example, P1Y or P3Y. Known values are: “P1Y” and “P3Y”.

  • commitment_granularity (str or Grain) – Grain of the proposed commitment amount. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

  • currency_code (str) – An ISO 4217 currency code identifier for the costs and savings amounts.

  • cost_without_benefit (float) – The current cost without benefit, corresponds to ‘totalHours’ in the look-back period.

  • recommendation_details (AllSavingsBenefitDetails) – The details of the proposed recommendation.

  • all_recommendation_details (AllSavingsList) – The list of all benefit recommendations with the recommendation details.

  • scope (str or Scope) – Benefit scope. For example, Single or Shared. Required. Known values are: “Single” and “Shared”.

  • subscription_id (str) – The subscription ID that this single scope recommendation is for. Applicable only if recommendation is for ‘Single’ scope.

  • resource_group (str) – The resource group that this single scope recommendation is for. Applicable only if recommendation is for ‘Single’ scope and ‘ResourceGroup’ request scope.

Keyword Arguments
  • look_back_period (str or LookBackPeriod) – The number of days of usage evaluated for computing the recommendations. Known values are: “Last7Days”, “Last30Days”, and “Last60Days”.

  • usage (RecommendationUsageDetails) – On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.

  • term (str or Term) – Term period of the benefit. For example, P1Y or P3Y. Known values are: “P1Y” and “P3Y”.

  • commitment_granularity (str or Grain) – Grain of the proposed commitment amount. Supported values: ‘Hourly’. Known values are: “Hourly”, “Daily”, and “Monthly”.

  • recommendation_details (AllSavingsBenefitDetails) – The details of the proposed recommendation.

class azure.mgmt.costmanagement.models.Status(*, status: Optional[Union[str, _models.ReportOperationStatusType]] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

The status of the long running operation.

Variables

status (str or ReportOperationStatusType) – The status of the long running operation. Known values are: “InProgress”, “Completed”, “Failed”, “Queued”, “NoDataFound”, “ReadyToDownload”, and “TimedOut”.

Keyword Arguments

status (str or ReportOperationStatusType) – The status of the long running operation. Known values are: “InProgress”, “Completed”, “Failed”, “Queued”, “NoDataFound”, “ReadyToDownload”, and “TimedOut”.

class azure.mgmt.costmanagement.models.StatusType(value)[source]

Bases: str, enum.Enum

The status of the export’s schedule. If ‘Inactive’, the export’s schedule is paused.

ACTIVE = 'Active'
INACTIVE = 'Inactive'
class azure.mgmt.costmanagement.models.SystemData(*, created_by: Optional[str] = None, created_by_type: Optional[Union[str, _models.CreatedByType]] = None, created_at: Optional[datetime.datetime] = None, last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, _models.CreatedByType]] = None, last_modified_at: Optional[datetime.datetime] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Metadata pertaining to creation and last modification of the resource.

Variables
  • created_by (str) – The identity that created the resource.

  • created_by_type (str or CreatedByType) – The type of identity that created the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • created_at (datetime) – The timestamp of resource creation (UTC).

  • last_modified_by (str) – The identity that last modified the resource.

  • last_modified_by_type (str or CreatedByType) – The type of identity that last modified the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • last_modified_at (datetime) – The timestamp of resource last modification (UTC).

Keyword Arguments
  • created_by (str) – The identity that created the resource.

  • created_by_type (str or CreatedByType) – The type of identity that created the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • created_at (datetime) – The timestamp of resource creation (UTC).

  • last_modified_by (str) – The identity that last modified the resource.

  • last_modified_by_type (str or CreatedByType) – The type of identity that last modified the resource. Known values are: “User”, “Application”, “ManagedIdentity”, and “Key”.

  • last_modified_at (datetime) – The timestamp of resource last modification (UTC).

class azure.mgmt.costmanagement.models.Term(value)[source]

Bases: str, enum.Enum

Grain which corresponds to value.

P1_Y = 'P1Y'

Benefit term is 1 year.

P3_Y = 'P3Y'

Benefit term is 3 years.

class azure.mgmt.costmanagement.models.TimeframeType(value)[source]

Bases: str, enum.Enum

The time frame for pulling data for the query. If custom, then a specific time period must be provided.

BILLING_MONTH_TO_DATE = 'BillingMonthToDate'
CUSTOM = 'Custom'
MONTH_TO_DATE = 'MonthToDate'
THE_LAST_BILLING_MONTH = 'TheLastBillingMonth'
THE_LAST_MONTH = 'TheLastMonth'
WEEK_TO_DATE = 'WeekToDate'
class azure.mgmt.costmanagement.models.View(*, e_tag: Optional[str] = None, display_name: Optional[str] = None, scope: Optional[str] = None, chart: Optional[Union[str, _models.ChartType]] = None, accumulated: Optional[Union[str, _models.AccumulatedType]] = None, metric: Optional[Union[str, _models.MetricType]] = None, kpis: Optional[List[_models.KpiProperties]] = None, pivots: Optional[List[_models.PivotProperties]] = None, type_properties_query_type: Optional[Union[str, _models.ReportType]] = None, timeframe: Optional[Union[str, _models.ReportTimeframeType]] = None, time_period: Optional[_models.ReportConfigTimePeriod] = None, data_set: Optional[_models.ReportConfigDataset] = None, include_monetary_commitment: Optional[bool] = None, **kwargs)[source]

Bases: azure.mgmt.costmanagement.models._models_py3.CostManagementProxyResource

States and configurations of Cost Analysis.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • display_name (str) – User input name of the view. Required.

  • scope (str) – Cost Management scope to save the view on. 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 ExternalBillingAccount scope, and ‘/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for ExternalSubscription scope.

  • created_on (datetime) – Date the user created this view.

  • modified_on (datetime) – Date when the user last modified this view.

  • date_range (str) – Date range of the current view.

  • currency (str) – Currency of the current view.

  • chart (str or ChartType) – Chart type of the main view in Cost Analysis. Required. Known values are: “Area”, “Line”, “StackedColumn”, “GroupedColumn”, and “Table”.

  • accumulated (str or AccumulatedType) – Show costs accumulated over time. Known values are: “true” and “false”.

  • metric (str or MetricType) – Metric to use when displaying costs. Known values are: “ActualCost”, “AmortizedCost”, and “AHUB”.

  • kpis (list[KpiProperties]) – List of KPIs to show in Cost Analysis UI.

  • pivots (list[PivotProperties]) – Configuration of 3 sub-views in the Cost Analysis UI.

  • type_properties_query_type (str or ReportType) – The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates. “Usage”

  • timeframe (str or ReportTimeframeType) – The time frame for pulling data for the report. If custom, then a specific time period must be provided. Known values are: “WeekToDate”, “MonthToDate”, “YearToDate”, and “Custom”.

  • time_period (ReportConfigTimePeriod) – Has time period for pulling data for the report.

  • data_set (ReportConfigDataset) – Has definition for data in this report config.

  • include_monetary_commitment (bool) – If true, report includes monetary commitment.

Keyword Arguments
  • e_tag (str) – eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

  • display_name (str) – User input name of the view. Required.

  • scope (str) – Cost Management scope to save the view on. 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 ExternalBillingAccount scope, and ‘/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}’ for ExternalSubscription scope.

  • chart (str or ChartType) – Chart type of the main view in Cost Analysis. Required. Known values are: “Area”, “Line”, “StackedColumn”, “GroupedColumn”, and “Table”.

  • accumulated (str or AccumulatedType) – Show costs accumulated over time. Known values are: “true” and “false”.

  • metric (str or MetricType) – Metric to use when displaying costs. Known values are: “ActualCost”, “AmortizedCost”, and “AHUB”.

  • kpis (list[KpiProperties]) – List of KPIs to show in Cost Analysis UI.

  • pivots (list[PivotProperties]) – Configuration of 3 sub-views in the Cost Analysis UI.

  • type_properties_query_type (str or ReportType) – The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates. “Usage”

  • timeframe (str or ReportTimeframeType) – The time frame for pulling data for the report. If custom, then a specific time period must be provided. Known values are: “WeekToDate”, “MonthToDate”, “YearToDate”, and “Custom”.

  • time_period (ReportConfigTimePeriod) – Has time period for pulling data for the report.

  • data_set (ReportConfigDataset) – Has definition for data in this report config.

  • include_monetary_commitment (bool) – If true, report includes monetary commitment.

class azure.mgmt.costmanagement.models.ViewListResult(**kwargs)[source]

Bases: azure.mgmt.costmanagement._serialization.Model

Result of listing views. It contains a list of available views.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • value (list[View]) – The list of views.

  • next_link (str) – The link (url) to the next page of results.

class azure.mgmt.costmanagement.models.WeeksOfMonth(value)[source]

Bases: str, enum.Enum

Weeks of month.

FIRST = 'First'
FOURTH = 'Fourth'
LAST = 'Last'
SECOND = 'Second'
THIRD = 'Third'