From 6a893457a4c6a06fb33d1f91aa96e2874065240d Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 25 May 2026 14:42:59 +0800 Subject: [PATCH 1/5] generated from swagger:79839e98308d5f290b34d60dc54fb7b11bd54377 --- .../azure-mgmt-costmanagement/CHANGELOG.md | 4 + .../azure-mgmt-costmanagement/MANIFEST.in | 9 +- .../azure-mgmt-costmanagement/README.md | 9 +- .../azure-mgmt-costmanagement/_meta.json | 11 - .../azure-mgmt-costmanagement/_metadata.json | 11 + .../apiview-properties.json | 363 + .../azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- .../azure/mgmt/costmanagement/__init__.py | 12 +- .../mgmt/costmanagement/_configuration.py | 23 +- .../costmanagement/_cost_management_client.py | 150 +- .../azure/mgmt/costmanagement/_patch.py | 1 + .../mgmt/costmanagement/_utils/__init__.py | 6 + .../serialization.py} | 695 +- .../azure/mgmt/costmanagement/_vendor.py | 30 - .../azure/mgmt/costmanagement/_version.py | 3 +- .../azure/mgmt/costmanagement/aio/__init__.py | 12 +- .../mgmt/costmanagement/aio/_configuration.py | 23 +- .../aio/_cost_management_client.py | 154 +- .../azure/mgmt/costmanagement/aio/_patch.py | 1 + .../costmanagement/aio/operations/__init__.py | 69 +- .../aio/operations/_alerts_operations.py | 136 +- .../_benefit_recommendations_operations.py | 53 +- ...enefit_utilization_summaries_operations.py | 154 +- .../aio/operations/_budgets_operations.py | 707 + .../_cost_allocation_rules_operations.py | 525 + .../aio/operations/_dimensions_operations.py | 87 +- .../aio/operations/_exports_operations.py | 301 +- .../aio/operations/_forecast_operations.py | 107 +- ...utilization_summaries_report_operations.py | 1344 + ...generate_cost_details_report_operations.py | 207 +- ...ost_report_operation_results_operations.py | 87 +- ...cost_report_operation_status_operations.py | 48 +- ...enerate_detailed_cost_report_operations.py | 117 +- ...e_reservation_details_report_operations.py | 157 +- .../aio/operations/_operations.py | 53 +- .../costmanagement/aio/operations/_patch.py | 1 + .../aio/operations/_price_sheet_operations.py | 326 +- .../aio/operations/_query_operations.py | 103 +- .../_scheduled_actions_operations.py | 382 +- .../aio/operations/_settings_operations.py | 386 + .../aio/operations/_views_operations.py | 262 +- .../mgmt/costmanagement/models/__init__.py | 447 +- .../models/_cost_management_client_enums.py | 333 +- .../mgmt/costmanagement/models/_models_py3.py | 3181 +- .../mgmt/costmanagement/models/_patch.py | 1 + .../costmanagement/operations/__init__.py | 69 +- .../operations/_alerts_operations.py | 157 +- .../_benefit_recommendations_operations.py | 60 +- ...enefit_utilization_summaries_operations.py | 182 +- .../operations/_budgets_operations.py | 815 + .../_cost_allocation_rules_operations.py | 667 + .../operations/_dimensions_operations.py | 102 +- .../operations/_exports_operations.py | 325 +- .../operations/_forecast_operations.py | 122 +- ...utilization_summaries_report_operations.py | 1534 + ...generate_cost_details_report_operations.py | 222 +- ...ost_report_operation_results_operations.py | 94 +- ...cost_report_operation_status_operations.py | 55 +- ...enerate_detailed_cost_report_operations.py | 124 +- ...e_reservation_details_report_operations.py | 172 +- .../costmanagement/operations/_operations.py | 58 +- .../mgmt/costmanagement/operations/_patch.py | 1 + .../operations/_price_sheet_operations.py | 369 +- .../operations/_query_operations.py | 118 +- .../_scheduled_actions_operations.py | 421 +- .../operations/_settings_operations.py | 489 + .../operations/_views_operations.py | 290 +- .../code_report_swagger.json | 31513 ++++++++++++++++ ...efit_recommendations_by_billing_account.py | 4 +- ...ion_summaries_report_by_billing_account.py | 47 + ...ion_summaries_report_by_billing_profile.py | 48 + ...ization_summaries_report_by_reservation.py | 47 + ...n_summaries_report_by_reservation_order.py | 46 + ...zation_summaries_report_by_savings_plan.py | 47 + ..._summaries_report_by_savings_plan_order.py | 46 + .../savings_plan_billing_account.py | 4 +- .../savings_plan_billing_profile.py | 4 +- .../savings_plan_savings_plan_id_monthly.py | 4 +- ...avings_plan_savings_plan_order_id_daily.py | 4 +- .../billing_account_alerts.py | 4 +- .../billing_account_dimensions_list.py | 4 +- ..._account_dimensions_list_expand_and_top.py | 4 +- ...ing_account_dimensions_list_with_filter.py | 4 +- .../billing_account_forecast.py | 4 +- .../billing_account_query.py | 4 +- .../billing_account_query_grouping.py | 4 +- .../billing_profile_alerts.py | 4 +- .../billing_profile_forecast.py | 4 +- ...eate_or_update_cost_subscription_budget.py | 81 + .../ea/billing_account_ea_alert_rule.py | 61 + ...unt_ea_alert_rule_reservation_id_filter.py | 71 + ...lert_rule_reserved_resource_type_filter.py | 67 + .../mca/billing_profile_alert_rule.py | 61 + ...rofile_alert_rule_reservation_id_filter.py | 71 + ...lert_rule_reserved_resource_type_filter.py | 67 + .../mca/customer_alert_rule.py | 61 + ...stomer_alert_rule_reservation_id_filter.py | 71 + ...lert_rule_reserved_resource_type_filter.py | 67 + .../budgets/delete/delete_budget.py | 41 + .../budgets/get/cost/get_cost_budget.py | 42 + .../get_reservation_utilization_alert_rule.py | 42 + .../ea/billing_account_budgets_list_ea.py | 42 + ...nt_budgets_list_ea_category_type_filter.py | 42 + .../list/ea/department_budgets_list.py | 42 + .../ea/enrollment_account_budgets_list.py | 42 + .../mca/billing_account_budgets_list_mca.py | 42 + ...t_budgets_list_mca_category_type_filter.py | 42 + .../list/mca/billing_profile_budgets_list.py | 42 + ...ofile_budgets_list_category_type_filter.py | 42 + .../budgets/list/mca/customer_budgets_list.py | 42 + ...tomer_budgets_list_category_type_filter.py | 42 + .../list/mca/invoice_section_budgets_list.py | 42 + .../rbac/management_group_budgets_list.py | 42 + .../list/rbac/resource_group_budgets_list.py | 42 + .../list/rbac/subscription_budgets_list.py | 42 + ...allocation_rule_check_name_availability.py | 45 + .../cost_allocation_rule_create.py | 64 + .../cost_allocation_rule_create_tag.py | 63 + .../cost_allocation_rule_delete.py | 41 + .../cost_allocation_rule_get.py | 42 + .../cost_allocation_rules_list.py | 42 + ...operation_results_by_subscription_scope.py | 4 +- .../generated_samples/department_alerts.py | 4 +- .../department_dimensions_list.py | 4 +- ...partment_dimensions_list_expand_and_top.py | 4 +- .../department_dimensions_list_with_filter.py | 4 +- .../generated_samples/department_forecast.py | 4 +- .../generated_samples/department_query.py | 4 +- .../department_query_grouping.py | 4 +- .../dismiss_resource_group_alerts.py | 4 +- .../dismiss_subscription_alerts.py | 4 +- .../ea_price_sheet_for_billing_period.py | 42 + .../enrollment_account_alerts.py | 4 +- .../enrollment_account_dimensions_list.py | 4 +- ..._account_dimensions_list_expand_and_top.py | 4 +- ...ent_account_dimensions_list_with_filter.py | 4 +- .../enrollment_account_forecast.py | 4 +- .../enrollment_account_query.py | 4 +- .../enrollment_account_query_grouping.py | 4 +- ...ort_create_or_update_by_billing_account.py | 22 +- ...ate_or_update_by_billing_account_custom.py | 68 + ...te_or_update_by_billing_account_monthly.py | 71 + ...or_update_by_billing_account_pricesheet.py | 71 + ..._by_billing_account_reservation_details.py | 71 + ...ling_account_reservation_recommendation.py | 80 + ...illing_account_reservation_transactions.py | 71 + .../export_create_or_update_by_department.py | 24 +- ..._create_or_update_by_enrollment_account.py | 22 +- ...rt_create_or_update_by_management_group.py | 22 +- ...port_create_or_update_by_resource_group.py | 22 +- ...export_create_or_update_by_subscription.py | 22 +- .../export_delete_by_billing_account.py | 4 +- .../export_delete_by_department.py | 4 +- .../export_delete_by_enrollment_account.py | 4 +- .../export_delete_by_management_group.py | 4 +- .../export_delete_by_resource_group.py | 4 +- .../export_delete_by_subscription.py | 4 +- .../export_get_by_billing_account.py | 4 +- .../export_get_by_department.py | 4 +- .../export_get_by_enrollment_account.py | 4 +- .../export_get_by_management_group.py | 4 +- .../export_get_by_resource_group.py | 4 +- .../export_get_by_subscription.py | 4 +- .../export_run_by_billing_account.py | 4 +- ...ling_account_with_optional_request_body.py | 41 + .../export_run_by_department.py | 4 +- .../export_run_by_enrollment_account.py | 4 +- .../export_run_by_management_group.py | 4 +- .../export_run_by_resource_group.py | 4 +- .../export_run_by_subscription.py | 4 +- ...port_run_history_get_by_billing_account.py | 4 +- .../export_run_history_get_by_department.py | 4 +- ...t_run_history_get_by_enrollment_account.py | 4 +- ...ort_run_history_get_by_management_group.py | 4 +- ...xport_run_history_get_by_resource_group.py | 4 +- .../export_run_history_get_by_subscription.py | 4 +- .../exports_get_by_billing_account.py | 4 +- .../exports_get_by_department.py | 4 +- .../exports_get_by_enrollment_account.py | 4 +- .../exports_get_by_management_group.py | 4 +- .../exports_get_by_resource_group.py | 4 +- .../exports_get_by_subscription.py | 4 +- .../external_billing_account_alerts.py | 4 +- .../external_billing_account_forecast.py | 4 +- .../external_billing_accounts_dimensions.py | 4 +- .../external_billing_accounts_query.py | 4 +- .../external_subscription_alerts.py | 4 +- .../external_subscription_forecast.py | 4 +- .../external_subscriptions_dimensions.py | 4 +- .../external_subscriptions_query.py | 4 +- ...e_agreement_customer_and_billing_period.py | 4 +- ...eport_by_billing_profile_and_invoice_id.py | 4 +- ..._profile_and_invoice_id_and_customer_id.py | 4 +- ...ails_report_by_customer_and_time_period.py | 4 +- ...s_report_by_departments_and_time_period.py | 4 +- ..._by_enrollment_accounts_and_time_period.py | 4 +- ..._report_by_subscription_and_time_period.py | 4 +- ...lling_account_legacy_and_billing_period.py | 4 +- ...eport_by_billing_profile_and_invoice_id.py | 4 +- ..._profile_and_invoice_id_and_customer_id.py | 4 +- ...cost_report_by_customer_and_time_period.py | 4 +- ..._report_by_subscription_and_time_period.py | 4 +- ...operation_results_by_subscription_scope.py | 4 +- ..._operation_status_by_subscription_scope.py | 4 +- ...ation_details_report_by_billing_account.py | 4 +- ...ation_details_report_by_billing_profile.py | 4 +- .../invoice_section_alerts.py | 4 +- .../invoice_section_forecast.py | 4 +- .../management_group_dimensions_list.py | 4 +- ...nt_group_dimensions_list_expand_and_top.py | 4 +- ...ement_group_dimensions_list_with_filter.py | 4 +- .../management_group_query.py | 4 +- .../management_group_query_grouping.py | 4 +- .../mca_billing_account_dimensions_list.py | 4 +- ..._account_dimensions_list_expand_and_top.py | 4 +- ...ing_account_dimensions_list_with_filter.py | 4 +- .../mca_billing_account_query.py | 4 +- .../mca_billing_account_query_grouping.py | 4 +- .../mca_billing_profile_dimensions_list.py | 4 +- ..._profile_dimensions_list_expand_and_top.py | 4 +- ...ing_profile_dimensions_list_with_filter.py | 4 +- .../mca_billing_profile_query.py | 4 +- .../mca_billing_profile_query_grouping.py | 4 +- .../mca_customer_dimensions_list.py | 4 +- ...customer_dimensions_list_expand_and_top.py | 4 +- ...ca_customer_dimensions_list_with_filter.py | 4 +- .../generated_samples/mca_customer_query.py | 4 +- .../mca_customer_query_grouping.py | 4 +- .../mca_invoice_section_dimensions_list.py | 4 +- ..._section_dimensions_list_expand_and_top.py | 4 +- ...ice_section_dimensions_list_with_filter.py | 4 +- .../mca_invoice_section_query.py | 4 +- .../mca_invoice_section_query_grouping.py | 4 +- .../generated_samples/operation_list.py | 4 +- .../generated_samples/pricesheet_download.py | 6 +- .../pricesheet_download_by_billing_profile.py | 4 +- .../generated_samples/private_view.py | 4 +- .../private_view_create_or_update.py | 4 +- .../generated_samples/private_view_delete.py | 4 +- .../generated_samples/private_view_list.py | 4 +- .../resource_group_alerts.py | 4 +- .../resource_group_dimensions_list.py | 4 +- .../resource_group_forecast.py | 4 +- .../generated_samples/resource_group_query.py | 4 +- .../resource_group_query_grouping.py | 4 +- ...ame_availabilityprivatescheduled_action.py | 4 +- ...name_availabilitysharedscheduled_action.py | 4 +- ...scheduled_actioncreate_or_updateprivate.py | 4 +- .../scheduled_actioncreate_or_updateshared.py | 4 +- .../scheduled_actiondeleteprivate.py | 4 +- .../scheduled_actiondeleteshared.py | 4 +- .../scheduled_actiongetprivate.py | 4 +- .../scheduled_actiongetshared.py | 4 +- ...tioninsight_alertcreate_or_updateshared.py | 4 +- .../scheduled_actionsend_nowprivate.py | 4 +- .../scheduled_actionsend_nowshared.py | 4 +- ...cheduled_actionslist_with_filterprivate.py | 4 +- ...scheduled_actionslist_with_filtershared.py | 4 +- .../scheduled_actionslistprivate.py | 4 +- .../scheduled_actionslistshared.py | 4 +- .../generated_samples/settingdelete.py | 41 + .../generated_samples/settingget.py | 42 + .../generated_samples/settings_list.py | 41 + .../settingscreate_or_update.py | 43 + .../single_resource_group_alert.py | 4 +- .../single_subscription_alert.py | 4 +- .../generated_samples/subscription_alerts.py | 4 +- .../subscription_dimensions_list.py | 4 +- .../subscription_forecast.py | 4 +- .../generated_samples/subscription_query.py | 4 +- .../subscription_query_grouping.py | 4 +- .../view_by_resource_group.py | 4 +- ...view_create_or_update_by_resource_group.py | 4 +- .../view_delete_by_resource_group.py | 4 +- .../view_list_by_resource_group.py | 4 +- .../generated_tests/conftest.py | 35 + .../test_cost_management_alerts_operations.py | 102 + ...cost_management_alerts_operations_async.py | 103 + ...ment_benefit_recommendations_operations.py | 30 + ...enefit_recommendations_operations_async.py | 31 + ...enefit_utilization_summaries_operations.py | 65 + ..._utilization_summaries_operations_async.py | 66 + ...test_cost_management_budgets_operations.py | 101 + ...ost_management_budgets_operations_async.py | 102 + ...gement_cost_allocation_rules_operations.py | 100 + ..._cost_allocation_rules_operations_async.py | 101 + ...t_cost_management_dimensions_operations.py | 42 + ..._management_dimensions_operations_async.py | 43 + ...test_cost_management_exports_operations.py | 195 + ...ost_management_exports_operations_async.py | 196 + ...est_cost_management_forecast_operations.py | 78 + ...st_management_forecast_operations_async.py | 79 + ...utilization_summaries_report_operations.py | 150 + ...ation_summaries_report_operations_async.py | 171 + ...generate_cost_details_report_operations.py | 48 + ...te_cost_details_report_operations_async.py | 53 + ...ost_report_operation_results_operations.py | 31 + ...port_operation_results_operations_async.py | 34 + ...cost_report_operation_status_operations.py | 31 + ...eport_operation_status_operations_async.py | 32 + ...enerate_detailed_cost_report_operations.py | 37 + ...e_detailed_cost_report_operations_async.py | 40 + ...e_reservation_details_report_operations.py | 46 + ...rvation_details_report_operations_async.py | 51 + .../test_cost_management_operations.py | 29 + .../test_cost_management_operations_async.py | 30 + ..._cost_management_price_sheet_operations.py | 56 + ...management_price_sheet_operations_async.py | 63 + .../test_cost_management_query_operations.py | 76 + ..._cost_management_query_operations_async.py | 77 + ...management_scheduled_actions_operations.py | 229 + ...ment_scheduled_actions_operations_async.py | 230 + ...est_cost_management_settings_operations.py | 73 + ...st_management_settings_operations_async.py | 74 + .../test_cost_management_views_operations.py | 175 + ..._cost_management_views_operations_async.py | 176 + .../azure-mgmt-costmanagement/pyproject.toml | 83 + .../sdk_packaging.toml | 9 - .../azure-mgmt-costmanagement/setup.py | 83 - 320 files changed, 52002 insertions(+), 4095 deletions(-) delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/_meta.json create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py rename sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/{_serialization.py => _utils/serialization.py} (78%) delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_vendor.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/code_report_swagger.json create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_account.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_profile.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation_order.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan_order.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/cost/create_or_update_cost_subscription_budget.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reservation_id_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reserved_resource_type_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reservation_id_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reserved_resource_type_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reservation_id_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reserved_resource_type_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/delete/delete_budget.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/cost/get_cost_budget.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/reservation_utilization/get_reservation_utilization_alert_rule.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea_category_type_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/department_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/enrollment_account_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca_category_type_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list_category_type_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list_category_type_filter.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/invoice_section_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/management_group_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/resource_group_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/subscription_budgets_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/sdk_packaging.toml delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/setup.py diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md index 119b38ef45a5..6c7995cd4bcf 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md +++ b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 4.1.0 (2026-05-25) + +skip changelog generation + ## 4.0.1 (2023-07-19) ### Bugs Fixed diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/MANIFEST.in b/sdk/costmanagement/azure-mgmt-costmanagement/MANIFEST.in index 2a51a90b5601..907147f36a54 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/MANIFEST.in +++ b/sdk/costmanagement/azure-mgmt-costmanagement/MANIFEST.in @@ -1,8 +1,7 @@ -include _meta.json -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/costmanagement/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/README.md b/sdk/costmanagement/azure-mgmt-costmanagement/README.md index deec30aa11e0..db7f0ac9822b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/README.md +++ b/sdk/costmanagement/azure-mgmt-costmanagement/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Cost Management Client Library. -This package has been tested with Python 3.7+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.7+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -55,6 +55,3 @@ Code samples for this package can be found at: If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. - - - diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/_meta.json b/sdk/costmanagement/azure-mgmt-costmanagement/_meta.json deleted file mode 100644 index 7c83f312205c..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "493aa7224fd65fe1e5b4cff59bcae5c6cdf4525e", - "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.9.2", - "use": [ - "@autorest/python@6.6.0", - "@autorest/modelerfour@4.24.3" - ], - "autorest_command": "autorest specification/cost-management/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2022-10 --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", - "readme": "specification/cost-management/resource-manager/readme.md" -} \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json b/sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json new file mode 100644 index 000000000000..55726a3f53d8 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json @@ -0,0 +1,11 @@ +{ + "commit": "79839e98308d5f290b34d60dc54fb7b11bd54377", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest": "3.10.2", + "use": [ + "@autorest/python@6.50.0", + "@autorest/modelerfour@4.27.0" + ], + "autorest_command": "autorest specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-costmanagement\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "readme": "specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/readme.md" +} \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json b/sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json new file mode 100644 index 000000000000..4ca91888eaef --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json @@ -0,0 +1,363 @@ +{ + "CrossLanguagePackageId": null, + "CrossLanguageDefinitionId": { + "azure.mgmt.costmanagement.models.CostManagementProxyResource": null, + "azure.mgmt.costmanagement.models.Alert": null, + "azure.mgmt.costmanagement.models.AlertPropertiesDefinition": null, + "azure.mgmt.costmanagement.models.AlertPropertiesDetails": null, + "azure.mgmt.costmanagement.models.AlertsResult": null, + "azure.mgmt.costmanagement.models.AllSavingsBenefitDetails": null, + "azure.mgmt.costmanagement.models.AllSavingsList": null, + "azure.mgmt.costmanagement.models.AsyncOperationStatusProperties": null, + "azure.mgmt.costmanagement.models.Resource": null, + "azure.mgmt.costmanagement.models.BenefitResource": null, + "azure.mgmt.costmanagement.models.BenefitRecommendationModel": null, + "azure.mgmt.costmanagement.models.BenefitRecommendationProperties": null, + "azure.mgmt.costmanagement.models.BenefitRecommendationsListResult": null, + "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesListResult": null, + "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus": null, + "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest": null, + "azure.mgmt.costmanagement.models.BenefitUtilizationSummary": null, + "azure.mgmt.costmanagement.models.BenefitUtilizationSummaryProperties": null, + "azure.mgmt.costmanagement.models.BlobInfo": null, + "azure.mgmt.costmanagement.models.Budget": null, + "azure.mgmt.costmanagement.models.BudgetComparisonExpression": null, + "azure.mgmt.costmanagement.models.BudgetFilter": null, + "azure.mgmt.costmanagement.models.BudgetFilterProperties": null, + "azure.mgmt.costmanagement.models.BudgetsListResult": null, + "azure.mgmt.costmanagement.models.BudgetTimePeriod": null, + "azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest": null, + "azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse": null, + "azure.mgmt.costmanagement.models.CommonExportProperties": null, + "azure.mgmt.costmanagement.models.CostAllocationProportion": null, + "azure.mgmt.costmanagement.models.CostAllocationResource": null, + "azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest": null, + "azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse": null, + "azure.mgmt.costmanagement.models.CostAllocationRuleDefinition": null, + "azure.mgmt.costmanagement.models.CostAllocationRuleDetails": null, + "azure.mgmt.costmanagement.models.CostAllocationRuleList": null, + "azure.mgmt.costmanagement.models.CostAllocationRuleProperties": null, + "azure.mgmt.costmanagement.models.CostDetailsOperationResults": null, + "azure.mgmt.costmanagement.models.CostDetailsTimePeriod": null, + "azure.mgmt.costmanagement.models.Operation": null, + "azure.mgmt.costmanagement.models.CostManagementOperation": null, + "azure.mgmt.costmanagement.models.CostManagementResource": null, + "azure.mgmt.costmanagement.models.CurrentSpend": null, + "azure.mgmt.costmanagement.models.Dimension": null, + "azure.mgmt.costmanagement.models.DimensionsListResult": null, + "azure.mgmt.costmanagement.models.DismissAlertPayload": null, + "azure.mgmt.costmanagement.models.DownloadURL": null, + "azure.mgmt.costmanagement.models.EAPriceSheetProperties": null, + "azure.mgmt.costmanagement.models.ErrorAdditionalInfo": null, + "azure.mgmt.costmanagement.models.ErrorDetail": null, + "azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated": null, + "azure.mgmt.costmanagement.models.ErrorDetails": null, + "azure.mgmt.costmanagement.models.ErrorDetailsWithNestedDetails": null, + "azure.mgmt.costmanagement.models.ErrorResponse": null, + "azure.mgmt.costmanagement.models.ErrorResponseAutoGenerated": null, + "azure.mgmt.costmanagement.models.ErrorResponseAutoGenerated2": null, + "azure.mgmt.costmanagement.models.ErrorResponseWithNestedDetails": null, + "azure.mgmt.costmanagement.models.Export": null, + "azure.mgmt.costmanagement.models.ExportDataset": null, + "azure.mgmt.costmanagement.models.ExportDatasetConfiguration": null, + "azure.mgmt.costmanagement.models.ExportDefinition": null, + "azure.mgmt.costmanagement.models.ExportDeliveryDestination": null, + "azure.mgmt.costmanagement.models.ExportDeliveryInfo": null, + "azure.mgmt.costmanagement.models.ExportExecutionListResult": null, + "azure.mgmt.costmanagement.models.ExportListResult": null, + "azure.mgmt.costmanagement.models.ExportProperties": null, + "azure.mgmt.costmanagement.models.ExportRecurrencePeriod": null, + "azure.mgmt.costmanagement.models.ExportRun": null, + "azure.mgmt.costmanagement.models.ExportRunRequest": null, + "azure.mgmt.costmanagement.models.ExportSchedule": null, + "azure.mgmt.costmanagement.models.ExportSuspensionContext": null, + "azure.mgmt.costmanagement.models.ExportTimePeriod": null, + "azure.mgmt.costmanagement.models.FileDestination": null, + "azure.mgmt.costmanagement.models.FilterItems": null, + "azure.mgmt.costmanagement.models.ForecastAggregation": null, + "azure.mgmt.costmanagement.models.ForecastColumn": null, + "azure.mgmt.costmanagement.models.ForecastComparisonExpression": null, + "azure.mgmt.costmanagement.models.ForecastDataset": null, + "azure.mgmt.costmanagement.models.ForecastDatasetConfiguration": null, + "azure.mgmt.costmanagement.models.ForecastDefinition": null, + "azure.mgmt.costmanagement.models.ForecastFilter": null, + "azure.mgmt.costmanagement.models.ForecastResult": null, + "azure.mgmt.costmanagement.models.ForecastSpend": null, + "azure.mgmt.costmanagement.models.ForecastTimePeriod": null, + "azure.mgmt.costmanagement.models.GenerateCostDetailsReportErrorResponse": null, + "azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition": null, + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition": null, + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportErrorResponse": null, + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult": null, + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses": null, + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportTimePeriod": null, + "azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummary": null, + "azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummaryProperties": null, + "azure.mgmt.costmanagement.models.KpiProperties": null, + "azure.mgmt.costmanagement.models.MCAPriceSheetProperties": null, + "azure.mgmt.costmanagement.models.Notification": null, + "azure.mgmt.costmanagement.models.NotificationProperties": null, + "azure.mgmt.costmanagement.models.OperationDisplay": null, + "azure.mgmt.costmanagement.models.OperationListResult": null, + "azure.mgmt.costmanagement.models.OperationStatus": null, + "azure.mgmt.costmanagement.models.OperationStatusAutoGenerated": null, + "azure.mgmt.costmanagement.models.PivotProperties": null, + "azure.mgmt.costmanagement.models.PricesheetDownloadProperties": null, + "azure.mgmt.costmanagement.models.ProxyResource": null, + "azure.mgmt.costmanagement.models.QueryAggregation": null, + "azure.mgmt.costmanagement.models.QueryColumn": null, + "azure.mgmt.costmanagement.models.QueryComparisonExpression": null, + "azure.mgmt.costmanagement.models.QueryDataset": null, + "azure.mgmt.costmanagement.models.QueryDatasetConfiguration": null, + "azure.mgmt.costmanagement.models.QueryDefinition": null, + "azure.mgmt.costmanagement.models.QueryFilter": null, + "azure.mgmt.costmanagement.models.QueryGrouping": null, + "azure.mgmt.costmanagement.models.QueryResult": null, + "azure.mgmt.costmanagement.models.QueryTimePeriod": null, + "azure.mgmt.costmanagement.models.RecommendationUsageDetails": null, + "azure.mgmt.costmanagement.models.ReportConfigAggregation": null, + "azure.mgmt.costmanagement.models.ReportConfigComparisonExpression": null, + "azure.mgmt.costmanagement.models.ReportConfigDataset": null, + "azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration": null, + "azure.mgmt.costmanagement.models.ReportConfigFilter": null, + "azure.mgmt.costmanagement.models.ReportConfigGrouping": null, + "azure.mgmt.costmanagement.models.ReportConfigSorting": null, + "azure.mgmt.costmanagement.models.ReportConfigTimePeriod": null, + "azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummary": null, + "azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummaryProperties": null, + "azure.mgmt.costmanagement.models.ScheduledActionProxyResource": null, + "azure.mgmt.costmanagement.models.ScheduledAction": null, + "azure.mgmt.costmanagement.models.ScheduledActionListResult": null, + "azure.mgmt.costmanagement.models.ScheduleProperties": null, + "azure.mgmt.costmanagement.models.Setting": null, + "azure.mgmt.costmanagement.models.SettingsListResult": null, + "azure.mgmt.costmanagement.models.SharedScopeBenefitRecommendationProperties": null, + "azure.mgmt.costmanagement.models.SingleScopeBenefitRecommendationProperties": null, + "azure.mgmt.costmanagement.models.SourceCostAllocationResource": null, + "azure.mgmt.costmanagement.models.Status": null, + "azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity": null, + "azure.mgmt.costmanagement.models.SystemData": null, + "azure.mgmt.costmanagement.models.TagInheritanceProperties": null, + "azure.mgmt.costmanagement.models.TagInheritanceSetting": null, + "azure.mgmt.costmanagement.models.TargetCostAllocationResource": null, + "azure.mgmt.costmanagement.models.View": null, + "azure.mgmt.costmanagement.models.ViewListResult": null, + "azure.mgmt.costmanagement.models.Origin": null, + "azure.mgmt.costmanagement.models.ActionType": null, + "azure.mgmt.costmanagement.models.CostAllocationResourceType": null, + "azure.mgmt.costmanagement.models.CostAllocationPolicyType": null, + "azure.mgmt.costmanagement.models.RuleStatus": null, + "azure.mgmt.costmanagement.models.BenefitKind": null, + "azure.mgmt.costmanagement.models.LookBackPeriod": null, + "azure.mgmt.costmanagement.models.Grain": null, + "azure.mgmt.costmanagement.models.Term": null, + "azure.mgmt.costmanagement.models.Scope": null, + "azure.mgmt.costmanagement.models.BudgetOperatorType": null, + "azure.mgmt.costmanagement.models.CategoryType": null, + "azure.mgmt.costmanagement.models.TimeGrainType": null, + "azure.mgmt.costmanagement.models.BudgetNotificationOperatorType": null, + "azure.mgmt.costmanagement.models.Frequency": null, + "azure.mgmt.costmanagement.models.ThresholdType": null, + "azure.mgmt.costmanagement.models.CultureCode": null, + "azure.mgmt.costmanagement.models.FilterItemNames": null, + "azure.mgmt.costmanagement.models.ExecutionType": null, + "azure.mgmt.costmanagement.models.ExecutionStatus": null, + "azure.mgmt.costmanagement.models.FormatType": null, + "azure.mgmt.costmanagement.models.DestinationType": null, + "azure.mgmt.costmanagement.models.ExportType": null, + "azure.mgmt.costmanagement.models.TimeframeType": null, + "azure.mgmt.costmanagement.models.GranularityType": null, + "azure.mgmt.costmanagement.models.DataOverwriteBehaviorType": null, + "azure.mgmt.costmanagement.models.CompressionModeType": null, + "azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType": null, + "azure.mgmt.costmanagement.models.StatusType": null, + "azure.mgmt.costmanagement.models.RecurrenceType": null, + "azure.mgmt.costmanagement.models.QueryColumnType": null, + "azure.mgmt.costmanagement.models.ReportConfigSortingType": null, + "azure.mgmt.costmanagement.models.OperatorType": null, + "azure.mgmt.costmanagement.models.KpiType": null, + "azure.mgmt.costmanagement.models.PivotType": null, + "azure.mgmt.costmanagement.models.ChartType": null, + "azure.mgmt.costmanagement.models.AccumulatedType": null, + "azure.mgmt.costmanagement.models.MetricType": null, + "azure.mgmt.costmanagement.models.ReportType": null, + "azure.mgmt.costmanagement.models.ReportTimeframeType": null, + "azure.mgmt.costmanagement.models.ReportGranularityType": null, + "azure.mgmt.costmanagement.models.FunctionType": null, + "azure.mgmt.costmanagement.models.AlertType": null, + "azure.mgmt.costmanagement.models.AlertCategory": null, + "azure.mgmt.costmanagement.models.AlertCriteria": null, + "azure.mgmt.costmanagement.models.AlertSource": null, + "azure.mgmt.costmanagement.models.AlertTimeGrainType": null, + "azure.mgmt.costmanagement.models.AlertOperator": null, + "azure.mgmt.costmanagement.models.AlertStatus": null, + "azure.mgmt.costmanagement.models.ForecastOperatorType": null, + "azure.mgmt.costmanagement.models.QueryOperatorType": null, + "azure.mgmt.costmanagement.models.FileFormat": null, + "azure.mgmt.costmanagement.models.DaysOfWeek": null, + "azure.mgmt.costmanagement.models.WeeksOfMonth": null, + "azure.mgmt.costmanagement.models.ScheduledActionKind": null, + "azure.mgmt.costmanagement.models.CreatedByType": null, + "azure.mgmt.costmanagement.models.ScheduleFrequency": null, + "azure.mgmt.costmanagement.models.ScheduledActionStatus": null, + "azure.mgmt.costmanagement.models.SettingsKind": null, + "azure.mgmt.costmanagement.models.Reason": null, + "azure.mgmt.costmanagement.models.GrainParameter": null, + "azure.mgmt.costmanagement.models.OperationStatusType": null, + "azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema": null, + "azure.mgmt.costmanagement.models.CostDetailsMetricType": null, + "azure.mgmt.costmanagement.models.CostDetailsStatusType": null, + "azure.mgmt.costmanagement.models.CostDetailsDataFormat": null, + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportMetricType": null, + "azure.mgmt.costmanagement.models.ReportOperationStatusType": null, + "azure.mgmt.costmanagement.models.ExternalCloudProviderType": null, + "azure.mgmt.costmanagement.models.ForecastType": null, + "azure.mgmt.costmanagement.models.ForecastTimeframe": null, + "azure.mgmt.costmanagement.models.FunctionName": null, + "azure.mgmt.costmanagement.models.ReservationReportSchema": null, + "azure.mgmt.costmanagement.models.CheckNameAvailabilityReason": null, + "azure.mgmt.costmanagement.models.SettingType": null, + "azure.mgmt.costmanagement.operations.Operations.list": null, + "azure.mgmt.costmanagement.aio.operations.Operations.list": null, + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.list": null, + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.check_name_availability": null, + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.check_name_availability": null, + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.get": null, + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.get": null, + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.create_or_update": null, + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.create_or_update": null, + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.delete": null, + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.delete": null, + "azure.mgmt.costmanagement.operations.BenefitRecommendationsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.BenefitRecommendationsOperations.list": null, + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_billing_account_id": null, + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_billing_account_id": null, + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_billing_profile_id": null, + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_billing_profile_id": null, + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_order": null, + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_order": null, + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_id": null, + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_id": null, + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account": null, + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account": null, + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile": null, + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile": null, + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id": null, + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id": null, + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id": null, + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id": null, + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id": null, + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id": null, + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id": null, + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id": null, + "azure.mgmt.costmanagement.operations.BudgetsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.list": null, + "azure.mgmt.costmanagement.operations.BudgetsOperations.get": null, + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.get": null, + "azure.mgmt.costmanagement.operations.BudgetsOperations.create_or_update": null, + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.create_or_update": null, + "azure.mgmt.costmanagement.operations.BudgetsOperations.delete": null, + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.delete": null, + "azure.mgmt.costmanagement.operations.ExportsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.list": null, + "azure.mgmt.costmanagement.operations.ExportsOperations.get": null, + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.get": null, + "azure.mgmt.costmanagement.operations.ExportsOperations.create_or_update": null, + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.create_or_update": null, + "azure.mgmt.costmanagement.operations.ExportsOperations.delete": null, + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.delete": null, + "azure.mgmt.costmanagement.operations.ExportsOperations.execute": null, + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.execute": null, + "azure.mgmt.costmanagement.operations.ExportsOperations.get_execution_history": null, + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.get_execution_history": null, + "azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations.begin_create_operation": null, + "azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations.begin_create_operation": null, + "azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations.begin_get_operation_results": null, + "azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations.begin_get_operation_results": null, + "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperations.begin_create_operation": null, + "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperations.begin_create_operation": null, + "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationResultsOperations.begin_get": null, + "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationResultsOperations.begin_get": null, + "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationStatusOperations.get": null, + "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationStatusOperations.get": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.list": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.list_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.list_by_scope": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.get": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.get": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.create_or_update": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.create_or_update": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.delete": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.delete": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.get_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.get_by_scope": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.create_or_update_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.create_or_update_by_scope": null, + "azure.mgmt.costmanagement.operations.ViewsOperations.delete_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.delete_by_scope": null, + "azure.mgmt.costmanagement.operations.AlertsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.list": null, + "azure.mgmt.costmanagement.operations.AlertsOperations.get": null, + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.get": null, + "azure.mgmt.costmanagement.operations.AlertsOperations.dismiss": null, + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.dismiss": null, + "azure.mgmt.costmanagement.operations.AlertsOperations.list_external": null, + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.list_external": null, + "azure.mgmt.costmanagement.operations.ForecastOperations.usage": null, + "azure.mgmt.costmanagement.aio.operations.ForecastOperations.usage": null, + "azure.mgmt.costmanagement.operations.ForecastOperations.external_cloud_provider_usage": null, + "azure.mgmt.costmanagement.aio.operations.ForecastOperations.external_cloud_provider_usage": null, + "azure.mgmt.costmanagement.operations.DimensionsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.DimensionsOperations.list": null, + "azure.mgmt.costmanagement.operations.DimensionsOperations.by_external_cloud_provider_type": null, + "azure.mgmt.costmanagement.aio.operations.DimensionsOperations.by_external_cloud_provider_type": null, + "azure.mgmt.costmanagement.operations.QueryOperations.usage": null, + "azure.mgmt.costmanagement.aio.operations.QueryOperations.usage": null, + "azure.mgmt.costmanagement.operations.QueryOperations.usage_by_external_cloud_provider_type": null, + "azure.mgmt.costmanagement.aio.operations.QueryOperations.usage_by_external_cloud_provider_type": null, + "azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations.begin_by_billing_account_id": null, + "azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations.begin_by_billing_account_id": null, + "azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations.begin_by_billing_profile_id": null, + "azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations.begin_by_billing_profile_id": null, + "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_invoice": null, + "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_invoice": null, + "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_billing_profile": null, + "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_billing_profile": null, + "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_billing_account": null, + "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_billing_account": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.list": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.list_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.list_by_scope": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.create_or_update": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.create_or_update": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.get": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.get": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.delete": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.delete": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.create_or_update_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.create_or_update_by_scope": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.get_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.get_by_scope": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.delete_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.delete_by_scope": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.run": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.run": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.run_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.run_by_scope": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.check_name_availability": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.check_name_availability": null, + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.check_name_availability_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.check_name_availability_by_scope": null, + "azure.mgmt.costmanagement.operations.SettingsOperations.list": null, + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.list": null, + "azure.mgmt.costmanagement.operations.SettingsOperations.create_or_update_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.create_or_update_by_scope": null, + "azure.mgmt.costmanagement.operations.SettingsOperations.get_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.get_by_scope": null, + "azure.mgmt.costmanagement.operations.SettingsOperations.delete_by_scope": null, + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.delete_by_scope": null + } +} \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py index 327688c9882a..cb3da220a6b5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._cost_management_client import CostManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._cost_management_client import CostManagementClient # type: ignore from ._version import VERSION __version__ = VERSION try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -21,6 +27,6 @@ __all__ = [ "CostManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py index 8087ca9f9c1f..dca14b609506 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py @@ -6,20 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING -from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class CostManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class CostManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CostManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,22 +26,28 @@ class CostManagementClientConfiguration(Configuration): # pylint: disable=too-m :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: - super(CostManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2022-10-01") + def __init__( + self, credential: "TokenCredential", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") self.credential = credential + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-costmanagement/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) def _configure(self, **kwargs: Any) -> None: @@ -51,9 +56,9 @@ def _configure(self, **kwargs: Any) -> None: self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: self.authentication_policy = ARMChallengeAuthenticationPolicy( diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py index 0e26e2fa3291..15942a93116a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py @@ -7,21 +7,29 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast +from typing_extensions import Self +from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient +from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from ._configuration import CostManagementClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( AlertsOperations, BenefitRecommendationsOperations, BenefitUtilizationSummariesOperations, + BudgetsOperations, + CostAllocationRulesOperations, DimensionsOperations, ExportsOperations, ForecastOperations, + GenerateBenefitUtilizationSummariesReportOperations, GenerateCostDetailsReportOperations, GenerateDetailedCostReportOperationResultsOperations, GenerateDetailedCostReportOperationStatusOperations, @@ -31,34 +39,36 @@ PriceSheetOperations, QueryOperations, ScheduledActionsOperations, + SettingsOperations, ViewsOperations, ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class CostManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class CostManagementClient: # pylint: disable=too-many-instance-attributes """CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. :ivar operations: Operations operations :vartype operations: azure.mgmt.costmanagement.operations.Operations - :ivar views: ViewsOperations operations - :vartype views: azure.mgmt.costmanagement.operations.ViewsOperations - :ivar alerts: AlertsOperations operations - :vartype alerts: azure.mgmt.costmanagement.operations.AlertsOperations - :ivar forecast: ForecastOperations operations - :vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations - :ivar dimensions: DimensionsOperations operations - :vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations - :ivar query: QueryOperations operations - :vartype query: azure.mgmt.costmanagement.operations.QueryOperations - :ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations - operations - :vartype generate_reservation_details_report: - azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations + :ivar cost_allocation_rules: CostAllocationRulesOperations operations + :vartype cost_allocation_rules: + azure.mgmt.costmanagement.operations.CostAllocationRulesOperations + :ivar benefit_recommendations: BenefitRecommendationsOperations operations + :vartype benefit_recommendations: + azure.mgmt.costmanagement.operations.BenefitRecommendationsOperations + :ivar benefit_utilization_summaries: BenefitUtilizationSummariesOperations operations + :vartype benefit_utilization_summaries: + azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations + :ivar generate_benefit_utilization_summaries_report: + GenerateBenefitUtilizationSummariesReportOperations operations + :vartype generate_benefit_utilization_summaries_report: + azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations + :ivar budgets: BudgetsOperations operations + :vartype budgets: azure.mgmt.costmanagement.operations.BudgetsOperations :ivar exports: ExportsOperations operations :vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations :ivar generate_cost_details_report: GenerateCostDetailsReportOperations operations @@ -75,21 +85,34 @@ class CostManagementClient: # pylint: disable=client-accepts-api-version-keywor GenerateDetailedCostReportOperationStatusOperations operations :vartype generate_detailed_cost_report_operation_status: azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationStatusOperations + :ivar views: ViewsOperations operations + :vartype views: azure.mgmt.costmanagement.operations.ViewsOperations + :ivar alerts: AlertsOperations operations + :vartype alerts: azure.mgmt.costmanagement.operations.AlertsOperations + :ivar forecast: ForecastOperations operations + :vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations + :ivar dimensions: DimensionsOperations operations + :vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations + :ivar query: QueryOperations operations + :vartype query: azure.mgmt.costmanagement.operations.QueryOperations + :ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations + operations + :vartype generate_reservation_details_report: + azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations :ivar price_sheet: PriceSheetOperations operations :vartype price_sheet: azure.mgmt.costmanagement.operations.PriceSheetOperations :ivar scheduled_actions: ScheduledActionsOperations operations :vartype scheduled_actions: azure.mgmt.costmanagement.operations.ScheduledActionsOperations - :ivar benefit_recommendations: BenefitRecommendationsOperations operations - :vartype benefit_recommendations: - azure.mgmt.costmanagement.operations.BenefitRecommendationsOperations - :ivar benefit_utilization_summaries: BenefitUtilizationSummariesOperations operations - :vartype benefit_utilization_summaries: - azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations + :ivar settings: SettingsOperations operations + :vartype settings: azure.mgmt.costmanagement.operations.SettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -97,24 +120,60 @@ class CostManagementClient: # pylint: disable=client-accepts-api-version-keywor """ def __init__( - self, credential: "TokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any + self, + credential: "TokenCredential", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: - self._config = CostManagementClientConfiguration(credential=credential, **kwargs) - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) + self._config = CostManagementClientConfiguration( + credential=credential, cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs + ) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + ARMAutoResourceProviderRegistrationPolicy(), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) - self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) - self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize) - self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.generate_reservation_details_report = GenerateReservationDetailsReportOperations( + self.cost_allocation_rules = CostAllocationRulesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.benefit_recommendations = BenefitRecommendationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.generate_benefit_utilization_summaries_report = GenerateBenefitUtilizationSummariesReportOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.budgets = BudgetsOperations(self._client, self._config, self._serialize, self._deserialize) self.exports = ExportsOperations(self._client, self._config, self._serialize, self._deserialize) self.generate_cost_details_report = GenerateCostDetailsReportOperations( self._client, self._config, self._serialize, self._deserialize @@ -128,18 +187,21 @@ def __init__( self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations( self._client, self._config, self._serialize, self._deserialize ) - self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize) - self.scheduled_actions = ScheduledActionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.benefit_recommendations = BenefitRecommendationsOperations( + self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) + self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) + self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize) + self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) + self.generate_reservation_details_report = GenerateReservationDetailsReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( + self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize) + self.scheduled_actions = ScheduledActionsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.settings = SettingsOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -159,12 +221,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: request_copy = deepcopy(request) request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: self._client.close() - def __enter__(self) -> "CostManagementClient": + def __enter__(self) -> Self: self._client.__enter__() return self diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py new file mode 100644 index 000000000000..0af9b28f6607 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_serialization.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py similarity index 78% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_serialization.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py index 842ae727fbbc..6da830e0cf4a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_serialization.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py @@ -1,30 +1,12 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -# pylint: skip-file # pyright: reportUnnecessaryTypeIgnoreComment=false from base64 import b64decode, b64encode @@ -39,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -48,11 +29,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, - List, - Mapping, ) try: @@ -62,13 +39,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self -from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback -from azure.core.serialization import NULL as AzureCoreNull +from azure.core.exceptions import DeserializationError, SerializationError +from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -91,6 +68,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: :param data: Input, could be bytes or stream (will be decoded with UTF8) or text :type data: str or bytes or IO :param str content_type: The content type. + :return: The deserialized data. + :rtype: object """ if hasattr(data, "read"): # Assume a stream @@ -112,7 +91,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: try: return json.loads(data_as_str) except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) + raise DeserializationError("JSON is invalid: {}".format(err), err) from err elif "xml" in (content_type or []): try: @@ -124,7 +103,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: pass return ET.fromstring(data_as_str) # nosec - except ET.ParseError: + except ET.ParseError as err: # It might be because the server has an issue, and returned JSON with # content-type XML.... # So let's try a JSON load, and if it's still broken @@ -143,7 +122,9 @@ def _json_attemp(data): # The function hack is because Py2.7 messes up with exception # context otherwise. _LOGGER.critical("Wasn't XML not JSON, failing") - raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) @classmethod @@ -153,6 +134,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], Use bytes and headers to NOT use any requests/aiohttp or whatever specific implementation. Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object """ # Try to use content-type from headers if available content_type = None @@ -170,13 +156,6 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], return None -try: - basestring # type: ignore - unicode_str = unicode # type: ignore -except NameError: - basestring = str - unicode_str = str - _LOGGER = logging.getLogger(__name__) try: @@ -184,80 +163,31 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0.""" - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation.""" - return "Z" - - def dst(self, dt): - """No daylight saving for UTC.""" - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset): - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? None: - self.additional_properties: Dict[str, Any] = {} - for k in kwargs: + self.additional_properties: Optional[dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) elif k in self._validation and self._validation[k].get("readonly", False): @@ -305,13 +242,23 @@ def __init__(self, **kwargs: Any) -> None: setattr(self, k, kwargs[k]) def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ return not self.__eq__(other) def __str__(self) -> str: @@ -331,7 +278,11 @@ def is_xml_model(cls) -> bool: @classmethod def _create_xml_node(cls): - """Create XML node.""" + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ try: xml_map = cls._xml_map # type: ignore except AttributeError: @@ -340,7 +291,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: - """Return the JSON that would be sent to azure from this model. + """Return the JSON that would be sent to server from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -351,12 +302,14 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -385,12 +338,15 @@ def my_key_transformer(key, attr_desc, value): If you want XML serialization, you can pass the kwargs is_xml=True. + :param bool keep_readonly: If you want to serialize the readonly attributes :param function key_transformer: A key transformer function. :returns: A dict JSON compatible object :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) @classmethod def _infer_class_models(cls): @@ -400,30 +356,31 @@ def _infer_class_models(cls): client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} if cls.__name__ not in client_models: raise ValueError("Not Autorest generated code") - except Exception: + except Exception: # pylint: disable=broad-exception-caught # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. client_models = {cls.__name__: cls} return client_models @classmethod - def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) - return deserializer(cls.__name__, data, content_type=content_type) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -431,9 +388,11 @@ def from_dict( and last_rest_key_case_insensitive_extractor) :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -445,7 +404,7 @@ def from_dict( if key_extractors is None else key_extractors ) - return deserializer(cls.__name__, data, content_type=content_type) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def _flatten_subtype(cls, key, objects): @@ -453,21 +412,25 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class """ for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): subtype_value = None if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -506,11 +469,13 @@ def _decode_attribute_map_key(key): inside the received data. :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str """ return key.replace("\\.", ".") -class Serializer(object): +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -545,7 +510,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -561,17 +526,20 @@ def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True - def _serialize(self, target_obj, data_type=None, **kwargs): + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): """Serialize data into a string according to type. - :param target_obj: The data to be serialized. + :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. + :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) keep_readonly = kwargs.get("keep_readonly", False) @@ -597,17 +565,19 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized = {} if is_xml_model_serialization: - serialized = target_obj._create_xml_node() + serialized = target_obj._create_xml_node() # pylint: disable=protected-access try: - attributes = target_obj._attribute_map + attributes = target_obj._attribute_map # pylint: disable=protected-access for attr, attr_desc in attributes.items(): attr_name = attr - if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): continue if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -638,7 +608,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if isinstance(new_attr, list): serialized.extend(new_attr) # type: ignore elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. if "name" not in getattr(orig_attr, "_xml_map", {}): splitted_tag = new_attr.tag.split("}") if len(splitted_tag) == 2: # Namespace @@ -649,7 +620,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): else: # That's a basic type # Integrate namespace if necessary local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) - local_node.text = unicode_str(new_attr) + local_node.text = str(new_attr) serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore @@ -662,23 +633,24 @@ def _serialize(self, target_obj, data_type=None, **kwargs): _serialized.update(_new_attr) # type: ignore _new_attr = _new_attr[k] # type: ignore _serialized = _serialized[k] - except ValueError: - continue + except ValueError as err: + if isinstance(err, SerializationError): + raise except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) - raise_with_traceback(SerializationError, msg, err) - else: - return serialized + raise SerializationError(msg) from err + return serialized def body(self, data, data_type, **kwargs): """Serialize data intended for a request body. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body """ # Just in case this is a dict @@ -707,20 +679,22 @@ def body(self, data, data_type, **kwargs): attribute_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, ] - data = deserializer._deserialize(data_type, data) + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access except DeserializationError as err: - raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + raise SerializationError("Unable to build a model: " + str(err)) from err return self._serialize(data, data_type, **kwargs) def url(self, name, data, data_type, **kwargs): """Serialize data intended for a URL path. - :param data: The data to be serialized. + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -729,30 +703,30 @@ def url(self, name, data, data_type, **kwargs): if kwargs.get("skip_quote") is True: output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return output + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output def query(self, name, data, data_type, **kwargs): """Serialize data intended for a URL query. - :param data: The data to be serialized. + :param str name: The name of the query parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter """ try: # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] - if not kwargs.get("skip_quote", False): - data = [quote(str(d), safe="") for d in data] - return str(self.serialize_iter(data, internal_data_type, **kwargs)) + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) # Not a list, regular serialization output = self.serialize_data(data, data_type, **kwargs) @@ -762,19 +736,20 @@ def query(self, name, data, data_type, **kwargs): output = str(output) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def header(self, name, data, data_type, **kwargs): """Serialize data intended for a request header. - :param data: The data to be serialized. + :param str name: The name of the header. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header """ try: if data_type in ["[str]"]: @@ -783,37 +758,36 @@ def header(self, name, data, data_type, **kwargs): output = self.serialize_data(data, data_type, **kwargs) if data_type == "bool": output = json.dumps(output) - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def serialize_data(self, data, data_type, **kwargs): """Serialize generic data according to supplied data type. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :param bool required: Whether it's essential that the data not be - empty or None - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list """ if data is None: raise ValueError("No value for given attribute") try: - if data is AzureCoreNull: + if data is CoreNull: return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) - elif data_type in self.serialize_type: + if data_type in self.serialize_type: return self.serialize_type[data_type](data, **kwargs) # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -823,12 +797,11 @@ def serialize_data(self, data, data_type, **kwargs): except (ValueError, TypeError) as err: msg = "Unable to serialize value: {!r} as type: {!r}." - raise_with_traceback(SerializationError, msg.format(data, data_type), err) - else: - return self._serialize(data, **kwargs) + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer @@ -844,23 +817,33 @@ def serialize_basic(cls, data, data_type, **kwargs): - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - is_xml bool : If set, use xml_basic_types_serializers - :param data: Object to be serialized. + :param obj data: Object to be serialized. :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): """Special handling for serializing unicode strings in Py2. Encode to UTF-8 if unicode, otherwise handle as a str. - :param data: Object to be serialized. + :param str data: Object to be serialized. :rtype: str + :return: serialized object """ try: # If I received an enum, return its value return data.value @@ -874,8 +857,7 @@ def serialize_unicode(cls, data): return data except NameError: return str(data) - else: - return str(data) + return str(data) def serialize_iter(self, data, iter_type, div=None, **kwargs): """Serialize iterable. @@ -885,13 +867,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialization_ctxt['type'] should be same as data_type. - is_xml bool : If set, serialize as XML - :param list attr: Object to be serialized. + :param list data: Object to be serialized. :param str iter_type: Type of object in the iterable. - :param bool required: Whether the objects in the iterable must - not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. + Defaults to False. :rtype: list, str + :return: serialized iterable """ if isinstance(data, str): raise SerializationError("Refuse str type as a valid iter type.") @@ -903,9 +885,14 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): for d in data: try: serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized.append(None) + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + if div: serialized = ["" if s is None else str(s) for s in serialized] serialized = div.join(serialized) @@ -941,16 +928,17 @@ def serialize_dict(self, attr, dict_type, **kwargs): :param dict attr: Object to be serialized. :param str dict_type: Type of object in the dictionary. - :param bool required: Whether the objects in the dictionary must - not be None or empty. :rtype: dict + :return: serialized dictionary """ serialization_ctxt = kwargs.get("serialization_ctxt", {}) serialized = {} for key, value in attr.items(): try: serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized[self.serialize_unicode(key)] = None if "xml" in serialization_ctxt: @@ -965,7 +953,7 @@ def serialize_dict(self, attr, dict_type, **kwargs): return serialized - def serialize_object(self, attr, **kwargs): + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Serialize a generic object. This will be handled as a dictionary. If object passed in is not a basic type (str, int, float, dict, list) it will simply be @@ -973,6 +961,7 @@ def serialize_object(self, attr, **kwargs): :param dict attr: Object to be serialized. :rtype: dict or str + :return: serialized object """ if attr is None: return None @@ -983,7 +972,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) if obj_type is _long_type: return self.serialize_long(attr) - if obj_type is unicode_str: + if obj_type is str: return self.serialize_unicode(attr) if obj_type is datetime.datetime: return self.serialize_iso(attr) @@ -997,7 +986,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_decimal(attr) # If it's a model or I know this dependency, serialize as a Model - elif obj_type in self.dependencies.values() or isinstance(attr, Model): + if obj_type in self.dependencies.values() or isinstance(attr, Model): return self._serialize(attr) if obj_type == dict: @@ -1028,56 +1017,61 @@ def serialize_enum(attr, enum_obj=None): try: enum_obj(result) # type: ignore return result - except ValueError: + except ValueError as exc: for enum_value in enum_obj: # type: ignore if enum_value.value.lower() == str(attr).lower(): return enum_value.value error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) + raise SerializationError(error.format(attr, enum_obj)) from exc @staticmethod - def serialize_bytearray(attr, **kwargs): + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument """Serialize bytearray into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ return b64encode(attr).decode() @staticmethod - def serialize_base64(attr, **kwargs): + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument """Serialize str into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ encoded = b64encode(attr).decode("ascii") return encoded.strip("=").replace("+", "-").replace("/", "_") @staticmethod - def serialize_decimal(attr, **kwargs): + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument """Serialize Decimal object to float. - :param attr: Object to be serialized. + :param decimal attr: Object to be serialized. :rtype: float + :return: serialized decimal """ return float(attr) @staticmethod - def serialize_long(attr, **kwargs): + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument """Serialize long (Py2) or int (Py3). - :param attr: Object to be serialized. + :param int attr: Object to be serialized. :rtype: int/long + :return: serialized long """ return _long_type(attr) @staticmethod - def serialize_date(attr, **kwargs): + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument """Serialize Date object into ISO-8601 formatted string. :param Date attr: Object to be serialized. :rtype: str + :return: serialized date """ if isinstance(attr, str): attr = isodate.parse_date(attr) @@ -1085,11 +1079,12 @@ def serialize_date(attr, **kwargs): return t @staticmethod - def serialize_time(attr, **kwargs): + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument """Serialize Time object into ISO-8601 formatted string. :param datetime.time attr: Object to be serialized. :rtype: str + :return: serialized time """ if isinstance(attr, str): attr = isodate.parse_time(attr) @@ -1099,30 +1094,32 @@ def serialize_time(attr, **kwargs): return t @staticmethod - def serialize_duration(attr, **kwargs): + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument """Serialize TimeDelta object into ISO-8601 formatted string. :param TimeDelta attr: Object to be serialized. :rtype: str + :return: serialized duration """ if isinstance(attr, str): attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) @staticmethod - def serialize_rfc(attr, **kwargs): + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. + :return: serialized rfc """ try: if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() - except AttributeError: - raise TypeError("RFC1123 object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( Serializer.days[utc.tm_wday], @@ -1135,12 +1132,13 @@ def serialize_rfc(attr, **kwargs): ) @staticmethod - def serialize_iso(attr, **kwargs): + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into ISO-8601 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. + :return: serialized iso """ if isinstance(attr, str): attr = isodate.parse_datetime(attr) @@ -1160,19 +1158,20 @@ def serialize_iso(attr, **kwargs): return date + microseconds + "Z" except (ValueError, OverflowError) as err: msg = "Unable to serialize datetime object." - raise_with_traceback(SerializationError, msg, err) + raise SerializationError(msg) from err except AttributeError as err: msg = "ISO-8601 object must be valid Datetime object." - raise_with_traceback(TypeError, msg, err) + raise TypeError(msg) from err @staticmethod - def serialize_unix(attr, **kwargs): + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into IntTime format. This is represented as seconds. :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid + :return: serialied unix """ if isinstance(attr, int): return attr @@ -1180,17 +1179,17 @@ def serialize_unix(attr, **kwargs): if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") return int(calendar.timegm(attr.utctimetuple())) - except AttributeError: - raise TypeError("Unix time object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc -def rest_key_extractor(attr, attr_desc, data): +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument key = attr_desc["key"] working_data = data while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1199,14 +1198,15 @@ def rest_key_extractor(attr, attr_desc, data): if working_data is None: # If at any point while following flatten JSON path see None, it means # that all properties under are None as well - # https://github.com/Azure/msrest-for-python/issues/197 return None key = ".".join(dict_keys[1:]) return working_data.get(key) -def rest_key_case_insensitive_extractor(attr, attr_desc, data): +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): key = attr_desc["key"] working_data = data @@ -1220,7 +1220,6 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): if working_data is None: # If at any point while following flatten JSON path see None, it means # that all properties under are None as well - # https://github.com/Azure/msrest-for-python/issues/197 return None key = ".".join(dict_keys[1:]) @@ -1228,17 +1227,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): return attribute_key_case_insensitive_extractor(key, None, working_data) -def last_rest_key_extractor(attr, attr_desc, data): - """Extract the attribute in "data" based on the last part of the JSON path key.""" +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_extractor(dict_keys[-1], None, data) -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) @@ -1275,7 +1286,7 @@ def _extract_name_from_internal_type(internal_type): return xml_name -def xml_key_extractor(attr, attr_desc, data): +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements if isinstance(data, dict): return None @@ -1327,22 +1338,21 @@ def xml_key_extractor(attr, attr_desc, data): if is_iter_type: if is_wrapped: return None # is_wrapped no node, we want None - else: - return [] # not wrapped, assume empty list + return [] # not wrapped, assume empty list return None # Assume it's not there, maybe an optional node. # If is_iter_type and not wrapped, return all found children if is_iter_type: if not is_wrapped: return children - else: # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name ) - return list(children[0]) # Might be empty list and that's ok. + ) + return list(children[0]) # Might be empty list and that's ok. # Here it's not a itertype, we should have found one element only or empty if len(children) > 1: @@ -1350,7 +1360,7 @@ def xml_key_extractor(attr, attr_desc, data): return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1359,9 +1369,9 @@ class Deserializer(object): basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1381,7 +1391,7 @@ def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1397,27 +1407,29 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) - def _deserialize(self, target_obj, data): + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements """Call the deserializer on a model. Data needs to be already deserialized as JSON or XML ElementTree :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: - for attr, mapconfig in data._attribute_map.items(): + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access if attr in constants: continue value = getattr(data, attr) @@ -1434,15 +1446,15 @@ def _deserialize(self, target_obj, data): response, class_name = self._classify_target(target_obj, data) - if isinstance(response, basestring): + if isinstance(response, str): return self.deserialize_data(data, response) - elif isinstance(response, type) and issubclass(response, Enum): + if isinstance(response, type) and issubclass(response, Enum): return self.deserialize_enum(data, response) - if data is None: + if data is None or data is CoreNull: return data try: - attributes = response._attribute_map # type: ignore + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access d_attrs = {} for attr, attr_desc in attributes.items(): # Check empty string. If it's not empty, someone has a real "additionalProperties"... @@ -1471,10 +1483,9 @@ def _deserialize(self, target_obj, data): d_attrs[attr] = value except (AttributeError, TypeError, KeyError) as err: msg = "Unable to deserialize to object: " + class_name # type: ignore - raise_with_traceback(DeserializationError, msg, err) - else: - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: @@ -1501,18 +1512,20 @@ def _classify_target(self, target, data): :param str target: The target object type to deserialize to. :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple """ if target is None: return None, None - if isinstance(target, basestring): + if isinstance(target, str): try: target = self.dependencies[target] except KeyError: return target, target try: - target = target._classify(data, self.dependencies) + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access except AttributeError: pass # Target is not a Model, no classify return target, target.__class__.__name__ # type: ignore @@ -1527,10 +1540,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): :param str target_obj: The target object type to deserialize to. :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object """ try: return self(target_obj, data, content_type=content_type) - except: + except: # pylint: disable=bare-except _LOGGER.debug( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1548,10 +1563,12 @@ def _unpack_content(raw_data, content_type=None): If raw_data is something else, bypass all logic and return it directly. - :param raw_data: Data to be processed. - :param content_type: How to parse if raw_data is a string/bytes. + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. :raises JSONDecodeError: If JSON is requested and parsing is impossible. :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. """ # Assume this is enough to detect a Pipeline Response without importing it context = getattr(raw_data, "context", {}) @@ -1568,31 +1585,42 @@ def _unpack_content(raw_data, content_type=None): if hasattr(raw_data, "_content_consumed"): return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) - if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore return raw_data def _instantiate_model(self, response, attrs, additional_properties=None): """Instantiate a response model passing in deserialized args. - :param response: The response model class. - :param d_attrs: The deserialized response attributes. + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. """ if callable(response): subtype = getattr(response, "_subtype_map", {}) try: - readonly = [k for k, v in response._validation.items() if v.get("readonly")] - const = [k for k, v in response._validation.items() if v.get("constant")] + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) + raise DeserializationError(msg + str(err)) from err else: try: for attr, value in attrs.items(): @@ -1601,15 +1629,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None): except Exception as exp: msg = "Unable to populate response model. " msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) + raise DeserializationError(msg) from exp - def deserialize_data(self, data, data_type): + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements """Process data for deserialization according to data type. :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ if data is None: return data @@ -1623,7 +1652,11 @@ def deserialize_data(self, data, data_type): if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): return data - is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: return None data_val = self.deserialize_type[data_type](data) @@ -1642,15 +1675,15 @@ def deserialize_data(self, data, data_type): except (ValueError, TypeError, AttributeError) as err: msg = "Unable to deserialize response data." msg += " Data: {}, {}".format(data, data_type) - raise_with_traceback(DeserializationError, msg, err) - else: - return self._deserialize(obj_type, data) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) def deserialize_iter(self, attr, iter_type): """Deserialize an iterable. :param list attr: Iterable to be deserialized. :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. :rtype: list """ if attr is None: @@ -1667,6 +1700,7 @@ def deserialize_dict(self, attr, dict_type): :param dict/list attr: Dictionary to be deserialized. Also accepts a list of key, value pairs. :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. :rtype: dict """ if isinstance(attr, list): @@ -1677,20 +1711,21 @@ def deserialize_dict(self, attr, dict_type): attr = {el.tag: el.text for el in attr} return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - def deserialize_object(self, attr, **kwargs): + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Deserialize a generic object. This will be handled as a dictionary. :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None if isinstance(attr, ET.Element): # Do no recurse on XML, just return the tree as-is return attr - if isinstance(attr, basestring): + if isinstance(attr, str): return self.deserialize_basic(attr, "str") obj_type = type(attr) if obj_type in self.basic_types: @@ -1716,11 +1751,10 @@ def deserialize_object(self, attr, **kwargs): pass return deserialized - else: - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) - def deserialize_basic(self, attr, data_type): + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements """Deserialize basic builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as @@ -1728,8 +1762,9 @@ def deserialize_basic(self, attr, data_type): :param str attr: response string to be deserialized. :param str data_type: deserialization data type. + :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1739,24 +1774,27 @@ def deserialize_basic(self, attr, data_type): if data_type == "str": # None or '', node is empty string. return "" - else: - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None if data_type == "bool": if attr in [True, False, 1, 0]: return bool(attr) - elif isinstance(attr, basestring): + if isinstance(attr, str): if attr.lower() in ["true", "1"]: return True - elif attr.lower() in ["false", "0"]: + if attr.lower() in ["false", "0"]: return False raise TypeError("Invalid boolean value: {}".format(attr)) if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): @@ -1764,6 +1802,7 @@ def deserialize_unicode(data): as a string. :param str data: response string to be deserialized. + :return: Deserialized string. :rtype: str or unicode """ # We might be here because we have an enum modeled as string, @@ -1777,8 +1816,7 @@ def deserialize_unicode(data): return data except NameError: return str(data) - else: - return str(data) + return str(data) @staticmethod def deserialize_enum(data, enum_obj): @@ -1790,6 +1828,7 @@ def deserialize_enum(data, enum_obj): :param str data: Response string to be deserialized. If this value is None or invalid it will be returned as-is. :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. :rtype: Enum """ if isinstance(data, enum_obj) or data is None: @@ -1798,12 +1837,11 @@ def deserialize_enum(data, enum_obj): data = data.value if isinstance(data, int): # Workaround. We might consider remove it in the future. - # https://github.com/Azure/azure-rest-api-specs/issues/141 try: return list(enum_obj.__members__.values())[data] - except IndexError: + except IndexError as exc: error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) + raise DeserializationError(error.format(data, enum_obj)) from exc try: return enum_obj(str(data)) except ValueError: @@ -1819,8 +1857,9 @@ def deserialize_bytearray(attr): """Deserialize string into bytearray. :param str attr: response string to be deserialized. + :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1831,8 +1870,9 @@ def deserialize_base64(attr): """Deserialize base64 encoded string into string. :param str attr: response string to be deserialized. + :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1846,24 +1886,26 @@ def deserialize_decimal(attr): """Deserialize string into Decimal object. :param str attr: response string to be deserialized. - :rtype: Decimal - :raises: DeserializationError if string format invalid. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal """ if isinstance(attr, ET.Element): attr = attr.text try: - return decimal.Decimal(attr) # type: ignore + return decimal.Decimal(str(attr)) # type: ignore except decimal.DecimalException as err: msg = "Invalid decimal {}".format(attr) - raise_with_traceback(DeserializationError, msg, err) + raise DeserializationError(msg) from err @staticmethod def deserialize_long(attr): """Deserialize string into long (Py2) or int (Py3). :param str attr: response string to be deserialized. + :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1874,8 +1916,9 @@ def deserialize_duration(attr): """Deserialize ISO-8601 formatted string into TimeDelta object. :param str attr: response string to be deserialized. + :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1883,32 +1926,33 @@ def deserialize_duration(attr): duration = isodate.parse_duration(attr) except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize duration object." - raise_with_traceback(DeserializationError, msg, err) - else: - return duration + raise DeserializationError(msg) from err + return duration @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. :param str attr: response string to be deserialized. + :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore raise DeserializationError("Date must have only digits and -. Received: %s" % attr) # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) @staticmethod def deserialize_time(attr): """Deserialize ISO-8601 formatted string into time object. :param str attr: response string to be deserialized. + :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1921,31 +1965,32 @@ def deserialize_rfc(attr): """Deserialize RFC-1123 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) except ValueError as err: msg = "Cannot deserialize to rfc datetime object." - raise_with_traceback(DeserializationError, msg, err) - else: - return date_obj + raise DeserializationError(msg) from err + return date_obj @staticmethod def deserialize_iso(attr): """Deserialize ISO-8601 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1972,9 +2017,8 @@ def deserialize_iso(attr): raise OverflowError("Hit max or min date") except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize datetime object." - raise_with_traceback(DeserializationError, msg, err) - else: - return date_obj + raise DeserializationError(msg) from err + return date_obj @staticmethod def deserialize_unix(attr): @@ -1982,15 +2026,16 @@ def deserialize_unix(attr): This is represented as seconds. :param int attr: Object to be serialized. + :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore try: + attr = int(attr) date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) except ValueError as err: msg = "Cannot deserialize to unix datetime object." - raise_with_traceback(DeserializationError, msg, err) - else: - return date_obj + raise DeserializationError(msg) from err + return date_obj diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_vendor.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_vendor.py deleted file mode 100644 index bd0df84f5319..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_vendor.py +++ /dev/null @@ -1,30 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import List, cast - -from azure.core.pipeline.transport import HttpRequest - - -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request - - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - formatted_components = cast(List[str], template.split("/")) - components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] - template = "/".join(components) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py index f4674910a502..97dd4a9776d7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py @@ -6,4 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "4.0.1" + +VERSION = "4.1.0" diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py index e631aab7dc99..8170fcf87d3a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._cost_management_client import CostManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._cost_management_client import CostManagementClient # type: ignore try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -18,6 +24,6 @@ __all__ = [ "CostManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py index 55e6f4190aa5..20f626e6c7e0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py @@ -6,20 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING -from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class CostManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class CostManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CostManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,22 +26,28 @@ class CostManagementClientConfiguration(Configuration): # pylint: disable=too-m :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: - super(CostManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2022-10-01") + def __init__( + self, credential: "AsyncTokenCredential", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") self.credential = credential + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-costmanagement/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) def _configure(self, **kwargs: Any) -> None: @@ -51,9 +56,9 @@ def _configure(self, **kwargs: Any) -> None: self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_cost_management_client.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_cost_management_client.py index daa9e01ede33..ba8b8a3f4a45 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_cost_management_client.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_cost_management_client.py @@ -7,21 +7,29 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast +from typing_extensions import Self +from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient +from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import CostManagementClientConfiguration from .operations import ( AlertsOperations, BenefitRecommendationsOperations, BenefitUtilizationSummariesOperations, + BudgetsOperations, + CostAllocationRulesOperations, DimensionsOperations, ExportsOperations, ForecastOperations, + GenerateBenefitUtilizationSummariesReportOperations, GenerateCostDetailsReportOperations, GenerateDetailedCostReportOperationResultsOperations, GenerateDetailedCostReportOperationStatusOperations, @@ -31,34 +39,36 @@ PriceSheetOperations, QueryOperations, ScheduledActionsOperations, + SettingsOperations, ViewsOperations, ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class CostManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class CostManagementClient: # pylint: disable=too-many-instance-attributes """CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. :ivar operations: Operations operations :vartype operations: azure.mgmt.costmanagement.aio.operations.Operations - :ivar views: ViewsOperations operations - :vartype views: azure.mgmt.costmanagement.aio.operations.ViewsOperations - :ivar alerts: AlertsOperations operations - :vartype alerts: azure.mgmt.costmanagement.aio.operations.AlertsOperations - :ivar forecast: ForecastOperations operations - :vartype forecast: azure.mgmt.costmanagement.aio.operations.ForecastOperations - :ivar dimensions: DimensionsOperations operations - :vartype dimensions: azure.mgmt.costmanagement.aio.operations.DimensionsOperations - :ivar query: QueryOperations operations - :vartype query: azure.mgmt.costmanagement.aio.operations.QueryOperations - :ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations - operations - :vartype generate_reservation_details_report: - azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations + :ivar cost_allocation_rules: CostAllocationRulesOperations operations + :vartype cost_allocation_rules: + azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations + :ivar benefit_recommendations: BenefitRecommendationsOperations operations + :vartype benefit_recommendations: + azure.mgmt.costmanagement.aio.operations.BenefitRecommendationsOperations + :ivar benefit_utilization_summaries: BenefitUtilizationSummariesOperations operations + :vartype benefit_utilization_summaries: + azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations + :ivar generate_benefit_utilization_summaries_report: + GenerateBenefitUtilizationSummariesReportOperations operations + :vartype generate_benefit_utilization_summaries_report: + azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations + :ivar budgets: BudgetsOperations operations + :vartype budgets: azure.mgmt.costmanagement.aio.operations.BudgetsOperations :ivar exports: ExportsOperations operations :vartype exports: azure.mgmt.costmanagement.aio.operations.ExportsOperations :ivar generate_cost_details_report: GenerateCostDetailsReportOperations operations @@ -75,21 +85,34 @@ class CostManagementClient: # pylint: disable=client-accepts-api-version-keywor GenerateDetailedCostReportOperationStatusOperations operations :vartype generate_detailed_cost_report_operation_status: azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationStatusOperations + :ivar views: ViewsOperations operations + :vartype views: azure.mgmt.costmanagement.aio.operations.ViewsOperations + :ivar alerts: AlertsOperations operations + :vartype alerts: azure.mgmt.costmanagement.aio.operations.AlertsOperations + :ivar forecast: ForecastOperations operations + :vartype forecast: azure.mgmt.costmanagement.aio.operations.ForecastOperations + :ivar dimensions: DimensionsOperations operations + :vartype dimensions: azure.mgmt.costmanagement.aio.operations.DimensionsOperations + :ivar query: QueryOperations operations + :vartype query: azure.mgmt.costmanagement.aio.operations.QueryOperations + :ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations + operations + :vartype generate_reservation_details_report: + azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations :ivar price_sheet: PriceSheetOperations operations :vartype price_sheet: azure.mgmt.costmanagement.aio.operations.PriceSheetOperations :ivar scheduled_actions: ScheduledActionsOperations operations :vartype scheduled_actions: azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations - :ivar benefit_recommendations: BenefitRecommendationsOperations operations - :vartype benefit_recommendations: - azure.mgmt.costmanagement.aio.operations.BenefitRecommendationsOperations - :ivar benefit_utilization_summaries: BenefitUtilizationSummariesOperations operations - :vartype benefit_utilization_summaries: - azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations + :ivar settings: SettingsOperations operations + :vartype settings: azure.mgmt.costmanagement.aio.operations.SettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -97,24 +120,62 @@ class CostManagementClient: # pylint: disable=client-accepts-api-version-keywor """ def __init__( - self, credential: "AsyncTokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any + self, + credential: "AsyncTokenCredential", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: - self._config = CostManagementClientConfiguration(credential=credential, **kwargs) - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) + self._config = CostManagementClientConfiguration( + credential=credential, cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs + ) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + AsyncARMAutoResourceProviderRegistrationPolicy(), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) - self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) - self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize) - self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.generate_reservation_details_report = GenerateReservationDetailsReportOperations( + self.cost_allocation_rules = CostAllocationRulesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.benefit_recommendations = BenefitRecommendationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.generate_benefit_utilization_summaries_report = GenerateBenefitUtilizationSummariesReportOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.budgets = BudgetsOperations(self._client, self._config, self._serialize, self._deserialize) self.exports = ExportsOperations(self._client, self._config, self._serialize, self._deserialize) self.generate_cost_details_report = GenerateCostDetailsReportOperations( self._client, self._config, self._serialize, self._deserialize @@ -128,18 +189,23 @@ def __init__( self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations( self._client, self._config, self._serialize, self._deserialize ) - self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize) - self.scheduled_actions = ScheduledActionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.benefit_recommendations = BenefitRecommendationsOperations( + self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) + self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) + self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize) + self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) + self.generate_reservation_details_report = GenerateReservationDetailsReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( + self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize) + self.scheduled_actions = ScheduledActionsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.settings = SettingsOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + def _send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -159,12 +225,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncH request_copy = deepcopy(request) request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "CostManagementClient": + async def __aenter__(self) -> Self: await self._client.__aenter__() return self diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py index ba3f6355c103..cf144b3ea8d6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,49 +6,59 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import Operations -from ._views_operations import ViewsOperations -from ._alerts_operations import AlertsOperations -from ._forecast_operations import ForecastOperations -from ._dimensions_operations import DimensionsOperations -from ._query_operations import QueryOperations -from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations -from ._exports_operations import ExportsOperations -from ._generate_cost_details_report_operations import GenerateCostDetailsReportOperations -from ._generate_detailed_cost_report_operations import GenerateDetailedCostReportOperations -from ._generate_detailed_cost_report_operation_results_operations import ( - GenerateDetailedCostReportOperationResultsOperations, -) -from ._generate_detailed_cost_report_operation_status_operations import ( - GenerateDetailedCostReportOperationStatusOperations, -) -from ._price_sheet_operations import PriceSheetOperations -from ._scheduled_actions_operations import ScheduledActionsOperations -from ._benefit_recommendations_operations import BenefitRecommendationsOperations -from ._benefit_utilization_summaries_operations import BenefitUtilizationSummariesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._cost_allocation_rules_operations import CostAllocationRulesOperations # type: ignore +from ._benefit_recommendations_operations import BenefitRecommendationsOperations # type: ignore +from ._benefit_utilization_summaries_operations import BenefitUtilizationSummariesOperations # type: ignore +from ._generate_benefit_utilization_summaries_report_operations import GenerateBenefitUtilizationSummariesReportOperations # type: ignore +from ._budgets_operations import BudgetsOperations # type: ignore +from ._exports_operations import ExportsOperations # type: ignore +from ._generate_cost_details_report_operations import GenerateCostDetailsReportOperations # type: ignore +from ._generate_detailed_cost_report_operations import GenerateDetailedCostReportOperations # type: ignore +from ._generate_detailed_cost_report_operation_results_operations import GenerateDetailedCostReportOperationResultsOperations # type: ignore +from ._generate_detailed_cost_report_operation_status_operations import GenerateDetailedCostReportOperationStatusOperations # type: ignore +from ._views_operations import ViewsOperations # type: ignore +from ._alerts_operations import AlertsOperations # type: ignore +from ._forecast_operations import ForecastOperations # type: ignore +from ._dimensions_operations import DimensionsOperations # type: ignore +from ._query_operations import QueryOperations # type: ignore +from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations # type: ignore +from ._price_sheet_operations import PriceSheetOperations # type: ignore +from ._scheduled_actions_operations import ScheduledActionsOperations # type: ignore +from ._settings_operations import SettingsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "Operations", + "CostAllocationRulesOperations", + "BenefitRecommendationsOperations", + "BenefitUtilizationSummariesOperations", + "GenerateBenefitUtilizationSummariesReportOperations", + "BudgetsOperations", + "ExportsOperations", + "GenerateCostDetailsReportOperations", + "GenerateDetailedCostReportOperations", + "GenerateDetailedCostReportOperationResultsOperations", + "GenerateDetailedCostReportOperationStatusOperations", "ViewsOperations", "AlertsOperations", "ForecastOperations", "DimensionsOperations", "QueryOperations", "GenerateReservationDetailsReportOperations", - "ExportsOperations", - "GenerateCostDetailsReportOperations", - "GenerateDetailedCostReportOperations", - "GenerateDetailedCostReportOperationResultsOperations", - "GenerateDetailedCostReportOperationStatusOperations", "PriceSheetOperations", "ScheduledActionsOperations", - "BenefitRecommendationsOperations", - "BenefitUtilizationSummariesOperations", + "SettingsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py index aac3086e4d30..7dd611209c8c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,23 +20,24 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._alerts_operations import ( build_dismiss_request, build_get_request, build_list_external_request, build_list_request, ) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AlertsOperations: @@ -51,10 +54,10 @@ class AlertsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: @@ -80,12 +83,11 @@ async def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertsResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.AlertsResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,36 +101,35 @@ async def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - request = build_list_request( + _request = build_list_request( scope=scope, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AlertsResult", pipeline_response) + deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - list.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/alerts"} + return deserialized # type: ignore @distributed_trace_async async def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: @@ -156,12 +157,11 @@ async def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: :type scope: str :param alert_id: Alert ID. Required. :type alert_id: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -175,37 +175,36 @@ async def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( scope=scope, alert_id=alert_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Alert", pipeline_response) + deserialized = self._deserialize("Alert", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}"} + return deserialized # type: ignore @overload async def dismiss( @@ -246,7 +245,6 @@ async def dismiss( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: @@ -254,7 +252,7 @@ async def dismiss( @overload async def dismiss( - self, scope: str, alert_id: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, alert_id: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.Alert: """Dismisses the specified alert. @@ -281,11 +279,10 @@ async def dismiss( :param alert_id: Alert ID. Required. :type alert_id: str :param parameters: Parameters supplied to the Dismiss Alert operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: @@ -293,7 +290,7 @@ async def dismiss( @distributed_trace_async async def dismiss( - self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, IO], **kwargs: Any + self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, IO[bytes]], **kwargs: Any ) -> _models.Alert: """Dismisses the specified alert. @@ -320,17 +317,13 @@ async def dismiss( :param alert_id: Alert ID. Required. :type alert_id: str :param parameters: Parameters supplied to the Dismiss Alert operation. Is either a - DismissAlertPayload type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + DismissAlertPayload type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or IO[bytes] :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -353,40 +346,39 @@ async def dismiss( else: _json = self._serialize.body(parameters, "DismissAlertPayload") - request = build_dismiss_request( + _request = build_dismiss_request( scope=scope, alert_id=alert_id, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.dismiss.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Alert", pipeline_response) + deserialized = self._deserialize("Alert", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - dismiss.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}"} + return deserialized # type: ignore @distributed_trace_async async def list_external( @@ -410,12 +402,11 @@ async def list_external( '{externalBillingAccountId}' for consolidated account used with dimension/query operations. Required. :type external_cloud_provider_id: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertsResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.AlertsResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -429,36 +420,33 @@ async def list_external( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - request = build_list_external_request( + _request = build_list_external_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, api_version=api_version, - template_url=self.list_external.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AlertsResult", pipeline_response) + deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - list_external.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py index cafa32b3d00d..95711e7c41f5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -19,18 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._benefit_recommendations_operations import build_list_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class BenefitRecommendationsOperations: @@ -47,10 +49,10 @@ class BenefitRecommendationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -60,7 +62,7 @@ def list( orderby: Optional[str] = None, expand: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.BenefitRecommendationModel"]: + ) -> AsyncItemPaged["_models.BenefitRecommendationModel"]: """List of recommendations for purchasing savings plan. .. seealso:: @@ -87,7 +89,6 @@ def list( :param expand: May be used to expand the properties by: properties/usage, properties/allRecommendationDetails. Default value is None. :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitRecommendationModel or the result of cls(response) :rtype: @@ -100,7 +101,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitRecommendationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,18 +112,16 @@ def list( def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( billing_scope=billing_scope, filter=filter, orderby=orderby, expand=expand, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -134,13 +133,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("BenefitRecommendationsListResult", pipeline_response) @@ -150,21 +148,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list.metadata = {"url": "/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations"} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py index 81caf0cefc6f..c1aeb2a0d786 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -19,23 +20,24 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._benefit_utilization_summaries_operations import ( build_list_by_billing_account_id_request, build_list_by_billing_profile_id_request, build_list_by_savings_plan_id_request, build_list_by_savings_plan_order_request, ) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class BenefitUtilizationSummariesOperations: @@ -52,10 +54,10 @@ class BenefitUtilizationSummariesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_account_id( @@ -64,7 +66,7 @@ def list_by_billing_account_id( grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.BenefitUtilizationSummary"]: + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: """Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'. @@ -79,7 +81,6 @@ def list_by_billing_account_id( :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -92,7 +93,7 @@ def list_by_billing_account_id( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,17 +104,15 @@ def list_by_billing_account_id( def prepare_request(next_link=None): if not next_link: - request = build_list_by_billing_account_id_request( + _request = build_list_by_billing_account_id_request( billing_account_id=billing_account_id, grain_parameter=grain_parameter, filter=filter, api_version=api_version, - template_url=self.list_by_billing_account_id.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -125,13 +124,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -141,27 +139,26 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_billing_account_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } - @distributed_trace def list_by_billing_profile_id( self, @@ -170,7 +167,7 @@ def list_by_billing_profile_id( grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.BenefitUtilizationSummary"]: + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: """Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'. @@ -187,7 +184,6 @@ def list_by_billing_profile_id( :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -200,7 +196,7 @@ def list_by_billing_profile_id( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,18 +207,16 @@ def list_by_billing_profile_id( def prepare_request(next_link=None): if not next_link: - request = build_list_by_billing_profile_id_request( + _request = build_list_by_billing_profile_id_request( billing_account_id=billing_account_id, billing_profile_id=billing_profile_id, grain_parameter=grain_parameter, filter=filter, api_version=api_version, - template_url=self.list_by_billing_profile_id.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -234,13 +228,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -250,27 +243,26 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_billing_profile_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } - @distributed_trace def list_by_savings_plan_order( self, @@ -278,7 +270,7 @@ def list_by_savings_plan_order( filter: Optional[str] = None, grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, **kwargs: Any - ) -> AsyncIterable["_models.BenefitUtilizationSummary"]: + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: """Lists the savings plan utilization summaries for daily or monthly grain. .. seealso:: @@ -291,7 +283,6 @@ def list_by_savings_plan_order( :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default value is None. :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -304,7 +295,7 @@ def list_by_savings_plan_order( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,17 +306,15 @@ def list_by_savings_plan_order( def prepare_request(next_link=None): if not next_link: - request = build_list_by_savings_plan_order_request( + _request = build_list_by_savings_plan_order_request( savings_plan_order_id=savings_plan_order_id, filter=filter, grain_parameter=grain_parameter, api_version=api_version, - template_url=self.list_by_savings_plan_order.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -337,13 +326,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -353,27 +341,26 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_savings_plan_order.metadata = { - "url": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } - @distributed_trace def list_by_savings_plan_id( self, @@ -382,7 +369,7 @@ def list_by_savings_plan_id( filter: Optional[str] = None, grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, **kwargs: Any - ) -> AsyncIterable["_models.BenefitUtilizationSummary"]: + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: """Lists the savings plan utilization summaries for daily or monthly grain. .. seealso:: @@ -397,7 +384,6 @@ def list_by_savings_plan_id( :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default value is None. :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -410,7 +396,7 @@ def list_by_savings_plan_id( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -421,18 +407,16 @@ def list_by_savings_plan_id( def prepare_request(next_link=None): if not next_link: - request = build_list_by_savings_plan_id_request( + _request = build_list_by_savings_plan_id_request( savings_plan_order_id=savings_plan_order_id, savings_plan_id=savings_plan_id, filter=filter, grain_parameter=grain_parameter, api_version=api_version, - template_url=self.list_by_savings_plan_id.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -444,13 +428,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -460,23 +443,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_savings_plan_id.metadata = { - "url": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py new file mode 100644 index 000000000000..2f9d1dadaa94 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py @@ -0,0 +1,707 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import AsyncPipelineClient +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._budgets_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_request, +) +from .._configuration import CostManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class BudgetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`budgets` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, scope: str, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged["_models.Budget"]: + """Lists all budgets for the defined scope. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param filter: OData filter option. May be used to filter budgets by properties/category. The + filter supports 'eq' only. Default value is None. + :type filter: str + :return: An iterator like instance of either Budget or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Budget] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.BudgetsListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_request( + scope=scope, + filter=filter, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BudgetsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: + """Gets the budget for the scope by budget name. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + _request = build_get_request( + scope=scope, + budget_name=budget_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Budget", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + scope: str, + budget_name: str, + parameters: _models.Budget, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + scope: str, + budget_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, scope: str, budget_name: str, parameters: Union[_models.Budget, IO[bytes]], **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Is either a Budget type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget or IO[bytes] + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Budget") + + _request = build_create_or_update_request( + scope=scope, + budget_name=budget_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Budget", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, scope: str, budget_name: str, **kwargs: Any) -> None: + """The operation to delete a budget. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + scope=scope, + budget_name=budget_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py new file mode 100644 index 000000000000..adad84ef3c52 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py @@ -0,0 +1,525 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import AsyncPipelineClient +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._cost_allocation_rules_operations import ( + build_check_name_availability_request, + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_request, +) +from .._configuration import CostManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class CostAllocationRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`cost_allocation_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, billing_account_id: str, **kwargs: Any) -> AsyncItemPaged["_models.CostAllocationRuleDefinition"]: + """Get the list of all cost allocation rules for a billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :return: An iterator like instance of either CostAllocationRuleDefinition or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.CostAllocationRuleList] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_request( + billing_account_id=billing_account_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("CostAllocationRuleList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: _models.CostAllocationRuleCheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: Union[ + _models.CostAllocationRuleCheckNameAvailabilityRequest, IO[bytes] + ], + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Is either a CostAllocationRuleCheckNameAvailabilityRequest type or a IO[bytes] + type. Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest or IO[bytes] + :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleCheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cost_allocation_rule_check_name_availability_request, (IOBase, bytes)): + _content = cost_allocation_rule_check_name_availability_request + else: + _json = self._serialize.body( + cost_allocation_rule_check_name_availability_request, "CostAllocationRuleCheckNameAvailabilityRequest" + ) + + _request = build_check_name_availability_request( + billing_account_id=billing_account_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize( + "CostAllocationRuleCheckNameAvailabilityResponse", pipeline_response.http_response + ) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> _models.CostAllocationRuleDefinition: + """Get a cost allocation rule by rule name and billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + _request = build_get_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: _models.CostAllocationRuleDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: Union[_models.CostAllocationRuleDefinition, IO[bytes]], + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Is either a + CostAllocationRuleDefinition type or a IO[bytes] type. Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition or + IO[bytes] + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cost_allocation_rule, (IOBase, bytes)): + _content = cost_allocation_rule + else: + _json = self._serialize.body(cost_allocation_rule, "CostAllocationRuleDefinition") + + _request = build_create_or_update_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> None: + """Delete cost allocation rule for billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py index 1f64b263a6b0..a1eb52e9d3f2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -19,18 +21,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._dimensions_operations import build_by_external_cloud_provider_type_request, build_list_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class DimensionsOperations: @@ -47,10 +50,10 @@ class DimensionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -61,7 +64,7 @@ def list( skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.Dimension"]: + ) -> AsyncItemPaged["_models.Dimension"]: """Lists the dimensions by the defined scope. .. seealso:: @@ -99,7 +102,6 @@ def list( :param top: May be used to limit the number of results to the most recent N dimension data. Default value is None. :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Dimension or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Dimension] :raises ~azure.core.exceptions.HttpResponseError: @@ -110,7 +112,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,19 +123,17 @@ def list( def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( scope=scope, filter=filter, expand=expand, skiptoken=skiptoken, top=top, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -145,13 +145,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("DimensionsListResult", pipeline_response) @@ -161,25 +160,26 @@ async def extract_data(pipeline_response): return None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/dimensions"} - @distributed_trace def by_external_cloud_provider_type( self, @@ -190,7 +190,7 @@ def by_external_cloud_provider_type( skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.Dimension"]: + ) -> AsyncItemPaged["_models.Dimension"]: """Lists the dimensions by the external cloud provider type. .. seealso:: @@ -221,7 +221,6 @@ def by_external_cloud_provider_type( :param top: May be used to limit the number of results to the most recent N dimension data. Default value is None. :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Dimension or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Dimension] :raises ~azure.core.exceptions.HttpResponseError: @@ -232,7 +231,7 @@ def by_external_cloud_provider_type( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -243,7 +242,7 @@ def by_external_cloud_provider_type( def prepare_request(next_link=None): if not next_link: - request = build_by_external_cloud_provider_type_request( + _request = build_by_external_cloud_provider_type_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, filter=filter, @@ -251,12 +250,10 @@ def prepare_request(next_link=None): skiptoken=skiptoken, top=top, api_version=api_version, - template_url=self.by_external_cloud_provider_type.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -268,13 +265,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("DimensionsListResult", pipeline_response) @@ -284,23 +280,22 @@ async def extract_data(pipeline_response): return None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - by_external_cloud_provider_type.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions" - } diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py index bfa77ebf03d9..51f2ddacd7ee 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,14 +20,13 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._exports_operations import ( build_create_or_update_request, build_delete_request, @@ -34,9 +35,11 @@ build_get_request, build_list_request, ) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ExportsOperations: @@ -53,10 +56,10 @@ class ExportsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> _models.ExportListResult: @@ -86,12 +89,11 @@ async def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> 'runHistory' is supported and will return information for the last run of each export. Default value is None. :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ExportListResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ExportListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,37 +107,36 @@ async def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExportListResult] = kwargs.pop("cls", None) - request = build_list_request( + _request = build_list_request( scope=scope, expand=expand, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ExportListResult", pipeline_response) + deserialized = self._deserialize("ExportListResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - list.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports"} + return deserialized # type: ignore @distributed_trace_async async def get(self, scope: str, export_name: str, expand: Optional[str] = None, **kwargs: Any) -> _models.Export: @@ -167,12 +168,11 @@ async def get(self, scope: str, export_name: str, expand: Optional[str] = None, 'runHistory' is supported and will return information for the last 10 runs of the export. Default value is None. :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -186,38 +186,37 @@ async def get(self, scope: str, export_name: str, expand: Optional[str] = None, api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Export] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( scope=scope, export_name=export_name, expand=expand, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Export", pipeline_response) + deserialized = self._deserialize("Export", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}"} + return deserialized # type: ignore @overload async def create_or_update( @@ -260,7 +259,6 @@ async def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: @@ -268,7 +266,13 @@ async def create_or_update( @overload async def create_or_update( - self, scope: str, export_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, + scope: str, + export_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.Export: """The operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -297,11 +301,10 @@ async def create_or_update( :param export_name: Export Name. Required. :type export_name: str :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: @@ -309,7 +312,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, scope: str, export_name: str, parameters: Union[_models.Export, IO], **kwargs: Any + self, scope: str, export_name: str, parameters: Union[_models.Export, IO[bytes]], **kwargs: Any ) -> _models.Export: """The operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -338,17 +341,13 @@ async def create_or_update( :param export_name: Export Name. Required. :type export_name: str :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Is either a - Export type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Export or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + Export type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Export or IO[bytes] :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,49 +370,42 @@ async def create_or_update( else: _json = self._serialize.body(parameters, "Export") - request = build_create_or_update_request( + _request = build_create_or_update_request( scope=scope, export_name=export_name, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("Export", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Export", pipeline_response) + deserialized = self._deserialize("Export", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}"} - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, scope: str, export_name: str, **kwargs: Any - ) -> None: + async def delete(self, scope: str, export_name: str, **kwargs: Any) -> None: """The operation to delete a export. .. seealso:: @@ -438,12 +430,11 @@ async def delete( # pylint: disable=inconsistent-return-statements :type scope: str :param export_name: Export Name. Required. :type export_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -457,37 +448,128 @@ async def delete( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( scope=scope, export_name=export_name, api_version=api_version, - template_url=self.delete.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore + + @overload + async def execute( + self, + scope: str, + export_name: str, + parameters: Optional[_models.ExportRunRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """The operation to run an export. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/costmanagement/ + + :param scope: The scope associated with export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def execute( + self, + scope: str, + export_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """The operation to run an export. - delete.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}"} + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/costmanagement/ + + :param scope: The scope associated with export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace_async - async def execute( # pylint: disable=inconsistent-return-statements - self, scope: str, export_name: str, **kwargs: Any + async def execute( + self, + scope: str, + export_name: str, + parameters: Optional[Union[_models.ExportRunRequest, IO[bytes]]] = None, + **kwargs: Any ) -> None: """The operation to run an export. @@ -513,12 +595,14 @@ async def execute( # pylint: disable=inconsistent-return-statements :type scope: str :param export_name: Export Name. Required. :type export_name: str - :keyword callable cls: A custom type or function that will be passed the direct response + :param parameters: Parameters supplied to the Execute Export operation. Is either a + ExportRunRequest type or a IO[bytes] type. Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest or IO[bytes] :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,39 +610,54 @@ async def execute( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[None] = kwargs.pop("cls", None) - request = build_execute_request( + content_type = content_type or "application/json" if parameters else None + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _json = self._serialize.body(parameters, "ExportRunRequest") + else: + _json = None + + _request = build_execute_request( scope=scope, export_name=export_name, api_version=api_version, - template_url=self.execute.metadata["url"], + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - execute.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async async def get_execution_history( @@ -588,12 +687,11 @@ async def get_execution_history( :type scope: str :param export_name: Export Name. Required. :type export_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ExportExecutionListResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -607,36 +705,33 @@ async def get_execution_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExportExecutionListResult] = kwargs.pop("cls", None) - request = build_get_execution_history_request( + _request = build_get_execution_history_request( scope=scope, export_name=export_name, api_version=api_version, - template_url=self.get_execution_history.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ExportExecutionListResult", pipeline_response) + deserialized = self._deserialize("ExportExecutionListResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get_execution_history.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py index 45ae7f6285bc..3824d23d429d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,18 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._forecast_operations import build_external_cloud_provider_usage_request, build_usage_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ForecastOperations: @@ -46,10 +49,10 @@ class ForecastOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def usage( @@ -93,7 +96,6 @@ async def usage( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -103,7 +105,7 @@ async def usage( async def usage( self, scope: str, - parameters: IO, + parameters: IO[bytes], filter: Optional[str] = None, *, content_type: str = "application/json", @@ -133,7 +135,7 @@ async def usage( :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. @@ -141,7 +143,6 @@ async def usage( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -149,7 +150,11 @@ async def usage( @distributed_trace_async async def usage( - self, scope: str, parameters: Union[_models.ForecastDefinition, IO], filter: Optional[str] = None, **kwargs: Any + self, + scope: str, + parameters: Union[_models.ForecastDefinition, IO[bytes]], + filter: Optional[str] = None, + **kwargs: Any ) -> Optional[_models.ForecastResult]: """Lists the forecast charges for scope defined. @@ -174,21 +179,17 @@ async def usage( specific for partners. Required. :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO + either a ForecastDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. :type filter: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,42 +212,41 @@ async def usage( else: _json = self._serialize.body(parameters, "ForecastDefinition") - request = build_usage_request( + _request = build_usage_request( scope=scope, filter=filter, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.usage.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize("ForecastResult", pipeline_response) + deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - usage.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/forecast"} + return deserialized # type: ignore @overload async def external_cloud_provider_usage( @@ -284,7 +284,6 @@ async def external_cloud_provider_usage( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult :raises ~azure.core.exceptions.HttpResponseError: @@ -295,7 +294,7 @@ async def external_cloud_provider_usage( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: IO, + parameters: IO[bytes], filter: Optional[str] = None, *, content_type: str = "application/json", @@ -318,7 +317,7 @@ async def external_cloud_provider_usage( :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. @@ -326,7 +325,6 @@ async def external_cloud_provider_usage( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult :raises ~azure.core.exceptions.HttpResponseError: @@ -337,7 +335,7 @@ async def external_cloud_provider_usage( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: Union[_models.ForecastDefinition, IO], + parameters: Union[_models.ForecastDefinition, IO[bytes]], filter: Optional[str] = None, **kwargs: Any ) -> _models.ForecastResult: @@ -357,21 +355,17 @@ async def external_cloud_provider_usage( Required. :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO + either a ForecastDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. :type filter: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -394,7 +388,7 @@ async def external_cloud_provider_usage( else: _json = self._serialize.body(parameters, "ForecastDefinition") - request = build_external_cloud_provider_usage_request( + _request = build_external_cloud_provider_usage_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, filter=filter, @@ -402,32 +396,29 @@ async def external_cloud_provider_usage( content_type=content_type, json=_json, content=_content, - template_url=self.external_cloud_provider_usage.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ForecastResult", pipeline_response) + deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - external_cloud_provider_usage.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py new file mode 100644 index 000000000000..a8d09d6a6629 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py @@ -0,0 +1,1344 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload + +from azure.core import AsyncPipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._generate_benefit_utilization_summaries_report_operations import ( + build_generate_by_billing_account_request, + build_generate_by_billing_profile_request, + build_generate_by_reservation_id_request, + build_generate_by_reservation_order_id_request, + build_generate_by_savings_plan_id_request, + build_generate_by_savings_plan_order_id_request, +) +from .._configuration import CostManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class GenerateBenefitUtilizationSummariesReportOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`generate_benefit_utilization_summaries_report` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _generate_by_billing_account_initial( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_billing_account_request( + billing_account_id=billing_account_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_billing_account_initial( + billing_account_id=billing_account_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_billing_profile_initial( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_billing_profile_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_billing_profile_initial( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_reservation_order_id_initial( # pylint: disable=name-too-long + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_reservation_order_id_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_reservation_order_id_initial( + reservation_order_id=reservation_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_reservation_id_initial( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_reservation_id_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_reservation_id_initial( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_savings_plan_order_id_initial( # pylint: disable=name-too-long + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_savings_plan_order_id_request( + savings_plan_order_id=savings_plan_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_savings_plan_order_id_initial( + savings_plan_order_id=savings_plan_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_savings_plan_id_initial( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_savings_plan_id_request( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_savings_plan_id_initial( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py index 0c905cc94df4..44c76a8271e1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,35 +5,40 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._generate_cost_details_report_operations import ( build_create_operation_request, build_get_operation_results_request, ) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GenerateCostDetailsReportOperations: @@ -51,15 +55,18 @@ class GenerateCostDetailsReportOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_operation_initial( - self, scope: str, parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO], **kwargs: Any - ) -> Optional[_models.CostDetailsOperationResults]: - error_map = { + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -72,7 +79,7 @@ async def _create_operation_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.CostDetailsOperationResults]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -82,50 +89,48 @@ async def _create_operation_initial( else: _json = self._serialize.body(parameters, "GenerateCostDetailsReportRequestDefinition") - request = build_create_operation_request( + _request = build_create_operation_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._create_operation_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.GenerateCostDetailsReportErrorResponse, pipeline_response + _models.GenerateCostDetailsReportErrorResponse, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _create_operation_initial.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport" - } + return deserialized # type: ignore @overload async def begin_create_operation( @@ -147,27 +152,20 @@ async def begin_create_operation( response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields. + https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create cost details operation. Required. :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -177,7 +175,7 @@ async def begin_create_operation( @overload async def begin_create_operation( - self, scope: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: """This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) @@ -190,27 +188,20 @@ async def begin_create_operation( response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields. + https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create cost details operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -220,7 +211,10 @@ async def begin_create_operation( @distributed_trace_async async def begin_create_operation( - self, scope: str, parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO], **kwargs: Any + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: """This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) @@ -233,29 +227,19 @@ async def begin_create_operation( response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields. + https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create cost details operation. Is either a - GenerateCostDetailsReportRequestDefinition type or a IO type. Required. + GenerateCostDetailsReportRequestDefinition type or a IO[bytes] type. Required. :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + or IO[bytes] :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -282,12 +266,13 @@ async def begin_create_operation( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) + deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -299,20 +284,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CostDetailsOperationResults].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create_operation.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport"} + return AsyncLROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _get_operation_results_initial( self, scope: str, operation_id: str, **kwargs: Any - ) -> Optional[_models.CostDetailsOperationResults]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,43 +309,43 @@ async def _get_operation_results_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.CostDetailsOperationResults]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_get_operation_results_request( + _request = build_get_operation_results_request( scope=scope, operation_id=operation_id, api_version=api_version, - template_url=self._get_operation_results_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - _get_operation_results_initial.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_get_operation_results( @@ -369,19 +354,12 @@ async def begin_get_operation_results( """Get the result of the specified operation. This link is provided in the CostDetails creation request response Location header. - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param operation_id: The target operation Id. Required. :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -406,12 +384,13 @@ async def begin_get_operation_results( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) + deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -423,14 +402,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CostDetailsOperationResults].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_get_operation_results.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}" - } + return AsyncLROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py index f1fa361658d2..d0f29f8232c0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +5,39 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._generate_detailed_cost_report_operation_results_operations import build_get_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list -class GenerateDetailedCostReportOperationResultsOperations: +class GenerateDetailedCostReportOperationResultsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. @@ -47,15 +51,13 @@ class GenerateDetailedCostReportOperationResultsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _get_initial( - self, operation_id: str, scope: str, **kwargs: Any - ) -> Optional[_models.GenerateDetailedCostReportOperationResult]: - error_map = { + async def _get_initial(self, operation_id: str, scope: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67,41 +69,43 @@ async def _get_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.GenerateDetailedCostReportOperationResult]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( operation_id=operation_id, scope=scope, api_version=api_version, - template_url=self._get_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - _get_initial.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/operationResults/{operationId}"} + return deserialized # type: ignore @distributed_trace_async async def begin_get( @@ -115,14 +119,6 @@ async def begin_get( :param scope: The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -147,12 +143,15 @@ async def begin_get( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) + deserialized = self._deserialize( + "GenerateDetailedCostReportOperationResult", pipeline_response.http_response + ) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -162,12 +161,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/operationResults/{operationId}"} + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py index 241b5a5598cf..3b36c274536b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -17,21 +18,22 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._generate_detailed_cost_report_operation_status_operations import build_get_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list -class GenerateDetailedCostReportOperationStatusOperations: +class GenerateDetailedCostReportOperationStatusOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. @@ -45,10 +47,10 @@ class GenerateDetailedCostReportOperationStatusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -62,12 +64,11 @@ async def get( :param scope: The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: GenerateDetailedCostReportOperationStatuses or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81,34 +82,33 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.GenerateDetailedCostReportOperationStatuses] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( operation_id=operation_id, scope=scope, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("GenerateDetailedCostReportOperationStatuses", pipeline_response) + deserialized = self._deserialize("GenerateDetailedCostReportOperationStatuses", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/operationStatus/{operationId}"} + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py index 407343cd8e4b..66c7b5516191 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,32 +5,37 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._generate_detailed_cost_report_operations import build_create_operation_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class GenerateDetailedCostReportOperations: @@ -48,15 +52,15 @@ class GenerateDetailedCostReportOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_operation_initial( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO], **kwargs: Any - ) -> Optional[_models.GenerateDetailedCostReportOperationResult]: - error_map = { + self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -69,7 +73,7 @@ async def _create_operation_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.GenerateDetailedCostReportOperationResult]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -79,38 +83,38 @@ async def _create_operation_initial( else: _json = self._serialize.body(parameters, "GenerateDetailedCostReportDefinition") - request = build_create_operation_request( + _request = build_create_operation_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._create_operation_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.GenerateDetailedCostReportErrorResponse, pipeline_response + _models.GenerateDetailedCostReportErrorResponse, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-Consumption-AsyncOperation"] = self._deserialize( @@ -121,14 +125,12 @@ async def _create_operation_initial( ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _create_operation_initial.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport" - } + return deserialized # type: ignore @overload async def begin_create_operation( @@ -156,14 +158,6 @@ async def begin_create_operation( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -173,7 +167,7 @@ async def begin_create_operation( @overload async def begin_create_operation( - self, scope: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: """Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header @@ -188,18 +182,10 @@ async def begin_create_operation( billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create detailed cost report operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -209,7 +195,7 @@ async def begin_create_operation( @distributed_trace_async async def begin_create_operation( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO], **kwargs: Any + self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: """Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header @@ -224,19 +210,9 @@ async def begin_create_operation( billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create detailed cost report operation. Is either - a GenerateDetailedCostReportDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + a GenerateDetailedCostReportDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or + IO[bytes] :return: An instance of AsyncLROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -263,12 +239,15 @@ async def begin_create_operation( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) + deserialized = self._deserialize( + "GenerateDetailedCostReportOperationResult", pipeline_response.http_response + ) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -280,12 +259,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create_operation.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport"} + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py index f9da4d617b6a..45fa004f006e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,37 +6,42 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._generate_reservation_details_report_operations import ( build_by_billing_account_id_request, build_by_billing_profile_id_request, ) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list -class GenerateReservationDetailsReportOperations: +class GenerateReservationDetailsReportOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. @@ -50,15 +55,15 @@ class GenerateReservationDetailsReportOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _by_billing_account_id_initial( self, billing_account_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> Optional[_models.OperationStatus]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -70,49 +75,49 @@ async def _by_billing_account_id_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.OperationStatus]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_by_billing_account_id_request( + _request = build_by_billing_account_id_request( billing_account_id=billing_account_id, start_date=start_date, end_date=end_date, api_version=api_version, - template_url=self._by_billing_account_id_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OperationStatus", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _by_billing_account_id_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return deserialized # type: ignore @distributed_trace_async async def begin_by_billing_account_id( @@ -121,7 +126,7 @@ async def begin_by_billing_account_id( """Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, - https://docs.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role. + https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ @@ -132,14 +137,6 @@ async def begin_by_billing_account_id( :type start_date: str :param end_date: End Date. Required. :type end_date: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatus] @@ -164,12 +161,13 @@ async def begin_by_billing_account_id( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response) + deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -181,22 +179,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.OperationStatus].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_by_billing_account_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return AsyncLROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _by_billing_profile_id_initial( self, billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> Optional[_models.OperationStatus]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,50 +204,50 @@ async def _by_billing_profile_id_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.OperationStatus]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_by_billing_profile_id_request( + _request = build_by_billing_profile_id_request( billing_account_id=billing_account_id, billing_profile_id=billing_profile_id, start_date=start_date, end_date=end_date, api_version=api_version, - template_url=self._by_billing_profile_id_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OperationStatus", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _by_billing_profile_id_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return deserialized # type: ignore @distributed_trace_async async def begin_by_billing_profile_id( @@ -260,7 +256,7 @@ async def begin_by_billing_profile_id( """Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, - https://docs.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access. + https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ @@ -273,14 +269,6 @@ async def begin_by_billing_profile_id( :type start_date: str :param end_date: End Date. Required. :type end_date: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatus] @@ -306,12 +294,13 @@ async def begin_by_billing_profile_id( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response) + deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -323,14 +312,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.OperationStatus].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_by_billing_profile_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return AsyncLROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py index 9ea97535fb12..cdffa1bb1511 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -19,18 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class Operations: @@ -47,16 +49,15 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.CostManagementOperation"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.CostManagementOperation"]: """Lists all of the available cost management REST API operations. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CostManagementOperation or the result of cls(response) :rtype: @@ -69,7 +70,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.CostManagementOperation" api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80,14 +81,12 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.CostManagementOperation" def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -99,13 +98,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("OperationListResult", pipeline_response) @@ -115,21 +113,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list.metadata = {"url": "/providers/Microsoft.CostManagement/operations"} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py index ee61643df312..0b49c54965da 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,31 +6,40 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request -from ...operations._price_sheet_operations import build_download_by_billing_profile_request, build_download_request +from ..._utils.serialization import Deserializer, Serializer +from ...operations._price_sheet_operations import ( + build_download_by_billing_account_request, + build_download_by_billing_profile_request, + build_download_by_invoice_request, +) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PriceSheetOperations: @@ -47,15 +56,15 @@ class PriceSheetOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _download_initial( + async def _download_by_invoice_initial( self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any - ) -> Optional[_models.DownloadURL]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -67,53 +76,53 @@ async def _download_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.DownloadURL]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_download_request( + _request = build_download_by_invoice_request( billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, invoice_name=invoice_name, api_version=api_version, - template_url=self._download_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("DownloadURL", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _download_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + return deserialized # type: ignore @distributed_trace_async - async def begin_download( + async def begin_download_by_invoice( self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any ) -> AsyncLROPoller[_models.DownloadURL]: """Gets a URL to download the pricesheet for an invoice. The operation is supported for billing @@ -125,14 +134,6 @@ async def begin_download( :type billing_profile_name: str :param invoice_name: The ID that uniquely identifies an invoice. Required. :type invoice_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DownloadURL or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.DownloadURL] @@ -147,7 +148,7 @@ async def begin_download( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._download_initial( + raw_result = await self._download_by_invoice_initial( billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, invoice_name=invoice_name, @@ -157,12 +158,13 @@ async def begin_download( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DownloadURL", pipeline_response) + deserialized = self._deserialize("DownloadURL", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -174,22 +176,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.DownloadURL].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_download.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + return AsyncLROPoller[_models.DownloadURL]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _download_by_billing_profile_initial( self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> Optional[_models.DownloadURL]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -201,82 +201,80 @@ async def _download_by_billing_profile_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.DownloadURL]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_download_by_billing_profile_request( + _request = build_download_by_billing_profile_request( billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, api_version=api_version, - template_url=self._download_by_billing_profile_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("DownloadURL", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _download_by_billing_profile_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + return deserialized # type: ignore @distributed_trace_async async def begin_download_by_billing_profile( self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.DownloadURL]: + ) -> AsyncLROPoller[_models.PricesheetDownloadProperties]: """Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft - Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in - this preview version will be updated from a single csv file to a Zip file containing multiple - csv files, each with max 200k records. + Customer Agreement. + + You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure + Reserved Instance (RI) pricing is only available through the new version of the API. + + Due to Azure product growth, the Azure price sheet download experience in this preview version + will be updated from a single csv/json file to a Zip file containing multiple csv/json files, + each with max size of 75MB. :param billing_account_name: The ID that uniquely identifies a billing account. Required. :type billing_account_name: str :param billing_profile_name: The ID that uniquely identifies a billing profile. Required. :type billing_profile_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either DownloadURL or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.DownloadURL] + :return: An instance of AsyncLROPoller that returns either PricesheetDownloadProperties or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.PricesheetDownloadProperties] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DownloadURL] = kwargs.pop("cls", None) + cls: ClsType[_models.PricesheetDownloadProperties] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -290,12 +288,13 @@ async def begin_download_by_billing_profile( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DownloadURL", pipeline_response) + deserialized = self._deserialize("PricesheetDownloadProperties", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -307,14 +306,155 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.PricesheetDownloadProperties].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return AsyncLROPoller[_models.PricesheetDownloadProperties]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - begin_download_by_billing_profile.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + async def _download_by_billing_account_initial( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_download_by_billing_account_request( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated2, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_download_by_billing_account( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusAutoGenerated]: + """Generates the pricesheet for the provided billing period asynchronously based on the Enrollment + ID. This is for Enterprise Agreement customers. + + **Migrate to version 2025-03-01** + + You can use the 2025-03-01 API version with the new URI: + + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download' + + With a new schema detailed below, the new version of the price sheet provides additional + information and includes prices for Azure Reserved Instances (RI) for the current billing + period. We recommend downloading an Azure Price Sheet for when entering a new billing period if + you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing. + + The EA Azure price sheet is available for billing periods in the past 13 months. To request a + price sheet for a billing period older than 13 months, please contact support. + + The Azure price sheet download experience has been updated from a single .csv file to a zip + file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has + been upgraded to use http POST method; details can be found below. + + All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account + (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to + be retired on 01 June 2026 and will no longer be supported after this date. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_period_name: Billing Period Name. Required. + :type billing_period_name: str + :return: An instance of AsyncLROPoller that returns either OperationStatusAutoGenerated or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatusAutoGenerated] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.OperationStatusAutoGenerated] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._download_by_billing_account_initial( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("OperationStatusAutoGenerated", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatusAutoGenerated].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatusAutoGenerated]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py index 21f90c26efe1..68da7e26282d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,18 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._query_operations import build_usage_by_external_cloud_provider_type_request, build_usage_request +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class QueryOperations: @@ -46,10 +49,10 @@ class QueryOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def usage( @@ -82,7 +85,6 @@ async def usage( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -90,7 +92,7 @@ async def usage( @overload async def usage( - self, scope: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> Optional[_models.QueryResult]: """Query the usage data for scope defined. @@ -115,11 +117,10 @@ async def usage( specific for partners. Required. :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -127,7 +128,7 @@ async def usage( @distributed_trace_async async def usage( - self, scope: str, parameters: Union[_models.QueryDefinition, IO], **kwargs: Any + self, scope: str, parameters: Union[_models.QueryDefinition, IO[bytes]], **kwargs: Any ) -> Optional[_models.QueryResult]: """Query the usage data for scope defined. @@ -152,17 +153,13 @@ async def usage( specific for partners. Required. :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + a QueryDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] :return: QueryResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -185,41 +182,40 @@ async def usage( else: _json = self._serialize.body(parameters, "QueryDefinition") - request = build_usage_request( + _request = build_usage_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.usage.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize("QueryResult", pipeline_response) + deserialized = self._deserialize("QueryResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - usage.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/query"} + return deserialized # type: ignore @overload async def usage_by_external_cloud_provider_type( @@ -251,7 +247,6 @@ async def usage_by_external_cloud_provider_type( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult :raises ~azure.core.exceptions.HttpResponseError: @@ -262,7 +257,7 @@ async def usage_by_external_cloud_provider_type( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: IO, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -283,11 +278,10 @@ async def usage_by_external_cloud_provider_type( Required. :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult :raises ~azure.core.exceptions.HttpResponseError: @@ -298,7 +292,7 @@ async def usage_by_external_cloud_provider_type( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: Union[_models.QueryDefinition, IO], + parameters: Union[_models.QueryDefinition, IO[bytes]], **kwargs: Any ) -> _models.QueryResult: """Query the usage data for external cloud provider type defined. @@ -317,17 +311,13 @@ async def usage_by_external_cloud_provider_type( Required. :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + a QueryDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] :return: QueryResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -350,39 +340,36 @@ async def usage_by_external_cloud_provider_type( else: _json = self._serialize.body(parameters, "QueryDefinition") - request = build_usage_by_external_cloud_provider_type_request( + _request = build_usage_by_external_cloud_provider_type_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.usage_by_external_cloud_provider_type.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("QueryResult", pipeline_response) + deserialized = self._deserialize("QueryResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - usage_by_external_cloud_provider_type.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py index 9adf299e0b72..4d691d449898 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -20,15 +22,14 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._scheduled_actions_operations import ( build_check_name_availability_by_scope_request, build_check_name_availability_request, @@ -43,9 +44,11 @@ build_run_by_scope_request, build_run_request, ) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ScheduledActionsOperations: @@ -62,13 +65,13 @@ class ScheduledActionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_models.ScheduledAction"]: + def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged["_models.ScheduledAction"]: """List all private scheduled actions. .. seealso:: @@ -77,7 +80,6 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScheduledAction or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] @@ -89,7 +91,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -100,15 +102,13 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( filter=filter, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -120,13 +120,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) @@ -136,18 +135,19 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, pipeline_response + _models.ErrorResponseWithNestedDetails, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -155,12 +155,10 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - list.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions"} - @distributed_trace def list_by_scope( self, scope: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.ScheduledAction"]: + ) -> AsyncItemPaged["_models.ScheduledAction"]: """List all shared scheduled actions within the given scope. .. seealso:: @@ -187,7 +185,6 @@ def list_by_scope( :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScheduledAction or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] @@ -199,7 +196,7 @@ def list_by_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -210,16 +207,14 @@ def list_by_scope( def prepare_request(next_link=None): if not next_link: - request = build_list_by_scope_request( + _request = build_list_by_scope_request( scope=scope, filter=filter, api_version=api_version, - template_url=self.list_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -231,13 +226,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) @@ -247,18 +241,19 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, pipeline_response + _models.ErrorResponseWithNestedDetails, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -266,8 +261,6 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - list_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions"} - @overload async def create_or_update( self, @@ -291,7 +284,6 @@ async def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -301,7 +293,7 @@ async def create_or_update( async def create_or_update( self, name: str, - scheduled_action: IO, + scheduled_action: IO[bytes], if_match: Optional[str] = None, *, content_type: str = "application/json", @@ -312,7 +304,7 @@ async def create_or_update( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO + :type scheduled_action: IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. @@ -320,7 +312,6 @@ async def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -330,7 +321,7 @@ async def create_or_update( async def create_or_update( self, name: str, - scheduled_action: Union[_models.ScheduledAction, IO], + scheduled_action: Union[_models.ScheduledAction, IO[bytes]], if_match: Optional[str] = None, **kwargs: Any ) -> _models.ScheduledAction: @@ -339,21 +330,17 @@ async def create_or_update( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO + type or a IO[bytes] type. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. :type if_match: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,45 +363,40 @@ async def create_or_update( else: _json = self._serialize.body(scheduled_action, "ScheduledAction") - request = build_create_or_update_request( + _request = build_create_or_update_request( name=name, if_match=if_match, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("ScheduledAction", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}"} - @distributed_trace_async async def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: """Get the private scheduled action by name. @@ -424,12 +406,11 @@ async def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -443,39 +424,38 @@ async def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( name=name, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return deserialized # type: ignore @distributed_trace_async - async def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def delete(self, name: str, **kwargs: Any) -> None: """Delete a private scheduled action. .. seealso:: @@ -483,12 +463,11 @@ async def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inc :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -502,32 +481,31 @@ async def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inc api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( name=name, api_version=api_version, - template_url=self.delete.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return cls(pipeline_response, None, {}) # type: ignore @overload async def create_or_update_by_scope( @@ -571,7 +549,6 @@ async def create_or_update_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -582,7 +559,7 @@ async def create_or_update_by_scope( self, scope: str, name: str, - scheduled_action: IO, + scheduled_action: IO[bytes], if_match: Optional[str] = None, *, content_type: str = "application/json", @@ -611,7 +588,7 @@ async def create_or_update_by_scope( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO + :type scheduled_action: IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. @@ -619,7 +596,6 @@ async def create_or_update_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -630,7 +606,7 @@ async def create_or_update_by_scope( self, scope: str, name: str, - scheduled_action: Union[_models.ScheduledAction, IO], + scheduled_action: Union[_models.ScheduledAction, IO[bytes]], if_match: Optional[str] = None, **kwargs: Any ) -> _models.ScheduledAction: @@ -657,21 +633,17 @@ async def create_or_update_by_scope( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO + type or a IO[bytes] type. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. :type if_match: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -694,7 +666,7 @@ async def create_or_update_by_scope( else: _json = self._serialize.body(scheduled_action, "ScheduledAction") - request = build_create_or_update_by_scope_request( + _request = build_create_or_update_by_scope_request( scope=scope, name=name, if_match=if_match, @@ -702,38 +674,33 @@ async def create_or_update_by_scope( content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("ScheduledAction", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}"} - @distributed_trace_async async def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.ScheduledAction: """Get the shared scheduled action from the given scope by name. @@ -761,12 +728,11 @@ async def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.Sc :type scope: str :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -780,42 +746,39 @@ async def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.Sc api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - request = build_get_by_scope_request( + _request = build_get_by_scope_request( scope=scope, name=name, api_version=api_version, - template_url=self.get_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return deserialized # type: ignore @distributed_trace_async - async def delete_by_scope( # pylint: disable=inconsistent-return-statements - self, scope: str, name: str, **kwargs: Any - ) -> None: + async def delete_by_scope(self, scope: str, name: str, **kwargs: Any) -> None: """Delete a scheduled action within the given scope. .. seealso:: @@ -841,12 +804,11 @@ async def delete_by_scope( # pylint: disable=inconsistent-return-statements :type scope: str :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -860,46 +822,44 @@ async def delete_by_scope( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_by_scope_request( + _request = build_delete_by_scope_request( scope=scope, name=name, api_version=api_version, - template_url=self.delete_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def run(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def run(self, name: str, **kwargs: Any) -> None: """Processes a private scheduled action. :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -913,37 +873,34 @@ async def run(self, name: str, **kwargs: Any) -> None: # pylint: disable=incons api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_run_request( + _request = build_run_request( name=name, api_version=api_version, - template_url=self.run.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - run.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}/execute"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def run_by_scope( # pylint: disable=inconsistent-return-statements - self, scope: str, name: str, **kwargs: Any - ) -> None: + async def run_by_scope(self, scope: str, name: str, **kwargs: Any) -> None: """Runs a shared scheduled action within the given scope. :param scope: The scope associated with scheduled action operations. This includes @@ -966,12 +923,11 @@ async def run_by_scope( # pylint: disable=inconsistent-return-statements :type scope: str :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,33 +941,32 @@ async def run_by_scope( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_run_by_scope_request( + _request = build_run_by_scope_request( scope=scope, name=name, api_version=api_version, - template_url=self.run_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - run_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute"} + return cls(pipeline_response, None, {}) # type: ignore @overload async def check_name_availability( @@ -1029,7 +984,6 @@ async def check_name_availability( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1037,16 +991,15 @@ async def check_name_availability( @overload async def check_name_availability( - self, check_name_availability_request: IO, *, content_type: str = "application/json", **kwargs: Any + self, check_name_availability_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action. :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO + :type check_name_availability_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1054,23 +1007,19 @@ async def check_name_availability( @distributed_trace_async async def check_name_availability( - self, check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO], **kwargs: Any + self, check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action. :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO type. Required. + CheckNameAvailabilityRequest type or a IO[bytes] type. Required. :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1093,38 +1042,37 @@ async def check_name_availability( else: _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - request = build_check_name_availability_request( + _request = build_check_name_availability_request( api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.check_name_availability.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - check_name_availability.metadata = {"url": "/providers/Microsoft.CostManagement/checkNameAvailability"} + return deserialized # type: ignore @overload async def check_name_availability_by_scope( @@ -1161,7 +1109,6 @@ async def check_name_availability_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1169,7 +1116,12 @@ async def check_name_availability_by_scope( @overload async def check_name_availability_by_scope( - self, scope: str, check_name_availability_request: IO, *, content_type: str = "application/json", **kwargs: Any + self, + scope: str, + check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action within the given scope. @@ -1192,11 +1144,10 @@ async def check_name_availability_by_scope( Required. :type scope: str :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO + :type check_name_availability_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1206,7 +1157,7 @@ async def check_name_availability_by_scope( async def check_name_availability_by_scope( self, scope: str, - check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO], + check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action within the given scope. @@ -1230,18 +1181,14 @@ async def check_name_availability_by_scope( Required. :type scope: str :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO type. Required. + CheckNameAvailabilityRequest type or a IO[bytes] type. Required. :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1264,38 +1211,35 @@ async def check_name_availability_by_scope( else: _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - request = build_check_name_availability_by_scope_request( + _request = build_check_name_availability_by_scope_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.check_name_availability_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - check_name_availability_by_scope.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/checkNameAvailability" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py new file mode 100644 index 000000000000..1c07cbd6a241 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py @@ -0,0 +1,386 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload + +from azure.core import AsyncPipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._settings_operations import ( + build_create_or_update_by_scope_request, + build_delete_by_scope_request, + build_get_by_scope_request, + build_list_request, +) +from .._configuration import CostManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class SettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`settings` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def list(self, scope: str, **kwargs: Any) -> _models.SettingsListResult: + """List all cost management settings in the requested scope. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :return: SettingsListResult or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.SettingsListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.SettingsListResult] = kwargs.pop("cls", None) + + _request = build_list_request( + scope=scope, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("SettingsListResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: _models.Setting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: Union[_models.Setting, IO[bytes]], + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Is either a Setting type or a IO[bytes] type. + Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting or IO[bytes] + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(setting, (IOBase, bytes)): + _content = setting + else: + _json = self._serialize.body(setting, "Setting") + + _request = build_create_or_update_by_scope_request( + scope=scope, + type=type, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Setting", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> _models.Setting: + """Get the setting from the given scope by name. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + _request = build_get_by_scope_request( + scope=scope, + type=type, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Setting", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> None: + """Delete a setting within the given scope. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_by_scope_request( + scope=scope, + type=type, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py index 28afc176547a..1ef8d5f02fae 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -20,15 +21,14 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._views_operations import ( build_create_or_update_by_scope_request, build_create_or_update_request, @@ -39,9 +39,11 @@ build_list_by_scope_request, build_list_request, ) +from .._configuration import CostManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ViewsOperations: @@ -58,19 +60,18 @@ class ViewsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.View"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.View"]: """Lists all views by tenant and object. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either View or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.View] :raises ~azure.core.exceptions.HttpResponseError: @@ -81,7 +82,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.View"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92,14 +93,12 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.View"]: def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -111,13 +110,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("ViewListResult", pipeline_response) @@ -127,27 +125,28 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list.metadata = {"url": "/providers/Microsoft.CostManagement/views"} - @distributed_trace - def list_by_scope(self, scope: str, **kwargs: Any) -> AsyncIterable["_models.View"]: + def list_by_scope(self, scope: str, **kwargs: Any) -> AsyncItemPaged["_models.View"]: """Lists all views at the given scope. .. seealso:: @@ -171,7 +170,6 @@ def list_by_scope(self, scope: str, **kwargs: Any) -> AsyncIterable["_models.Vie 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either View or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.View] :raises ~azure.core.exceptions.HttpResponseError: @@ -182,7 +180,7 @@ def list_by_scope(self, scope: str, **kwargs: Any) -> AsyncIterable["_models.Vie api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -193,15 +191,13 @@ def list_by_scope(self, scope: str, **kwargs: Any) -> AsyncIterable["_models.Vie def prepare_request(next_link=None): if not next_link: - request = build_list_by_scope_request( + _request = build_list_by_scope_request( scope=scope, api_version=api_version, - template_url=self.list_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -213,13 +209,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("ViewListResult", pipeline_response) @@ -229,25 +224,26 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views"} - @distributed_trace_async async def get(self, view_name: str, **kwargs: Any) -> _models.View: """Gets the view by view name. @@ -257,12 +253,11 @@ async def get(self, view_name: str, **kwargs: Any) -> _models.View: :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,36 +271,35 @@ async def get(self, view_name: str, **kwargs: Any) -> _models.View: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.View] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( view_name=view_name, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/providers/Microsoft.CostManagement/views/{viewName}"} + return deserialized # type: ignore @overload async def create_or_update( @@ -325,7 +319,6 @@ async def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: @@ -333,7 +326,7 @@ async def create_or_update( @overload async def create_or_update( - self, view_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, view_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -345,11 +338,10 @@ async def create_or_update( :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: @@ -357,7 +349,7 @@ async def create_or_update( @distributed_trace_async async def create_or_update( - self, view_name: str, parameters: Union[_models.View, IO], **kwargs: Any + self, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -369,17 +361,13 @@ async def create_or_update( :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,46 +390,41 @@ async def create_or_update( else: _json = self._serialize.body(parameters, "View") - request = build_create_or_update_request( + _request = build_create_or_update_request( view_name=view_name, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("View", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update.metadata = {"url": "/providers/Microsoft.CostManagement/views/{viewName}"} - @distributed_trace_async - async def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def delete(self, view_name: str, **kwargs: Any) -> None: """The operation to delete a view. .. seealso:: @@ -449,12 +432,11 @@ async def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disabl :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,32 +450,31 @@ async def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disabl api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( view_name=view_name, api_version=api_version, - template_url=self.delete.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {"url": "/providers/Microsoft.CostManagement/views/{viewName}"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async async def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.View: @@ -522,12 +503,11 @@ async def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _mode :type scope: str :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -541,37 +521,36 @@ async def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.View] = kwargs.pop("cls", None) - request = build_get_by_scope_request( + _request = build_get_by_scope_request( scope=scope, view_name=view_name, api_version=api_version, - template_url=self.get_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views/{viewName}"} + return deserialized # type: ignore @overload async def create_or_update_by_scope( @@ -615,7 +594,6 @@ async def create_or_update_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: @@ -623,7 +601,13 @@ async def create_or_update_by_scope( @overload async def create_or_update_by_scope( - self, scope: str, view_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, + scope: str, + view_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -653,11 +637,10 @@ async def create_or_update_by_scope( :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: @@ -665,7 +648,7 @@ async def create_or_update_by_scope( @distributed_trace_async async def create_or_update_by_scope( - self, scope: str, view_name: str, parameters: Union[_models.View, IO], **kwargs: Any + self, scope: str, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -695,17 +678,13 @@ async def create_or_update_by_scope( :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -728,49 +707,42 @@ async def create_or_update_by_scope( else: _json = self._serialize.body(parameters, "View") - request = build_create_or_update_by_scope_request( + _request = build_create_or_update_by_scope_request( scope=scope, view_name=view_name, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("View", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views/{viewName}"} - @distributed_trace_async - async def delete_by_scope( # pylint: disable=inconsistent-return-statements - self, scope: str, view_name: str, **kwargs: Any - ) -> None: + async def delete_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> None: """The operation to delete a view. .. seealso:: @@ -796,12 +768,11 @@ async def delete_by_scope( # pylint: disable=inconsistent-return-statements :type scope: str :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -815,30 +786,29 @@ async def delete_by_scope( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_by_scope_request( + _request = build_delete_by_scope_request( scope=scope, view_name=view_name, api_version=api_version, - template_url=self.delete_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views/{viewName}"} + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py index be704298e815..8dd49c78927c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py @@ -5,168 +5,237 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import Alert -from ._models_py3 import AlertPropertiesDefinition -from ._models_py3 import AlertPropertiesDetails -from ._models_py3 import AlertsResult -from ._models_py3 import AllSavingsBenefitDetails -from ._models_py3 import AllSavingsList -from ._models_py3 import BenefitRecommendationModel -from ._models_py3 import BenefitRecommendationProperties -from ._models_py3 import BenefitRecommendationsListResult -from ._models_py3 import BenefitResource -from ._models_py3 import BenefitUtilizationSummariesListResult -from ._models_py3 import BenefitUtilizationSummary -from ._models_py3 import BenefitUtilizationSummaryProperties -from ._models_py3 import BlobInfo -from ._models_py3 import CheckNameAvailabilityRequest -from ._models_py3 import CheckNameAvailabilityResponse -from ._models_py3 import CommonExportProperties -from ._models_py3 import CostDetailsOperationResults -from ._models_py3 import CostDetailsTimePeriod -from ._models_py3 import CostManagementOperation -from ._models_py3 import CostManagementProxyResource -from ._models_py3 import CostManagementResource -from ._models_py3 import Dimension -from ._models_py3 import DimensionsListResult -from ._models_py3 import DismissAlertPayload -from ._models_py3 import DownloadURL -from ._models_py3 import ErrorDetails -from ._models_py3 import ErrorDetailsWithNestedDetails -from ._models_py3 import ErrorResponse -from ._models_py3 import ErrorResponseWithNestedDetails -from ._models_py3 import Export -from ._models_py3 import ExportDataset -from ._models_py3 import ExportDatasetConfiguration -from ._models_py3 import ExportDefinition -from ._models_py3 import ExportDeliveryDestination -from ._models_py3 import ExportDeliveryInfo -from ._models_py3 import ExportExecutionListResult -from ._models_py3 import ExportListResult -from ._models_py3 import ExportProperties -from ._models_py3 import ExportRecurrencePeriod -from ._models_py3 import ExportRun -from ._models_py3 import ExportSchedule -from ._models_py3 import ExportTimePeriod -from ._models_py3 import FileDestination -from ._models_py3 import ForecastAggregation -from ._models_py3 import ForecastColumn -from ._models_py3 import ForecastComparisonExpression -from ._models_py3 import ForecastDataset -from ._models_py3 import ForecastDatasetConfiguration -from ._models_py3 import ForecastDefinition -from ._models_py3 import ForecastFilter -from ._models_py3 import ForecastResult -from ._models_py3 import ForecastTimePeriod -from ._models_py3 import GenerateCostDetailsReportErrorResponse -from ._models_py3 import GenerateCostDetailsReportRequestDefinition -from ._models_py3 import GenerateDetailedCostReportDefinition -from ._models_py3 import GenerateDetailedCostReportErrorResponse -from ._models_py3 import GenerateDetailedCostReportOperationResult -from ._models_py3 import GenerateDetailedCostReportOperationStatuses -from ._models_py3 import GenerateDetailedCostReportTimePeriod -from ._models_py3 import IncludedQuantityUtilizationSummary -from ._models_py3 import IncludedQuantityUtilizationSummaryProperties -from ._models_py3 import KpiProperties -from ._models_py3 import NotificationProperties -from ._models_py3 import Operation -from ._models_py3 import OperationDisplay -from ._models_py3 import OperationListResult -from ._models_py3 import OperationStatus -from ._models_py3 import PivotProperties -from ._models_py3 import ProxyResource -from ._models_py3 import QueryAggregation -from ._models_py3 import QueryColumn -from ._models_py3 import QueryComparisonExpression -from ._models_py3 import QueryDataset -from ._models_py3 import QueryDatasetConfiguration -from ._models_py3 import QueryDefinition -from ._models_py3 import QueryFilter -from ._models_py3 import QueryGrouping -from ._models_py3 import QueryResult -from ._models_py3 import QueryTimePeriod -from ._models_py3 import RecommendationUsageDetails -from ._models_py3 import ReportConfigAggregation -from ._models_py3 import ReportConfigComparisonExpression -from ._models_py3 import ReportConfigDataset -from ._models_py3 import ReportConfigDatasetConfiguration -from ._models_py3 import ReportConfigFilter -from ._models_py3 import ReportConfigGrouping -from ._models_py3 import ReportConfigSorting -from ._models_py3 import ReportConfigTimePeriod -from ._models_py3 import Resource -from ._models_py3 import SavingsPlanUtilizationSummary -from ._models_py3 import SavingsPlanUtilizationSummaryProperties -from ._models_py3 import ScheduleProperties -from ._models_py3 import ScheduledAction -from ._models_py3 import ScheduledActionListResult -from ._models_py3 import ScheduledActionProxyResource -from ._models_py3 import SharedScopeBenefitRecommendationProperties -from ._models_py3 import SingleScopeBenefitRecommendationProperties -from ._models_py3 import Status -from ._models_py3 import SystemData -from ._models_py3 import View -from ._models_py3 import ViewListResult +from typing import TYPE_CHECKING -from ._cost_management_client_enums import AccumulatedType -from ._cost_management_client_enums import ActionType -from ._cost_management_client_enums import AlertCategory -from ._cost_management_client_enums import AlertCriteria -from ._cost_management_client_enums import AlertOperator -from ._cost_management_client_enums import AlertSource -from ._cost_management_client_enums import AlertStatus -from ._cost_management_client_enums import AlertTimeGrainType -from ._cost_management_client_enums import AlertType -from ._cost_management_client_enums import BenefitKind -from ._cost_management_client_enums import ChartType -from ._cost_management_client_enums import CheckNameAvailabilityReason -from ._cost_management_client_enums import CostDetailsDataFormat -from ._cost_management_client_enums import CostDetailsMetricType -from ._cost_management_client_enums import CostDetailsStatusType -from ._cost_management_client_enums import CreatedByType -from ._cost_management_client_enums import DaysOfWeek -from ._cost_management_client_enums import ExecutionStatus -from ._cost_management_client_enums import ExecutionType -from ._cost_management_client_enums import ExportType -from ._cost_management_client_enums import ExternalCloudProviderType -from ._cost_management_client_enums import FileFormat -from ._cost_management_client_enums import ForecastOperatorType -from ._cost_management_client_enums import ForecastTimeframe -from ._cost_management_client_enums import ForecastType -from ._cost_management_client_enums import FormatType -from ._cost_management_client_enums import FunctionName -from ._cost_management_client_enums import FunctionType -from ._cost_management_client_enums import GenerateDetailedCostReportMetricType -from ._cost_management_client_enums import Grain -from ._cost_management_client_enums import GrainParameter -from ._cost_management_client_enums import GranularityType -from ._cost_management_client_enums import KpiType -from ._cost_management_client_enums import LookBackPeriod -from ._cost_management_client_enums import MetricType -from ._cost_management_client_enums import OperationStatusType -from ._cost_management_client_enums import OperatorType -from ._cost_management_client_enums import Origin -from ._cost_management_client_enums import PivotType -from ._cost_management_client_enums import QueryColumnType -from ._cost_management_client_enums import QueryOperatorType -from ._cost_management_client_enums import RecurrenceType -from ._cost_management_client_enums import ReportConfigSortingType -from ._cost_management_client_enums import ReportGranularityType -from ._cost_management_client_enums import ReportOperationStatusType -from ._cost_management_client_enums import ReportTimeframeType -from ._cost_management_client_enums import ReportType -from ._cost_management_client_enums import ReservationReportSchema -from ._cost_management_client_enums import ScheduleFrequency -from ._cost_management_client_enums import ScheduledActionKind -from ._cost_management_client_enums import ScheduledActionStatus -from ._cost_management_client_enums import Scope -from ._cost_management_client_enums import StatusType -from ._cost_management_client_enums import Term -from ._cost_management_client_enums import TimeframeType -from ._cost_management_client_enums import WeeksOfMonth +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + Alert, + AlertPropertiesDefinition, + AlertPropertiesDetails, + AlertsResult, + AllSavingsBenefitDetails, + AllSavingsList, + AsyncOperationStatusProperties, + BenefitRecommendationModel, + BenefitRecommendationProperties, + BenefitRecommendationsListResult, + BenefitResource, + BenefitUtilizationSummariesListResult, + BenefitUtilizationSummariesOperationStatus, + BenefitUtilizationSummariesRequest, + BenefitUtilizationSummary, + BenefitUtilizationSummaryProperties, + BlobInfo, + Budget, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + BudgetsListResult, + CheckNameAvailabilityRequest, + CheckNameAvailabilityResponse, + CommonExportProperties, + CostAllocationProportion, + CostAllocationResource, + CostAllocationRuleCheckNameAvailabilityRequest, + CostAllocationRuleCheckNameAvailabilityResponse, + CostAllocationRuleDefinition, + CostAllocationRuleDetails, + CostAllocationRuleList, + CostAllocationRuleProperties, + CostDetailsOperationResults, + CostDetailsTimePeriod, + CostManagementOperation, + CostManagementProxyResource, + CostManagementResource, + CurrentSpend, + Dimension, + DimensionsListResult, + DismissAlertPayload, + DownloadURL, + EAPriceSheetProperties, + ErrorAdditionalInfo, + ErrorDetail, + ErrorDetailAutoGenerated, + ErrorDetails, + ErrorDetailsWithNestedDetails, + ErrorResponse, + ErrorResponseAutoGenerated, + ErrorResponseAutoGenerated2, + ErrorResponseWithNestedDetails, + Export, + ExportDataset, + ExportDatasetConfiguration, + ExportDefinition, + ExportDeliveryDestination, + ExportDeliveryInfo, + ExportExecutionListResult, + ExportListResult, + ExportProperties, + ExportRecurrencePeriod, + ExportRun, + ExportRunRequest, + ExportSchedule, + ExportSuspensionContext, + ExportTimePeriod, + FileDestination, + FilterItems, + ForecastAggregation, + ForecastColumn, + ForecastComparisonExpression, + ForecastDataset, + ForecastDatasetConfiguration, + ForecastDefinition, + ForecastFilter, + ForecastResult, + ForecastSpend, + ForecastTimePeriod, + GenerateCostDetailsReportErrorResponse, + GenerateCostDetailsReportRequestDefinition, + GenerateDetailedCostReportDefinition, + GenerateDetailedCostReportErrorResponse, + GenerateDetailedCostReportOperationResult, + GenerateDetailedCostReportOperationStatuses, + GenerateDetailedCostReportTimePeriod, + IncludedQuantityUtilizationSummary, + IncludedQuantityUtilizationSummaryProperties, + KpiProperties, + MCAPriceSheetProperties, + Notification, + NotificationProperties, + Operation, + OperationDisplay, + OperationListResult, + OperationStatus, + OperationStatusAutoGenerated, + PivotProperties, + PricesheetDownloadProperties, + ProxyResource, + QueryAggregation, + QueryColumn, + QueryComparisonExpression, + QueryDataset, + QueryDatasetConfiguration, + QueryDefinition, + QueryFilter, + QueryGrouping, + QueryResult, + QueryTimePeriod, + RecommendationUsageDetails, + ReportConfigAggregation, + ReportConfigComparisonExpression, + ReportConfigDataset, + ReportConfigDatasetConfiguration, + ReportConfigFilter, + ReportConfigGrouping, + ReportConfigSorting, + ReportConfigTimePeriod, + Resource, + SavingsPlanUtilizationSummary, + SavingsPlanUtilizationSummaryProperties, + ScheduleProperties, + ScheduledAction, + ScheduledActionListResult, + ScheduledActionProxyResource, + Setting, + SettingsListResult, + SharedScopeBenefitRecommendationProperties, + SingleScopeBenefitRecommendationProperties, + SourceCostAllocationResource, + Status, + SystemAssignedServiceIdentity, + SystemData, + TagInheritanceProperties, + TagInheritanceSetting, + TargetCostAllocationResource, + View, + ViewListResult, +) + +from ._cost_management_client_enums import ( # type: ignore + AccumulatedType, + ActionType, + AlertCategory, + AlertCriteria, + AlertOperator, + AlertSource, + AlertStatus, + AlertTimeGrainType, + AlertType, + BenefitKind, + BenefitUtilizationSummaryReportSchema, + BudgetNotificationOperatorType, + BudgetOperatorType, + CategoryType, + ChartType, + CheckNameAvailabilityReason, + CompressionModeType, + CostAllocationPolicyType, + CostAllocationResourceType, + CostDetailsDataFormat, + CostDetailsMetricType, + CostDetailsStatusType, + CreatedByType, + CultureCode, + DataOverwriteBehaviorType, + DaysOfWeek, + DestinationType, + ExecutionStatus, + ExecutionType, + ExportType, + ExternalCloudProviderType, + FileFormat, + FilterItemNames, + ForecastOperatorType, + ForecastTimeframe, + ForecastType, + FormatType, + Frequency, + FunctionName, + FunctionType, + GenerateDetailedCostReportMetricType, + Grain, + GrainParameter, + GranularityType, + KpiType, + LookBackPeriod, + MetricType, + OperationStatusType, + OperatorType, + Origin, + PivotType, + QueryColumnType, + QueryOperatorType, + Reason, + RecurrenceType, + ReportConfigSortingType, + ReportGranularityType, + ReportOperationStatusType, + ReportTimeframeType, + ReportType, + ReservationReportSchema, + RuleStatus, + ScheduleFrequency, + ScheduledActionKind, + ScheduledActionStatus, + Scope, + SettingType, + SettingsKind, + StatusType, + SystemAssignedServiceIdentityType, + Term, + ThresholdType, + TimeGrainType, + TimeframeType, + WeeksOfMonth, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -176,29 +245,53 @@ "AlertsResult", "AllSavingsBenefitDetails", "AllSavingsList", + "AsyncOperationStatusProperties", "BenefitRecommendationModel", "BenefitRecommendationProperties", "BenefitRecommendationsListResult", "BenefitResource", "BenefitUtilizationSummariesListResult", + "BenefitUtilizationSummariesOperationStatus", + "BenefitUtilizationSummariesRequest", "BenefitUtilizationSummary", "BenefitUtilizationSummaryProperties", "BlobInfo", + "Budget", + "BudgetComparisonExpression", + "BudgetFilter", + "BudgetFilterProperties", + "BudgetTimePeriod", + "BudgetsListResult", "CheckNameAvailabilityRequest", "CheckNameAvailabilityResponse", "CommonExportProperties", + "CostAllocationProportion", + "CostAllocationResource", + "CostAllocationRuleCheckNameAvailabilityRequest", + "CostAllocationRuleCheckNameAvailabilityResponse", + "CostAllocationRuleDefinition", + "CostAllocationRuleDetails", + "CostAllocationRuleList", + "CostAllocationRuleProperties", "CostDetailsOperationResults", "CostDetailsTimePeriod", "CostManagementOperation", "CostManagementProxyResource", "CostManagementResource", + "CurrentSpend", "Dimension", "DimensionsListResult", "DismissAlertPayload", "DownloadURL", + "EAPriceSheetProperties", + "ErrorAdditionalInfo", + "ErrorDetail", + "ErrorDetailAutoGenerated", "ErrorDetails", "ErrorDetailsWithNestedDetails", "ErrorResponse", + "ErrorResponseAutoGenerated", + "ErrorResponseAutoGenerated2", "ErrorResponseWithNestedDetails", "Export", "ExportDataset", @@ -211,9 +304,12 @@ "ExportProperties", "ExportRecurrencePeriod", "ExportRun", + "ExportRunRequest", "ExportSchedule", + "ExportSuspensionContext", "ExportTimePeriod", "FileDestination", + "FilterItems", "ForecastAggregation", "ForecastColumn", "ForecastComparisonExpression", @@ -222,6 +318,7 @@ "ForecastDefinition", "ForecastFilter", "ForecastResult", + "ForecastSpend", "ForecastTimePeriod", "GenerateCostDetailsReportErrorResponse", "GenerateCostDetailsReportRequestDefinition", @@ -233,12 +330,16 @@ "IncludedQuantityUtilizationSummary", "IncludedQuantityUtilizationSummaryProperties", "KpiProperties", + "MCAPriceSheetProperties", + "Notification", "NotificationProperties", "Operation", "OperationDisplay", "OperationListResult", "OperationStatus", + "OperationStatusAutoGenerated", "PivotProperties", + "PricesheetDownloadProperties", "ProxyResource", "QueryAggregation", "QueryColumn", @@ -266,10 +367,17 @@ "ScheduledAction", "ScheduledActionListResult", "ScheduledActionProxyResource", + "Setting", + "SettingsListResult", "SharedScopeBenefitRecommendationProperties", "SingleScopeBenefitRecommendationProperties", + "SourceCostAllocationResource", "Status", + "SystemAssignedServiceIdentity", "SystemData", + "TagInheritanceProperties", + "TagInheritanceSetting", + "TargetCostAllocationResource", "View", "ViewListResult", "AccumulatedType", @@ -282,22 +390,34 @@ "AlertTimeGrainType", "AlertType", "BenefitKind", + "BenefitUtilizationSummaryReportSchema", + "BudgetNotificationOperatorType", + "BudgetOperatorType", + "CategoryType", "ChartType", "CheckNameAvailabilityReason", + "CompressionModeType", + "CostAllocationPolicyType", + "CostAllocationResourceType", "CostDetailsDataFormat", "CostDetailsMetricType", "CostDetailsStatusType", "CreatedByType", + "CultureCode", + "DataOverwriteBehaviorType", "DaysOfWeek", + "DestinationType", "ExecutionStatus", "ExecutionType", "ExportType", "ExternalCloudProviderType", "FileFormat", + "FilterItemNames", "ForecastOperatorType", "ForecastTimeframe", "ForecastType", "FormatType", + "Frequency", "FunctionName", "FunctionType", "GenerateDetailedCostReportMetricType", @@ -313,6 +433,7 @@ "PivotType", "QueryColumnType", "QueryOperatorType", + "Reason", "RecurrenceType", "ReportConfigSortingType", "ReportGranularityType", @@ -320,14 +441,20 @@ "ReportTimeframeType", "ReportType", "ReservationReportSchema", + "RuleStatus", "ScheduleFrequency", "ScheduledActionKind", "ScheduledActionStatus", "Scope", + "SettingType", + "SettingsKind", "StatusType", + "SystemAssignedServiceIdentityType", "Term", + "ThresholdType", + "TimeGrainType", "TimeframeType", "WeeksOfMonth", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py index 400e59765fb6..28826f9c9dfa 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py @@ -114,6 +114,86 @@ class BenefitKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Benefit is SavingsPlan.""" +class BenefitUtilizationSummaryReportSchema(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The CSV file from the reportUrl and secondaryReportUrl blob link will consist of the following + columns of benefit utilization data. UtilizedPercentage will be 0 for savings plans reports and + non data bricks reservations. Utilization percentages will be 0 for data bricks reservations. + """ + + KIND = "Kind" + AVG_UTILIZATION_PERCENTAGE = "AvgUtilizationPercentage" + BENEFIT_ORDER_ID = "BenefitOrderId" + BENEFIT_ID = "BenefitId" + BENEFIT_TYPE = "BenefitType" + MAX_UTILIZATION_PERCENTAGE = "MaxUtilizationPercentage" + MIN_UTILIZATION_PERCENTAGE = "MinUtilizationPercentage" + USAGE_DATE = "UsageDate" + UTILIZED_PERCENTAGE = "UtilizedPercentage" + + +class BudgetNotificationOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The comparison operator. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Supported operators for **CategoryType: Cost** + + + * GreaterThan + * + GreaterThanOrEqualTo + + Supported operators for **CategoryType: ReservationUtilization** + + * LessThan. + """ + + EQUAL_TO = "EqualTo" + """Notification will be triggered if the evaluated cost is the same as threshold value. Note: It’s + not recommended to use this OperatorType as there’s low chance of cost being exactly the same + as threshold value, leading to missing of your alert. This OperatorType will be deprecated in + future. + + Supported for CategoryType(s): Cost.""" + GREATER_THAN = "GreaterThan" + """Notification will be triggered if the evaluated cost is greater than the threshold value. Note: + This is the recommended OperatorType while configuring Budget Alert. + + Supported for CategoryType(s): Cost.""" + GREATER_THAN_OR_EQUAL_TO = "GreaterThanOrEqualTo" + """Notification will be triggered if the evaluated cost is greater than or equal to the threshold + value. + + Supported for CategoryType(s): Cost.""" + LESS_THAN = "LessThan" + """Notification will be triggered if any Reservations in the scope of the Reservation Utilization + Alert Rule have a utilization less than the threshold percentage. + + Supported for CategoryType(s): ReservationUtilization.""" + + +class BudgetOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The operator to use for comparison.""" + + IN = "In" + + +class CategoryType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The category of the budget. + + + * 'Cost' defines a Budget. + * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. + """ + + COST = "Cost" + """A Budget that evaluates monetary cost of Azure resources against an amount, and alerts based on + a configured notification threshold.""" + RESERVATION_UTILIZATION = "ReservationUtilization" + """An Alert Rule that evaluates the utilization percentage of Azure Reservations, and alerts based + on a configured notification threshold.""" + + class ChartType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Chart type of the main view in Cost Analysis. Required.""" @@ -131,6 +211,34 @@ class CheckNameAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): ALREADY_EXISTS = "AlreadyExists" +class CompressionModeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Allow customers to select compress data for exports. This setting will enable destination file + compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet. + """ + + GZIP = "gzip" + SNAPPY = "snappy" + NONE = "none" + + +class CostAllocationPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Method to use for allocating cost. FixedProportion indicates that cost will be split based on + specified percentage values. + """ + + FIXED_PROPORTION = "FixedProportion" + + +class CostAllocationResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Category of resource to use for allocation.""" + + DIMENSION = "Dimension" + """Indicates an Azure dimension such as a subscription id or resource group name is being used for + allocation.""" + TAG = "Tag" + """Allocates cost based on Azure Tag key value pairs.""" + + class CostDetailsDataFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The data format of the report.""" @@ -167,6 +275,45 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): KEY = "Key" +class CultureCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Language in which the recipient will receive the notification, + + Supported for CategoryType(s): Cost, ReservationUtilization. + """ + + EN_US = "en-us" + JA_JP = "ja-jp" + ZH_CN = "zh-cn" + DE_DE = "de-de" + ES_ES = "es-es" + FR_FR = "fr-fr" + IT_IT = "it-it" + KO_KR = "ko-kr" + PT_BR = "pt-br" + RU_RU = "ru-ru" + ZH_TW = "zh-tw" + CS_CZ = "cs-cz" + PL_PL = "pl-pl" + TR_TR = "tr-tr" + DA_DK = "da-dk" + EN_GB = "en-gb" + HU_HU = "hu-hu" + NB_NO = "nb-no" + NL_NL = "nl-nl" + PT_PT = "pt-pt" + SV_SE = "sv-se" + + +class DataOverwriteBehaviorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting + will enable overwrite data for the same month in customer storage account. By default set to + CreateNewReport. + """ + + OVERWRITE_PREVIOUS_REPORT = "OverwritePreviousReport" + CREATE_NEW_REPORT = "CreateNewReport" + + class DaysOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Days of Week.""" @@ -179,6 +326,12 @@ class DaysOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta): SUNDAY = "Sunday" +class DestinationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The export delivery destination type. Currently only 'AzureBlob' is supported.""" + + AZURE_BLOB = "AzureBlob" + + class ExecutionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The last known status of the export run.""" @@ -199,11 +352,18 @@ class ExecutionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ExportType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of the query.""" + """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. + """ USAGE = "Usage" ACTUAL_COST = "ActualCost" AMORTIZED_COST = "AmortizedCost" + FOCUS_COST = "FocusCost" + PRICE_SHEET = "PriceSheet" + RESERVATION_TRANSACTIONS = "ReservationTransactions" + RESERVATION_RECOMMENDATIONS = "ReservationRecommendations" + RESERVATION_DETAILS = "ReservationDetails" class ExternalCloudProviderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -219,11 +379,21 @@ class FileFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): CSV = "Csv" +class FilterItemNames(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The name of the filter. This is currently only supported for Export Definition type of + ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', + 'ResourceType']. + """ + + RESERVATION_SCOPE = "ReservationScope" + RESOURCE_TYPE = "ResourceType" + LOOK_BACK_PERIOD = "LookBackPeriod" + + class ForecastOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operator to use for comparison.""" IN = "In" - IN_ENUM = "In" class ForecastTimeframe(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -241,9 +411,30 @@ class ForecastType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class FormatType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The format of the export being delivered. Currently only 'Csv' is supported.""" + """The format of the export being delivered.""" CSV = "Csv" + PARQUET = "Parquet" + + +class Frequency(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Frequency of a notification. Represents how long the notification will be silent after + triggering an alert for a threshold breach. If not specified, the frequency will be set by + default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when timeGrain: + Last30Days). + + Supported for CategoryType(s): ReservationUtilization. + """ + + DAILY = "Daily" + """After the threshold breaches and an Alert is fired, no further alerts will be sent until the + next calendar day.""" + WEEKLY = "Weekly" + """After the threshold breaches and an Alert is fired, no further alerts will be sent for 7 + calendar days.""" + MONTHLY = "Monthly" + """After the threshold breaches and an Alert is fired, no further alerts will be sent for 30 + calendar days.""" class FunctionName(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -291,9 +482,10 @@ class GrainParameter(str, Enum, metaclass=CaseInsensitiveEnumMeta): class GranularityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The granularity of rows in the forecast.""" + """The granularity of rows in the export. Currently 'Daily' is supported for most cases.""" DAILY = "Daily" + MONTHLY = "Monthly" class KpiType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -323,11 +515,12 @@ class MetricType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OperationStatusType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The status of the long running operation.""" + """Enum representing the status of an async operation.""" RUNNING = "Running" - COMPLETED = "Completed" + COMPLETE = "Complete" FAILED = "Failed" + COMPLETED = "Completed" class OperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -335,7 +528,6 @@ class OperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): IN = "In" CONTAINS = "Contains" - IN_ENUM = "In" class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -368,7 +560,14 @@ class QueryOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operator to use for comparison.""" IN = "In" - IN_ENUM = "In" + + +class Reason(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The reason this name is not available.""" + + INVALID = "Invalid" + ALREADY_EXISTS = "AlreadyExists" + VALID = "Valid" class RecurrenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -444,6 +643,18 @@ class ReservationReportSchema(str, Enum, metaclass=CaseInsensitiveEnumMeta): USED_HOURS = "UsedHours" +class RuleStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Current status of the rule.""" + + NOT_ACTIVE = "NotActive" + """Rule is saved but not used to allocate costs.""" + ACTIVE = "Active" + """Rule is saved and impacting cost allocation.""" + PROCESSING = "Processing" + """Rule is saved and cost allocation is being updated. Readonly value that cannot be submitted in + a put request.""" + + class ScheduledActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Kind of the scheduled action.""" @@ -451,7 +662,7 @@ class ScheduledActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """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.""" + frequency. If no anomaly is detected on the resource, an email won't be sent.""" class ScheduledActionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -485,13 +696,36 @@ class Scope(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Shared scope recommendation.""" +class SettingsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the kind of settings.""" + + TAGINHERITANCE = "taginheritance" + + +class SettingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """SettingType.""" + + TAGINHERITANCE = "taginheritance" + """This setting applies billing profile, invoice section, subscription and resource group tags to + current month's usage data of child resources.""" + + class StatusType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The status of the export's schedule. If 'Inactive', the export's schedule is paused.""" + """The status of the export's schedule. If 'Inactive', the export's schedule is paused. To enable + export set the status to be Active and then make a PUT request. + """ ACTIVE = "Active" INACTIVE = "Inactive" +class SystemAssignedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of managed service identity (either system assigned, or none).""" + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + + class Term(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Grain which corresponds to value.""" @@ -501,8 +735,21 @@ class Term(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Benefit term is 3 years.""" +class ThresholdType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of threshold. + + Supported for CategoryType(s): Cost. + """ + + ACTUAL = "Actual" + """Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget.""" + FORECASTED = "Forecasted" + """Forecasted costs budget alerts provide advanced notification that your spending trends are + likely to exceed your allocated budget, as it relies on forecasted cost predictions.""" + + class TimeframeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The time frame for pulling data for the query. If custom, then a specific time period must be + """The time frame for pulling data for the export. If custom, then a specific time period must be provided. """ @@ -512,6 +759,70 @@ class TimeframeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): THE_LAST_BILLING_MONTH = "TheLastBillingMonth" WEEK_TO_DATE = "WeekToDate" CUSTOM = "Custom" + THE_CURRENT_MONTH = "TheCurrentMonth" + + +class TimeGrainType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The time covered by a budget. Tracking of the amount will be reset based on the time grain. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Supported timeGrainTypes for **CategoryType: Cost** + + + * Monthly + * Quarterly + * Annually + * BillingMonth* + * BillingQuarter* + * + BillingAnnual* + + *only supported for Web Direct customers. + + Supported timeGrainTypes for **CategoryType: ReservationUtilization** + + * Last7Days + * + Last30Days + + Required for CategoryType(s): Cost, ReservationUtilization. + """ + + MONTHLY = "Monthly" + """The budget will track costs in the current calendar month against the amount. + + Supported for CategoryType: Cost only.""" + QUARTERLY = "Quarterly" + """The budget will track costs in the current calendar quarter against the amount. + + Supported for CategoryType: Cost only.""" + ANNUALLY = "Annually" + """The budget will track costs in the current calendar year against the amount. + + Supported for CategoryType: Cost only.""" + BILLING_MONTH = "BillingMonth" + """The budget will track costs in the current billing month against the amount. + + Supported for CategoryType: Cost and Web Direct customers only.""" + BILLING_QUARTER = "BillingQuarter" + """The budget will track costs in the current billing quarter against the amount. + + Supported for CategoryType: Cost and Web Direct customers only.""" + BILLING_ANNUAL = "BillingAnnual" + """The budget will track costs in the current billing year against the amount. + + Supported for CategoryType: Cost and Web Direct customers only.""" + LAST7_DAYS = "Last7Days" + """The Reservation Utilization Alert Rule will evaluate reservations based on their 7-Day + utilization percentage. + + Supported for CategoryType: ReservationUtilization only.""" + LAST30_DAYS = "Last30Days" + """The Reservation Utilization Alert Rule will evaluate reservations based on their 30-Day + utilization percentage. + + Supported for CategoryType: ReservationUtilization only.""" class WeeksOfMonth(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py index e4bc3e9da52b..5d7975e2e62b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py @@ -1,5 +1,5 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -7,21 +7,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union -from .. import _serialization - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +from .._utils import serialization as _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] class CostManagementProxyResource(_serialization.Model): @@ -60,13 +54,13 @@ def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: :paramtype e_tag: str """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.e_tag = e_tag -class Alert(CostManagementProxyResource): # pylint: disable=too-many-instance-attributes +class Alert(CostManagementProxyResource): """An individual alert. Variables are only populated by the server, and will be ignored when sending a request. @@ -239,7 +233,7 @@ def __init__( self.criteria = criteria -class AlertPropertiesDetails(_serialization.Model): # pylint: disable=too-many-instance-attributes +class AlertPropertiesDetails(_serialization.Model): """Alert details. :ivar time_grain_type: Type of timegrain cadence. Known values are: "None", "Monthly", @@ -321,18 +315,18 @@ def __init__( 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, + resource_group_filter: Optional[list[Any]] = None, + resource_filter: Optional[list[Any]] = None, + meter_filter: Optional[list[Any]] = None, tag_filter: Optional[JSON] = 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, + 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, @@ -439,8 +433,8 @@ class AlertsResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.Alert"]] = None + self.next_link: Optional[str] = None class AllSavingsBenefitDetails(_serialization.Model): @@ -501,15 +495,15 @@ class AllSavingsBenefitDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.overage_cost = None - self.benefit_cost = None - self.total_cost = None - self.savings_amount = None - self.savings_percentage = None - self.coverage_percentage = None - self.commitment_amount = None - self.average_utilization_percentage = None - self.wastage_cost = None + self.overage_cost: Optional[float] = None + self.benefit_cost: Optional[float] = None + self.total_cost: Optional[float] = None + self.savings_amount: Optional[float] = None + self.savings_percentage: Optional[float] = None + self.coverage_percentage: Optional[float] = None + self.commitment_amount: Optional[float] = None + self.average_utilization_percentage: Optional[float] = None + self.wastage_cost: Optional[float] = None class AllSavingsList(_serialization.Model): @@ -536,8 +530,65 @@ class AllSavingsList(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.AllSavingsBenefitDetails"]] = None + self.next_link: Optional[str] = None + + +class AsyncOperationStatusProperties(_serialization.Model): + """Object representing the report url and valid until date of the async report generated. + + :ivar report_url: Sas url to the async benefit utilization summaries report. Will be empty if + the report is in Running or Failed state. Known values are: "Kind", "AvgUtilizationPercentage", + "BenefitOrderId", "BenefitId", "BenefitType", "MaxUtilizationPercentage", + "MinUtilizationPercentage", "UsageDate", and "UtilizedPercentage". + :vartype report_url: str or + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema + :ivar secondary_report_url: Sas url to async benefit utilization summaries report in secondary + storage in case of primary outage. Will be empty if the report is in Running or Failed state. + Known values are: "Kind", "AvgUtilizationPercentage", "BenefitOrderId", "BenefitId", + "BenefitType", "MaxUtilizationPercentage", "MinUtilizationPercentage", "UsageDate", and + "UtilizedPercentage". + :vartype secondary_report_url: str or + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema + :ivar valid_until: The date that the sas url provided in reportUrl expires. + :vartype valid_until: ~datetime.datetime + """ + + _attribute_map = { + "report_url": {"key": "reportUrl", "type": "str"}, + "secondary_report_url": {"key": "secondaryReportUrl", "type": "str"}, + "valid_until": {"key": "validUntil", "type": "iso-8601"}, + } + + def __init__( + self, + *, + report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = None, + secondary_report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = None, + valid_until: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword report_url: Sas url to the async benefit utilization summaries report. Will be empty + if the report is in Running or Failed state. Known values are: "Kind", + "AvgUtilizationPercentage", "BenefitOrderId", "BenefitId", "BenefitType", + "MaxUtilizationPercentage", "MinUtilizationPercentage", "UsageDate", and "UtilizedPercentage". + :paramtype report_url: str or + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema + :keyword secondary_report_url: Sas url to async benefit utilization summaries report in + secondary storage in case of primary outage. Will be empty if the report is in Running or + Failed state. Known values are: "Kind", "AvgUtilizationPercentage", "BenefitOrderId", + "BenefitId", "BenefitType", "MaxUtilizationPercentage", "MinUtilizationPercentage", + "UsageDate", and "UtilizedPercentage". + :paramtype secondary_report_url: str or + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema + :keyword valid_until: The date that the sas url provided in reportUrl expires. + :paramtype valid_until: ~datetime.datetime + """ + super().__init__(**kwargs) + self.report_url = report_url + self.secondary_report_url = secondary_report_url + self.valid_until = valid_until class Resource(_serialization.Model): @@ -570,9 +621,9 @@ class Resource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None class BenefitResource(Resource): @@ -668,7 +719,7 @@ def __init__( self.properties = properties -class BenefitRecommendationProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BenefitRecommendationProperties(_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: @@ -676,7 +727,7 @@ class BenefitRecommendationProperties(_serialization.Model): # pylint: disable= 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. + All required parameters must be populated in order to send to server. :ivar first_consumption_date: The first usage date used for looking back for computing the recommendations. @@ -777,18 +828,18 @@ def __init__( :paramtype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails """ super().__init__(**kwargs) - self.first_consumption_date = None - self.last_consumption_date = None + self.first_consumption_date: Optional[datetime.datetime] = None + self.last_consumption_date: Optional[datetime.datetime] = None self.look_back_period = look_back_period - self.total_hours = None + self.total_hours: Optional[int] = None self.usage = usage - self.arm_sku_name = None + self.arm_sku_name: Optional[str] = None self.term = term self.commitment_granularity = commitment_granularity - self.currency_code = None - self.cost_without_benefit = None + self.currency_code: Optional[str] = None + self.cost_without_benefit: Optional[float] = None self.recommendation_details = recommendation_details - self.all_recommendation_details = None + self.all_recommendation_details: Optional["_models.AllSavingsList"] = None self.scope: Optional[str] = None @@ -816,8 +867,8 @@ class BenefitRecommendationsListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.BenefitRecommendationModel"]] = None + self.next_link: Optional[str] = None class BenefitUtilizationSummariesListResult(_serialization.Model): @@ -844,8 +895,156 @@ class BenefitUtilizationSummariesListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.BenefitUtilizationSummary"]] = None + self.next_link: Optional[str] = None + + +class BenefitUtilizationSummariesOperationStatus(_serialization.Model): # pylint: disable=name-too-long + """Status of a benefit utilization summaries report. Provides Async Benefit Utilization Summaries + Request input, status, and report sas url. + + :ivar input: Input given to create the benefit utilization summaries report. + :vartype input: ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :ivar status: The status of the creation of the benefit utilization summaries report. Known + values are: "Running", "Complete", "Failed", and "Completed". + :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType + :ivar properties: Contains sas url to the async benefit utilization summaries report and a date + that the url is valid until. These values will be empty if the report is in a Running or Failed + state. + :vartype properties: ~azure.mgmt.costmanagement.models.AsyncOperationStatusProperties + """ + + _attribute_map = { + "input": {"key": "input", "type": "BenefitUtilizationSummariesRequest"}, + "status": {"key": "status", "type": "str"}, + "properties": {"key": "properties", "type": "AsyncOperationStatusProperties"}, + } + + def __init__( + self, + *, + input: Optional["_models.BenefitUtilizationSummariesRequest"] = None, + status: Optional[Union[str, "_models.OperationStatusType"]] = None, + properties: Optional["_models.AsyncOperationStatusProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword input: Input given to create the benefit utilization summaries report. + :paramtype input: ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword status: The status of the creation of the benefit utilization summaries report. Known + values are: "Running", "Complete", "Failed", and "Completed". + :paramtype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType + :keyword properties: Contains sas url to the async benefit utilization summaries report and a + date that the url is valid until. These values will be empty if the report is in a Running or + Failed state. + :paramtype properties: ~azure.mgmt.costmanagement.models.AsyncOperationStatusProperties + """ + super().__init__(**kwargs) + self.input = input + self.status = status + self.properties = properties + + +class BenefitUtilizationSummariesRequest(_serialization.Model): + """Properties of an async benefit utilization summaries request. + + All required parameters must be populated in order to send to server. + + :ivar billing_account_id: Billing account the benefit utilization summaries report is for. + Required for billing account and billing profile scopes. Not supported for any benefit scopes. + :vartype billing_account_id: str + :ivar billing_profile_id: Billing profile id the benefit utilization summaries report is for. + Required for billing profile scope. Not supported for billing account or any benefit scopes. + :vartype billing_profile_id: str + :ivar benefit_order_id: Benefit order id the benefit utilization summaries report is for. + Required for benefit order and benefit id scopes. Not supported for any billing scopes. + :vartype benefit_order_id: str + :ivar benefit_id: Benefit id the benefit utilization summaries report is for. Required for + benefit id scope. Not supported for benefit order or any billing scopes. + :vartype benefit_id: str + :ivar grain: The grain the summaries data is served at in the report. Accepted values are + 'Daily' or 'Monthly'. Required. Known values are: "Hourly", "Daily", and "Monthly". + :vartype grain: str or ~azure.mgmt.costmanagement.models.Grain + :ivar start_date: The start date of the summaries data that will be served in the report. + Required. + :vartype start_date: ~datetime.datetime + :ivar end_date: The end date of the summaries data that will be served in the report. Required. + :vartype end_date: ~datetime.datetime + :ivar kind: The type of benefit data requested. Required for billing account and billing + profile scopes. Implied and not to be passed at benefit scopes. Supported values are + Reservation and SavingsPlan. Known values are: "IncludedQuantity", "Reservation", and + "SavingsPlan". + :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind + """ + + _validation = { + "grain": {"required": True}, + "start_date": {"required": True}, + "end_date": {"required": True}, + } + + _attribute_map = { + "billing_account_id": {"key": "billingAccountId", "type": "str"}, + "billing_profile_id": {"key": "billingProfileId", "type": "str"}, + "benefit_order_id": {"key": "benefitOrderId", "type": "str"}, + "benefit_id": {"key": "benefitId", "type": "str"}, + "grain": {"key": "grain", "type": "str"}, + "start_date": {"key": "startDate", "type": "iso-8601"}, + "end_date": {"key": "endDate", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + } + + def __init__( + self, + *, + grain: Union[str, "_models.Grain"], + start_date: datetime.datetime, + end_date: datetime.datetime, + billing_account_id: Optional[str] = None, + billing_profile_id: Optional[str] = None, + benefit_order_id: Optional[str] = None, + benefit_id: Optional[str] = None, + kind: Optional[Union[str, "_models.BenefitKind"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword billing_account_id: Billing account the benefit utilization summaries report is for. + Required for billing account and billing profile scopes. Not supported for any benefit scopes. + :paramtype billing_account_id: str + :keyword billing_profile_id: Billing profile id the benefit utilization summaries report is + for. Required for billing profile scope. Not supported for billing account or any benefit + scopes. + :paramtype billing_profile_id: str + :keyword benefit_order_id: Benefit order id the benefit utilization summaries report is for. + Required for benefit order and benefit id scopes. Not supported for any billing scopes. + :paramtype benefit_order_id: str + :keyword benefit_id: Benefit id the benefit utilization summaries report is for. Required for + benefit id scope. Not supported for benefit order or any billing scopes. + :paramtype benefit_id: str + :keyword grain: The grain the summaries data is served at in the report. Accepted values are + 'Daily' or 'Monthly'. Required. Known values are: "Hourly", "Daily", and "Monthly". + :paramtype grain: str or ~azure.mgmt.costmanagement.models.Grain + :keyword start_date: The start date of the summaries data that will be served in the report. + Required. + :paramtype start_date: ~datetime.datetime + :keyword end_date: The end date of the summaries data that will be served in the report. + Required. + :paramtype end_date: ~datetime.datetime + :keyword kind: The type of benefit data requested. Required for billing account and billing + profile scopes. Implied and not to be passed at benefit scopes. Supported values are + Reservation and SavingsPlan. Known values are: "IncludedQuantity", "Reservation", and + "SavingsPlan". + :paramtype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind + """ + super().__init__(**kwargs) + self.billing_account_id = billing_account_id + self.billing_profile_id = billing_profile_id + self.benefit_order_id = benefit_order_id + self.benefit_id = benefit_id + self.grain = grain + self.start_date = start_date + self.end_date = end_date + self.kind = kind class BenefitUtilizationSummary(Resource): @@ -856,7 +1055,7 @@ class BenefitUtilizationSummary(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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -939,11 +1138,11 @@ def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind """ super().__init__(**kwargs) - self.arm_sku_name = None - self.benefit_id = None - self.benefit_order_id = None + self.arm_sku_name: Optional[str] = None + self.benefit_id: Optional[str] = None + self.benefit_order_id: Optional[str] = None self.benefit_type = benefit_type - self.usage_date = None + self.usage_date: Optional[datetime.datetime] = None class BlobInfo(_serialization.Model): @@ -972,151 +1171,942 @@ def __init__(self, *, blob_link: Optional[str] = None, byte_count: Optional[int] self.byte_count = byte_count -class CheckNameAvailabilityRequest(_serialization.Model): - """The check availability request body. +class Budget(CostManagementProxyResource): + """A budget resource. - :ivar name: The name of the resource for which availability needs to be checked. + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. :vartype name: str - :ivar type: The resource type. + :ivar type: Resource type. :vartype type: str + :ivar e_tag: 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. + :vartype e_tag: str + :ivar category: The category of the budget. + + * 'Cost' defines a Budget. + * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. Known values are: + "Cost" and "ReservationUtilization". + :vartype category: str or ~azure.mgmt.costmanagement.models.CategoryType + :ivar amount: The total amount of cost to track with the budget. + + Supported for CategoryType(s): Cost. + + Required for CategoryType(s): Cost. + :vartype amount: float + :ivar time_grain: The time covered by a budget. Tracking of the amount will be reset based on + the time grain. Supported for CategoryType(s): Cost, ReservationUtilization. Supported + timeGrainTypes for **CategoryType: Cost** + + * Monthly + * Quarterly + * Annually + * BillingMonth* + * BillingQuarter* + * + BillingAnnual* + + *only supported for Web Direct customers. + + Supported timeGrainTypes for **CategoryType: ReservationUtilization** + + * Last7Days + * + Last30Days + + Required for CategoryType(s): Cost, ReservationUtilization. Known values are: "Monthly", + "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual", "Last7Days", and + "Last30Days". + :vartype time_grain: str or ~azure.mgmt.costmanagement.models.TimeGrainType + :ivar time_period: The time period that defines the active period of the budget. The budget + will evaluate data on or after the startDate and will expire on the endDate. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Required for CategoryType(s): Cost, ReservationUtilization. + :vartype time_period: ~azure.mgmt.costmanagement.models.BudgetTimePeriod + :ivar filter: May be used to filter budgets by user-specified dimensions and/or tags. + + Supported for CategoryType(s): Cost, ReservationUtilization. + :vartype filter: ~azure.mgmt.costmanagement.models.BudgetFilter + :ivar current_spend: The current amount of cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost. + :vartype current_spend: ~azure.mgmt.costmanagement.models.CurrentSpend + :ivar notifications: Dictionary of notifications associated with the budget. Supported for + CategoryType(s): Cost, ReservationUtilization. + + * Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with + thresholdType: Actual and 5 notifications with thresholdType: Forecasted. + * Constraints for **CategoryType: ReservationUtilization** - Only one notification + allowed. thresholdType is not applicable. + :vartype notifications: dict[str, ~azure.mgmt.costmanagement.models.Notification] + :ivar forecast_spend: The forecasted cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost. + :vartype forecast_spend: ~azure.mgmt.costmanagement.models.ForecastSpend """ + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "current_spend": {"readonly": True}, + "forecast_spend": {"readonly": True}, + } + _attribute_map = { + "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "e_tag": {"key": "eTag", "type": "str"}, + "category": {"key": "properties.category", "type": "str"}, + "amount": {"key": "properties.amount", "type": "float"}, + "time_grain": {"key": "properties.timeGrain", "type": "str"}, + "time_period": {"key": "properties.timePeriod", "type": "BudgetTimePeriod"}, + "filter": {"key": "properties.filter", "type": "BudgetFilter"}, + "current_spend": {"key": "properties.currentSpend", "type": "CurrentSpend"}, + "notifications": {"key": "properties.notifications", "type": "{Notification}"}, + "forecast_spend": {"key": "properties.forecastSpend", "type": "ForecastSpend"}, } - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + e_tag: Optional[str] = None, + category: Optional[Union[str, "_models.CategoryType"]] = None, + amount: Optional[float] = None, + time_grain: Optional[Union[str, "_models.TimeGrainType"]] = None, + time_period: Optional["_models.BudgetTimePeriod"] = None, + filter: Optional["_models.BudgetFilter"] = None, # pylint: disable=redefined-builtin + notifications: Optional[dict[str, "_models.Notification"]] = None, + **kwargs: Any + ) -> None: """ - :keyword name: The name of the resource for which availability needs to be checked. + :keyword e_tag: 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. + :paramtype e_tag: str + :keyword category: The category of the budget. + + * 'Cost' defines a Budget. + * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. Known values + are: "Cost" and "ReservationUtilization". + :paramtype category: str or ~azure.mgmt.costmanagement.models.CategoryType + :keyword amount: The total amount of cost to track with the budget. + + Supported for CategoryType(s): Cost. + + Required for CategoryType(s): Cost. + :paramtype amount: float + :keyword time_grain: The time covered by a budget. Tracking of the amount will be reset based + on the time grain. Supported for CategoryType(s): Cost, ReservationUtilization. Supported + timeGrainTypes for **CategoryType: Cost** + + * Monthly + * Quarterly + * Annually + * BillingMonth* + * BillingQuarter* + * + BillingAnnual* + + *only supported for Web Direct customers. + + Supported timeGrainTypes for **CategoryType: ReservationUtilization** + + * Last7Days + * + Last30Days + + Required for CategoryType(s): Cost, ReservationUtilization. Known values are: + "Monthly", "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual", + "Last7Days", and "Last30Days". + :paramtype time_grain: str or ~azure.mgmt.costmanagement.models.TimeGrainType + :keyword time_period: The time period that defines the active period of the budget. The budget + will evaluate data on or after the startDate and will expire on the endDate. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Required for CategoryType(s): Cost, ReservationUtilization. + :paramtype time_period: ~azure.mgmt.costmanagement.models.BudgetTimePeriod + :keyword filter: May be used to filter budgets by user-specified dimensions and/or tags. + + Supported for CategoryType(s): Cost, ReservationUtilization. + :paramtype filter: ~azure.mgmt.costmanagement.models.BudgetFilter + :keyword notifications: Dictionary of notifications associated with the budget. Supported for + CategoryType(s): Cost, ReservationUtilization. + + * Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with + thresholdType: Actual and 5 notifications with thresholdType: Forecasted. + * Constraints for **CategoryType: ReservationUtilization** - Only one notification + allowed. thresholdType is not applicable. + :paramtype notifications: dict[str, ~azure.mgmt.costmanagement.models.Notification] + """ + super().__init__(e_tag=e_tag, **kwargs) + self.category = category + self.amount = amount + self.time_grain = time_grain + self.time_period = time_period + self.filter = filter + self.current_spend: Optional["_models.CurrentSpend"] = None + self.notifications = notifications + self.forecast_spend: Optional["_models.ForecastSpend"] = None + + +class BudgetComparisonExpression(_serialization.Model): + """The comparison expression to be used in the budgets. + + All required parameters must be populated in order to send to server. + + :ivar name: The name of the column to use in comparison. Required. + :vartype name: str + :ivar operator: The operator to use for comparison. Required. "In" + :vartype operator: str or ~azure.mgmt.costmanagement.models.BudgetOperatorType + :ivar values: Array of values to use for comparison. Required. + :vartype values: list[str] + """ + + _validation = { + "name": {"required": True}, + "operator": {"required": True}, + "values": {"required": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "operator": {"key": "operator", "type": "str"}, + "values": {"key": "values", "type": "[str]"}, + } + + def __init__( + self, *, name: str, operator: Union[str, "_models.BudgetOperatorType"], values: list[str], **kwargs: Any + ) -> None: + """ + :keyword name: The name of the column to use in comparison. Required. :paramtype name: str - :keyword type: The resource type. - :paramtype type: str + :keyword operator: The operator to use for comparison. Required. "In" + :paramtype operator: str or ~azure.mgmt.costmanagement.models.BudgetOperatorType + :keyword values: Array of values to use for comparison. Required. + :paramtype values: list[str] """ super().__init__(**kwargs) self.name = name - self.type = type + self.operator = operator + self.values = values -class CheckNameAvailabilityResponse(_serialization.Model): - """The check availability result. +class BudgetFilter(_serialization.Model): + """May be used to filter budgets by user-specified dimensions and/or tags. - :ivar name_available: Indicates if the resource name is available. - :vartype name_available: bool - :ivar reason: The reason why the given name is not available. Known values are: "Invalid" and - "AlreadyExists". - :vartype reason: str or ~azure.mgmt.costmanagement.models.CheckNameAvailabilityReason - :ivar message: Detailed reason why the given name is available. - :vartype message: str + Supported for CategoryType(s): Cost, ReservationUtilization. + + :ivar and_property: The logical "AND" expression. Must have at least 2 items. + + Supported for CategoryType(s): Cost. + :vartype and_property: list[~azure.mgmt.costmanagement.models.BudgetFilterProperties] + :ivar dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): + Cost, ReservationUtilization. Supported dimension names for **CategoryType: + ReservationUtilization** + + * ReservationId + * ReservedResourceType. + :vartype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + :ivar tags: Has comparison expression for a tag. + + Supported for CategoryType(s): Cost. + :vartype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression """ _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, + "and_property": {"key": "and", "type": "[BudgetFilterProperties]"}, + "dimensions": {"key": "dimensions", "type": "BudgetComparisonExpression"}, + "tags": {"key": "tags", "type": "BudgetComparisonExpression"}, } def __init__( self, *, - name_available: Optional[bool] = None, - reason: Optional[Union[str, "_models.CheckNameAvailabilityReason"]] = None, - message: Optional[str] = None, + and_property: Optional[list["_models.BudgetFilterProperties"]] = None, + dimensions: Optional["_models.BudgetComparisonExpression"] = None, + tags: Optional["_models.BudgetComparisonExpression"] = None, **kwargs: Any ) -> None: """ - :keyword name_available: Indicates if the resource name is available. - :paramtype name_available: bool - :keyword reason: The reason why the given name is not available. Known values are: "Invalid" - and "AlreadyExists". - :paramtype reason: str or ~azure.mgmt.costmanagement.models.CheckNameAvailabilityReason - :keyword message: Detailed reason why the given name is available. - :paramtype message: str + :keyword and_property: The logical "AND" expression. Must have at least 2 items. + + Supported for CategoryType(s): Cost. + :paramtype and_property: list[~azure.mgmt.costmanagement.models.BudgetFilterProperties] + :keyword dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): + Cost, ReservationUtilization. Supported dimension names for **CategoryType: + ReservationUtilization** + + * ReservationId + * ReservedResourceType. + :paramtype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + :keyword tags: Has comparison expression for a tag. + + Supported for CategoryType(s): Cost. + :paramtype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression """ super().__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message + self.and_property = and_property + self.dimensions = dimensions + self.tags = tags -class CommonExportProperties(_serialization.Model): - """The common properties of the export. +class BudgetFilterProperties(_serialization.Model): + """The Dimensions or Tags to filter a budget by. - Variables are only populated by the server, and will be ignored when sending a request. + Supported for CategoryType(s): Cost, ReservationUtilization. - All required parameters must be populated in order to send to Azure. + :ivar dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): + Cost, ReservationUtilization. Supported dimension names for **CategoryType: + ReservationUtilization** - :ivar format: The format of the export being delivered. Currently only 'Csv' is supported. - "Csv" - :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType - :ivar delivery_info: Has delivery information for the export. Required. - :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :ivar definition: Has the definition for the export. Required. - :vartype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :ivar run_history: If requested, has the most recent run history for the export. - :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :ivar partition_data: 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. - :vartype partition_data: bool - :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the - next run time. - :vartype next_run_time_estimate: ~datetime.datetime - """ + * ReservationId + * ReservedResourceType. + :vartype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + :ivar tags: Has comparison expression for a tag. - _validation = { - "delivery_info": {"required": True}, - "definition": {"required": True}, - "next_run_time_estimate": {"readonly": True}, - } + Supported for CategoryType(s): Cost. + :vartype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + """ _attribute_map = { - "format": {"key": "format", "type": "str"}, - "delivery_info": {"key": "deliveryInfo", "type": "ExportDeliveryInfo"}, - "definition": {"key": "definition", "type": "ExportDefinition"}, - "run_history": {"key": "runHistory", "type": "ExportExecutionListResult"}, - "partition_data": {"key": "partitionData", "type": "bool"}, - "next_run_time_estimate": {"key": "nextRunTimeEstimate", "type": "iso-8601"}, + "dimensions": {"key": "dimensions", "type": "BudgetComparisonExpression"}, + "tags": {"key": "tags", "type": "BudgetComparisonExpression"}, } def __init__( self, *, - 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, + dimensions: Optional["_models.BudgetComparisonExpression"] = None, + tags: Optional["_models.BudgetComparisonExpression"] = None, **kwargs: Any ) -> None: """ - :keyword format: The format of the export being delivered. Currently only 'Csv' is supported. - "Csv" - :paramtype format: str or ~azure.mgmt.costmanagement.models.FormatType - :keyword delivery_info: Has delivery information for the export. Required. - :paramtype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :keyword definition: Has the definition for the export. Required. - :paramtype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :keyword run_history: If requested, has the most recent run history for the export. - :paramtype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :keyword partition_data: 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. - :paramtype partition_data: bool + :keyword dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): + Cost, ReservationUtilization. Supported dimension names for **CategoryType: + ReservationUtilization** + + * ReservationId + * ReservedResourceType. + :paramtype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + :keyword tags: Has comparison expression for a tag. + + Supported for CategoryType(s): Cost. + :paramtype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression """ super().__init__(**kwargs) - self.format = format - self.delivery_info = delivery_info - self.definition = definition - self.run_history = run_history - self.partition_data = partition_data - self.next_run_time_estimate = None + self.dimensions = dimensions + self.tags = tags -class CostDetailsOperationResults(_serialization.Model): # pylint: disable=too-many-instance-attributes - """The result of the long running operation for cost details Api. +class BudgetsListResult(_serialization.Model): + """Result of listing budgets. It contains a list of available budgets in the scope provided. - :ivar id: The id of the long running operation. + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of budgets. + :vartype value: list[~azure.mgmt.costmanagement.models.Budget] + :ivar next_link: The link (url) to the next page of results. It's null for now, added for + future use. + :vartype next_link: str + """ + + _validation = { + "value": {"readonly": True}, + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[Budget]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.value: Optional[list["_models.Budget"]] = None + self.next_link: Optional[str] = None + + +class BudgetTimePeriod(_serialization.Model): + """The time period that defines the active period of the budget. The budget will evaluate data on + or after the startDate and will expire on the endDate. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Required for CategoryType(s): Cost, ReservationUtilization. + + All required parameters must be populated in order to send to server. + + :ivar start_date: The start date for the budget. + + * + Constraints for **CategoryType: Cost** - Must be first of the month and should be less + than the end date. Budget start date must be on or after June 1, 2017. Future start date should + not be more than twelve months. Past start date should be selected within the timegrain + period. + + * + Constraints for **CategoryType: ReservationUtilization** - Must be on or after the current + date and less than the end date. Required. + :vartype start_date: ~datetime.datetime + :ivar end_date: The end date for the budget. + + * + Constraints for **CategoryType: Cost** - No constraints. If not provided, we default this + to 10 years from the start date. + + * + Constraints for **CategoryType: ReservationUtilization** - End date cannot be more than 3 + years after the start date. + :vartype end_date: ~datetime.datetime + """ + + _validation = { + "start_date": {"required": True}, + } + + _attribute_map = { + "start_date": {"key": "startDate", "type": "iso-8601"}, + "end_date": {"key": "endDate", "type": "iso-8601"}, + } + + def __init__( + self, *, start_date: datetime.datetime, end_date: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: + """ + :keyword start_date: The start date for the budget. + + * + Constraints for **CategoryType: Cost** - Must be first of the month and should be less + than the end date. Budget start date must be on or after June 1, 2017. Future start date should + not be more than twelve months. Past start date should be selected within the timegrain + period. + + * + Constraints for **CategoryType: ReservationUtilization** - Must be on or after the + current date and less than the end date. Required. + :paramtype start_date: ~datetime.datetime + :keyword end_date: The end date for the budget. + + * + Constraints for **CategoryType: Cost** - No constraints. If not provided, we default + this to 10 years from the start date. + + * + Constraints for **CategoryType: ReservationUtilization** - End date cannot be more + than 3 years after the start date. + :paramtype end_date: ~datetime.datetime + """ + super().__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + + +class CheckNameAvailabilityRequest(_serialization.Model): + """The check availability request body. + + :ivar name: The name of the resource for which availability needs to be checked. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword name: The name of the resource for which availability needs to be checked. + :paramtype name: str + :keyword type: The resource type. + :paramtype type: str + """ + super().__init__(**kwargs) + self.name = name + self.type = type + + +class CheckNameAvailabilityResponse(_serialization.Model): + """The check availability result. + + :ivar name_available: Indicates if the resource name is available. + :vartype name_available: bool + :ivar reason: The reason why the given name is not available. Known values are: "Invalid" and + "AlreadyExists". + :vartype reason: str or ~azure.mgmt.costmanagement.models.CheckNameAvailabilityReason + :ivar message: Detailed reason why the given name is available. + :vartype message: str + """ + + _attribute_map = { + "name_available": {"key": "nameAvailable", "type": "bool"}, + "reason": {"key": "reason", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "_models.CheckNameAvailabilityReason"]] = None, + message: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name_available: Indicates if the resource name is available. + :paramtype name_available: bool + :keyword reason: The reason why the given name is not available. Known values are: "Invalid" + and "AlreadyExists". + :paramtype reason: str or ~azure.mgmt.costmanagement.models.CheckNameAvailabilityReason + :keyword message: Detailed reason why the given name is available. + :paramtype message: str + """ + super().__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class CommonExportProperties(_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 server. + + :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". + :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType + :ivar delivery_info: Has delivery information for the export. Required. + :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :ivar definition: Has the definition for the export. Required. + :vartype definition: ~azure.mgmt.costmanagement.models.ExportDefinition + :ivar run_history: If requested, has the most recent run history for the export. + :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :ivar partition_data: If set to true, exported data will be partitioned by size and placed in a + blob directory together with a manifest file. + :vartype partition_data: bool + :ivar data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :vartype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :ivar compression_mode: Allow customers to select compress data for exports. This setting will + enable destination file compression scheme at runtime. By default set to None. Gzip is for csv + and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :ivar export_description: The export description set by customer at time of export + creation/update. + :vartype export_description: str + :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the + next run time. + :vartype next_run_time_estimate: ~datetime.datetime + :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended + state. This is not populated currently. + :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext + """ + + _validation = { + "delivery_info": {"required": True}, + "definition": {"required": True}, + "next_run_time_estimate": {"readonly": True}, + "system_suspension_context": {"readonly": True}, + } + + _attribute_map = { + "format": {"key": "format", "type": "str"}, + "delivery_info": {"key": "deliveryInfo", "type": "ExportDeliveryInfo"}, + "definition": {"key": "definition", "type": "ExportDefinition"}, + "run_history": {"key": "runHistory", "type": "ExportExecutionListResult"}, + "partition_data": {"key": "partitionData", "type": "bool"}, + "data_overwrite_behavior": {"key": "dataOverwriteBehavior", "type": "str"}, + "compression_mode": {"key": "compressionMode", "type": "str"}, + "export_description": {"key": "exportDescription", "type": "str"}, + "next_run_time_estimate": {"key": "nextRunTimeEstimate", "type": "iso-8601"}, + "system_suspension_context": {"key": "systemSuspensionContext", "type": "ExportSuspensionContext"}, + } + + def __init__( + self, + *, + 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, + data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, + compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, + export_description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword format: The format of the export being delivered. Known values are: "Csv" and + "Parquet". + :paramtype format: str or ~azure.mgmt.costmanagement.models.FormatType + :keyword delivery_info: Has delivery information for the export. Required. + :paramtype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :keyword definition: Has the definition for the export. Required. + :paramtype definition: ~azure.mgmt.costmanagement.models.ExportDefinition + :keyword run_history: If requested, has the most recent run history for the export. + :paramtype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :keyword partition_data: If set to true, exported data will be partitioned by size and placed + in a blob directory together with a manifest file. + :paramtype partition_data: bool + :keyword data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :paramtype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :keyword compression_mode: Allow customers to select compress data for exports. This setting + will enable destination file compression scheme at runtime. By default set to None. Gzip is for + csv and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :paramtype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :keyword export_description: The export description set by customer at time of export + creation/update. + :paramtype export_description: str + """ + super().__init__(**kwargs) + self.format = format + self.delivery_info = delivery_info + self.definition = definition + self.run_history = run_history + self.partition_data = partition_data + self.data_overwrite_behavior = data_overwrite_behavior + self.compression_mode = compression_mode + self.export_description = export_description + self.next_run_time_estimate: Optional[datetime.datetime] = None + self.system_suspension_context: Optional["_models.ExportSuspensionContext"] = None + + +class CostAllocationProportion(_serialization.Model): + """Target resources and allocation. + + All required parameters must be populated in order to send to server. + + :ivar name: Target resource for cost allocation. Required. + :vartype name: str + :ivar percentage: Percentage of source cost to allocate to this resource. This value can be + specified to two decimal places and the total percentage of all resources in this rule must sum + to 100.00. Required. + :vartype percentage: float + """ + + _validation = { + "name": {"required": True}, + "percentage": {"required": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "percentage": {"key": "percentage", "type": "float"}, + } + + def __init__(self, *, name: str, percentage: float, **kwargs: Any) -> None: + """ + :keyword name: Target resource for cost allocation. Required. + :paramtype name: str + :keyword percentage: Percentage of source cost to allocate to this resource. This value can be + specified to two decimal places and the total percentage of all resources in this rule must sum + to 100.00. Required. + :paramtype percentage: float + """ + super().__init__(**kwargs) + self.name = name + self.percentage = percentage + + +class CostAllocationResource(_serialization.Model): + """Common values for resources for cost allocation. + + All required parameters must be populated in order to send to server. + + :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known + values are: "Dimension" and "Tag". + :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :ivar name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :vartype name: str + """ + + _validation = { + "resource_type": {"required": True}, + "name": {"required": True}, + } + + _attribute_map = { + "resource_type": {"key": "resourceType", "type": "str"}, + "name": {"key": "name", "type": "str"}, + } + + def __init__( + self, *, resource_type: Union[str, "_models.CostAllocationResourceType"], name: str, **kwargs: Any + ) -> None: + """ + :keyword resource_type: Type of resources contained in this cost allocation rule. Required. + Known values are: "Dimension" and "Tag". + :paramtype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :keyword name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :paramtype name: str + """ + super().__init__(**kwargs) + self.resource_type = resource_type + self.name = name + + +class CostAllocationRuleCheckNameAvailabilityRequest(_serialization.Model): # pylint: disable=name-too-long + """The cost allocation rule check name availability request. + + :ivar name: Rule name. + :vartype name: str + :ivar type: Resource type. This is expected to be Microsoft.CostManagement/costAllocationRules. + :vartype type: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword name: Rule name. + :paramtype name: str + :keyword type: Resource type. This is expected to be + Microsoft.CostManagement/costAllocationRules. + :paramtype type: str + """ + super().__init__(**kwargs) + self.name = name + self.type = type + + +class CostAllocationRuleCheckNameAvailabilityResponse(_serialization.Model): # pylint: disable=name-too-long + """The cost allocation rule check name availability response. + + :ivar name_available: Whether this rule name is available. + :vartype name_available: bool + :ivar reason: The reason this name is not available. Known values are: "Invalid", + "AlreadyExists", and "Valid". + :vartype reason: str or ~azure.mgmt.costmanagement.models.Reason + :ivar message: Error message if the name is not available. + :vartype message: str + """ + + _attribute_map = { + "name_available": {"key": "nameAvailable", "type": "bool"}, + "reason": {"key": "reason", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "_models.Reason"]] = None, + message: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name_available: Whether this rule name is available. + :paramtype name_available: bool + :keyword reason: The reason this name is not available. Known values are: "Invalid", + "AlreadyExists", and "Valid". + :paramtype reason: str or ~azure.mgmt.costmanagement.models.Reason + :keyword message: Error message if the name is not available. + :paramtype message: str + """ + super().__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class CostAllocationRuleDefinition(_serialization.Model): + """The cost allocation rule model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure Resource Manager Id for the rule. This is a read ony value. + :vartype id: str + :ivar name: Name of the rule. This is a read only value. + :vartype name: str + :ivar type: Resource type of the rule. This is a read only value of + Microsoft.CostManagement/CostAllocationRule. + :vartype type: str + :ivar properties: Cost allocation rule properties. + :vartype properties: ~azure.mgmt.costmanagement.models.CostAllocationRuleProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "CostAllocationRuleProperties"}, + } + + def __init__(self, *, properties: Optional["_models.CostAllocationRuleProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: Cost allocation rule properties. + :paramtype properties: ~azure.mgmt.costmanagement.models.CostAllocationRuleProperties + """ + super().__init__(**kwargs) + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.properties = properties + + +class CostAllocationRuleDetails(_serialization.Model): + """Resource details of the cost allocation rule. + + :ivar source_resources: Source resources for cost allocation. At this time, this list can + contain no more than one element. + :vartype source_resources: list[~azure.mgmt.costmanagement.models.SourceCostAllocationResource] + :ivar target_resources: Target resources for cost allocation. At this time, this list can + contain no more than one element. + :vartype target_resources: list[~azure.mgmt.costmanagement.models.TargetCostAllocationResource] + """ + + _attribute_map = { + "source_resources": {"key": "sourceResources", "type": "[SourceCostAllocationResource]"}, + "target_resources": {"key": "targetResources", "type": "[TargetCostAllocationResource]"}, + } + + def __init__( + self, + *, + source_resources: Optional[list["_models.SourceCostAllocationResource"]] = None, + target_resources: Optional[list["_models.TargetCostAllocationResource"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword source_resources: Source resources for cost allocation. At this time, this list can + contain no more than one element. + :paramtype source_resources: + list[~azure.mgmt.costmanagement.models.SourceCostAllocationResource] + :keyword target_resources: Target resources for cost allocation. At this time, this list can + contain no more than one element. + :paramtype target_resources: + list[~azure.mgmt.costmanagement.models.TargetCostAllocationResource] + """ + super().__init__(**kwargs) + self.source_resources = source_resources + self.target_resources = target_resources + + +class CostAllocationRuleList(_serialization.Model): + """Result of listing cost allocation rules. It contains a list of available rules in the billing + account or enterprise enrollment provided. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of cost allocation rules. + :vartype value: list[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] + :ivar next_link: URL to get the next set of rule list results if there are any. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[CostAllocationRuleDefinition]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[list["_models.CostAllocationRuleDefinition"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of cost allocation rules. + :paramtype value: list[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] + """ + super().__init__(**kwargs) + self.value = value + self.next_link: Optional[str] = None + + +class CostAllocationRuleProperties(_serialization.Model): + """The properties of a cost allocation rule. + + 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 server. + + :ivar description: Description of a cost allocation rule. + :vartype description: str + :ivar details: Resource information for the cost allocation rule. Required. + :vartype details: ~azure.mgmt.costmanagement.models.CostAllocationRuleDetails + :ivar status: Status of the rule. Required. Known values are: "NotActive", "Active", and + "Processing". + :vartype status: str or ~azure.mgmt.costmanagement.models.RuleStatus + :ivar created_date: Time at which the rule was created. Rules that change cost for the same + resource are applied in order of creation. + :vartype created_date: ~datetime.datetime + :ivar updated_date: Time at which the rule was last updated. + :vartype updated_date: ~datetime.datetime + """ + + _validation = { + "details": {"required": True}, + "status": {"required": True}, + "created_date": {"readonly": True}, + "updated_date": {"readonly": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "details": {"key": "details", "type": "CostAllocationRuleDetails"}, + "status": {"key": "status", "type": "str"}, + "created_date": {"key": "createdDate", "type": "iso-8601"}, + "updated_date": {"key": "updatedDate", "type": "iso-8601"}, + } + + def __init__( + self, + *, + details: "_models.CostAllocationRuleDetails", + status: Union[str, "_models.RuleStatus"], + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword description: Description of a cost allocation rule. + :paramtype description: str + :keyword details: Resource information for the cost allocation rule. Required. + :paramtype details: ~azure.mgmt.costmanagement.models.CostAllocationRuleDetails + :keyword status: Status of the rule. Required. Known values are: "NotActive", "Active", and + "Processing". + :paramtype status: str or ~azure.mgmt.costmanagement.models.RuleStatus + """ + super().__init__(**kwargs) + self.description = description + self.details = details + self.status = status + self.created_date: Optional[datetime.datetime] = None + self.updated_date: Optional[datetime.datetime] = None + + +class CostDetailsOperationResults(_serialization.Model): + """The result of the long running operation for cost details Api. + + :ivar id: The id of the long running operation. :vartype id: str :ivar name: The name of the long running operation. :vartype name: str @@ -1183,7 +2173,7 @@ def __init__( byte_count: Optional[int] = None, blob_count: Optional[int] = None, compress_data: Optional[bool] = None, - blobs: Optional[List["_models.BlobInfo"]] = None, + blobs: Optional[list["_models.BlobInfo"]] = None, request_scope: Optional[str] = None, request_body: Optional["_models.GenerateCostDetailsReportRequestDefinition"] = None, **kwargs: Any @@ -1242,7 +2232,7 @@ class CostDetailsTimePeriod(_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. + All required parameters must be populated in order to send to server. :ivar start: The start date to pull data from. example format 2020-03-15. Required. :vartype start: str @@ -1315,11 +2305,11 @@ def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kw :paramtype display: ~azure.mgmt.costmanagement.models.OperationDisplay """ super().__init__(**kwargs) - self.name = None - self.is_data_action = None + self.name: Optional[str] = None + self.is_data_action: Optional[bool] = None self.display = display - self.origin = None - self.action_type = None + self.origin: Optional[Union[str, "_models.Origin"]] = None + self.action_type: Optional[Union[str, "_models.ActionType"]] = None class CostManagementOperation(Operation): @@ -1369,7 +2359,7 @@ def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kw :paramtype display: ~azure.mgmt.costmanagement.models.OperationDisplay """ super().__init__(display=display, **kwargs) - self.id = None + self.id: Optional[str] = None class CostManagementResource(_serialization.Model): @@ -1416,16 +2406,46 @@ class CostManagementResource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.sku = None - self.e_tag = None - self.tags = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.location: Optional[str] = None + self.sku: Optional[str] = None + self.e_tag: Optional[str] = None + self.tags: Optional[dict[str, str]] = None + + +class CurrentSpend(_serialization.Model): + """The current amount of cost which is being tracked for a budget. + Supported for CategoryType(s): Cost. -class Dimension(CostManagementResource): # pylint: disable=too-many-instance-attributes + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar amount: The total amount of cost which is being tracked by the budget. + :vartype amount: float + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + "amount": {"readonly": True}, + "unit": {"readonly": True}, + } + + _attribute_map = { + "amount": {"key": "amount", "type": "float"}, + "unit": {"key": "unit", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.amount: Optional[float] = None + self.unit: Optional[str] = None + + +class Dimension(CostManagementResource): """List of Dimension. Variables are only populated by the server, and will be ignored when sending a request. @@ -1501,21 +2521,21 @@ class Dimension(CostManagementResource): # pylint: disable=too-many-instance-at "next_link": {"key": "properties.nextLink", "type": "str"}, } - def __init__(self, *, data: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, data: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword data: Dimension data. :paramtype data: list[str] """ super().__init__(**kwargs) - self.description = None - self.filter_enabled = None - self.grouping_enabled = None + self.description: Optional[str] = None + self.filter_enabled: Optional[bool] = None + self.grouping_enabled: Optional[bool] = None self.data = data - self.total = None - self.category = None - self.usage_start = None - self.usage_end = None - self.next_link = None + self.total: Optional[int] = None + self.category: Optional[str] = None + self.usage_start: Optional[datetime.datetime] = None + self.usage_end: Optional[datetime.datetime] = None + self.next_link: Optional[str] = None class DimensionsListResult(_serialization.Model): @@ -1538,10 +2558,10 @@ class DimensionsListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Dimension"]] = None -class DismissAlertPayload(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DismissAlertPayload(_serialization.Model): """The request payload to update an alert. :ivar definition: defines the type of alert. @@ -1658,25 +2678,309 @@ class DownloadURL(_serialization.Model): } _attribute_map = { - "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, - "valid_till": {"key": "validTill", "type": "iso-8601"}, - "download_url": {"key": "downloadUrl", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "valid_till": {"key": "validTill", "type": "iso-8601"}, + "download_url": {"key": "downloadUrl", "type": "str"}, + } + + def __init__( + self, *, valid_till: Optional[datetime.datetime] = None, download_url: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword valid_till: The time at which report URL becomes invalid/expires in UTC e.g. + 2020-12-08T05:55:59.4394737Z. + :paramtype valid_till: ~datetime.datetime + :keyword download_url: The URL to download the generated report. + :paramtype download_url: str + """ + super().__init__(**kwargs) + self.expiry_time: Optional[datetime.datetime] = None + self.valid_till = valid_till + self.download_url = download_url + + +class EAPriceSheetProperties(_serialization.Model): + """The properties of the EA price sheet. Properties supported with version 2025-03-01 are as + below. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar enrollment_number: Unique identifier for the EA billing account. + :vartype enrollment_number: str + :ivar service_family: Type of Azure service. For example, Compute, Analytics, and Security. + :vartype service_family: float + :ivar product: Name of the product accruing the charges. + :vartype product: str + :ivar product_id: Unique identifier for the product whose meter is consumed. + :vartype product_id: str + :ivar sku_id: Unique identifier of the SKU. + :vartype sku_id: str + :ivar unit_of_measure: How usage is measured for the service. Note: The field “Unit” has been + removed with version 2023-11-01 as a duplicate of “UnitofMeasure”, please use the field + “UnitOfMeasure”. + :vartype unit_of_measure: str + :ivar meter_id: Unique identifier of the meter. + :vartype meter_id: str + :ivar meter_name: Name of the meter. The meter represents the deployable resource of an Azure + service. + :vartype meter_name: str + :ivar meter_type: Name of the meter type. + :vartype meter_type: str + :ivar offer_id: Determines the Azure offer associated with this meter. [Learn more about Azure + offers] (https://azure.microsoft.com/en-us/support/legal/offer-details/). + :vartype offer_id: str + :ivar meter_category: Name of the classification category for the meter. For example, Cloud + services, Networking, etc. + :vartype meter_category: str + :ivar meter_sub_category: Name of the meter subclassification category. + :vartype meter_sub_category: str + :ivar meter_region: Name of the Azure region where the meter for the service is available. + :vartype meter_region: str + :ivar effective_start_date: Effective start date of the Price Sheet billing period. + :vartype effective_start_date: ~datetime.datetime + :ivar effective_end_date: Effective end date of the Price Sheet billing period. + :vartype effective_end_date: ~datetime.datetime + :ivar unit_price: The per-unit price at the time of billing for a given product or service, + inclusive of any negotiated discounts on top of the market price. + + For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year + commitment including discounts. + + Note: The unit price isn't the same as the effective price in usage details downloads when + services have differential prices across tiers. + + If services have multi-tiered pricing, the effective price is a blended rate across the tiers + and doesn't show a tier-specific unit price. The blended price or effective price is the net + price for the consumed quantity spanning across the multiple tiers (where each tier has a + specific unit price). + :vartype unit_price: str + :ivar base_price: The unit price at the time the customer signs on or the unit price at the + time of service meter GA launch if it is after sign-on. + + This is applicable for Enterprise Agreement users. + :vartype base_price: str + :ivar market_price: The current list price for a given product or service. This price is + without any negotiations and is based on your Microsoft Agreement type. + + For PriceType Consumption, market price is reflected as the pay-as-you-go price. + + For PriceType Savings Plan, market price reflects the Savings plan benefit on top of + pay-as-you-go price for the corresponding commitment term. + + For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year + commitment. + + Note: For EA customers with no negotiations, market price may appear rounded to a different + decimal precision than unit price. + :vartype market_price: str + :ivar included_quantity: Quantities of a specific service to which an EA customer is entitled + to consume without incremental charges. + :vartype included_quantity: str + :ivar currency_code: Currency in which the Enterprise Agreement was signed. + :vartype currency_code: str + :ivar term: Term length for Azure Savings Plan or Reservation term – one year or three years + (P1Y or P3Y). + :vartype term: str + :ivar price_type: Price type for a product. For example, an Azure resource with a pay-as-you-go + rate with priceType as Consumption. Other price types include ReservedInstance and Savings + Plan. + :vartype price_type: str + :ivar part_number: Part number associated with the meter. + :vartype part_number: str + """ + + _validation = { + "enrollment_number": {"readonly": True}, + "service_family": {"readonly": True}, + "product": {"readonly": True}, + "product_id": {"readonly": True}, + "sku_id": {"readonly": True}, + "unit_of_measure": {"readonly": True}, + "meter_id": {"readonly": True}, + "meter_name": {"readonly": True}, + "meter_type": {"readonly": True}, + "offer_id": {"readonly": True}, + "meter_category": {"readonly": True}, + "meter_sub_category": {"readonly": True}, + "meter_region": {"readonly": True}, + "effective_start_date": {"readonly": True}, + "effective_end_date": {"readonly": True}, + "unit_price": {"readonly": True}, + "base_price": {"readonly": True}, + "market_price": {"readonly": True}, + "included_quantity": {"readonly": True}, + "currency_code": {"readonly": True}, + "term": {"readonly": True}, + "price_type": {"readonly": True}, + "part_number": {"readonly": True}, + } + + _attribute_map = { + "enrollment_number": {"key": "enrollmentNumber", "type": "str"}, + "service_family": {"key": "serviceFamily", "type": "float"}, + "product": {"key": "product", "type": "str"}, + "product_id": {"key": "productId", "type": "str"}, + "sku_id": {"key": "skuId", "type": "str"}, + "unit_of_measure": {"key": "unitOfMeasure", "type": "str"}, + "meter_id": {"key": "meterId", "type": "str"}, + "meter_name": {"key": "meterName", "type": "str"}, + "meter_type": {"key": "meterType", "type": "str"}, + "offer_id": {"key": "offerId", "type": "str"}, + "meter_category": {"key": "meterCategory", "type": "str"}, + "meter_sub_category": {"key": "meterSubCategory", "type": "str"}, + "meter_region": {"key": "meterRegion", "type": "str"}, + "effective_start_date": {"key": "effectiveStartDate", "type": "iso-8601"}, + "effective_end_date": {"key": "effectiveEndDate", "type": "iso-8601"}, + "unit_price": {"key": "unitPrice", "type": "str"}, + "base_price": {"key": "basePrice", "type": "str"}, + "market_price": {"key": "marketPrice", "type": "str"}, + "included_quantity": {"key": "includedQuantity", "type": "str"}, + "currency_code": {"key": "currencyCode", "type": "str"}, + "term": {"key": "term", "type": "str"}, + "price_type": {"key": "priceType", "type": "str"}, + "part_number": {"key": "partNumber", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.enrollment_number: Optional[str] = None + self.service_family: Optional[float] = None + self.product: Optional[str] = None + self.product_id: Optional[str] = None + self.sku_id: Optional[str] = None + self.unit_of_measure: Optional[str] = None + self.meter_id: Optional[str] = None + self.meter_name: Optional[str] = None + self.meter_type: Optional[str] = None + self.offer_id: Optional[str] = None + self.meter_category: Optional[str] = None + self.meter_sub_category: Optional[str] = None + self.meter_region: Optional[str] = None + self.effective_start_date: Optional[datetime.datetime] = None + self.effective_end_date: Optional[datetime.datetime] = None + self.unit_price: Optional[str] = None + self.base_price: Optional[str] = None + self.market_price: Optional[str] = None + self.included_quantity: Optional[str] = None + self.currency_code: Optional[str] = None + self.term: Optional[str] = None + self.price_type: Optional[str] = None + self.part_number: Optional[str] = None + + +class ErrorAdditionalInfo(_serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: JSON + """ + + _validation = { + "type": {"readonly": True}, + "info": {"readonly": True}, + } + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type: Optional[str] = None + self.info: Optional[JSON] = None + + +class ErrorDetail(_serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.costmanagement.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.costmanagement.models.ErrorAdditionalInfo] + """ + + _validation = { + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[list["_models.ErrorDetail"]] = None + self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None + + +class ErrorDetailAutoGenerated(_serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.costmanagement.models.ErrorAdditionalInfo] + """ + + _validation = { + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetailAutoGenerated]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, *, valid_till: Optional[datetime.datetime] = None, download_url: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :paramtype valid_till: ~datetime.datetime - :keyword download_url: The URL to download the generated report. - :paramtype download_url: str - """ + def __init__(self, **kwargs: Any) -> None: + """ """ super().__init__(**kwargs) - self.expiry_time = None - self.valid_till = valid_till - self.download_url = download_url + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[list["_models.ErrorDetailAutoGenerated"]] = None + self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None class ErrorDetails(_serialization.Model): @@ -1703,8 +3007,8 @@ class ErrorDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None + self.code: Optional[str] = None + self.message: Optional[str] = None class ErrorDetailsWithNestedDetails(ErrorDetails): @@ -1735,7 +3039,7 @@ class ErrorDetailsWithNestedDetails(ErrorDetails): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.details = None + self.details: Optional[list["_models.ErrorDetailsWithNestedDetails"]] = None class ErrorResponse(_serialization.Model): @@ -1770,6 +3074,48 @@ def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs: self.error = error +class ErrorResponseAutoGenerated(_serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetail + """ + + _attribute_map = { + "error": {"key": "error", "type": "ErrorDetail"}, + } + + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetail + """ + super().__init__(**kwargs) + self.error = error + + +class ErrorResponseAutoGenerated2(_serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated + """ + + _attribute_map = { + "error": {"key": "error", "type": "ErrorDetailAutoGenerated"}, + } + + def __init__(self, *, error: Optional["_models.ErrorDetailAutoGenerated"] = None, **kwargs: Any) -> None: + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated + """ + super().__init__(**kwargs) + self.error = error + + class ErrorResponseWithNestedDetails(_serialization.Model): """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. @@ -1802,7 +3148,7 @@ def __init__(self, *, error: Optional["_models.ErrorDetailsWithNestedDetails"] = self.error = error -class Export(CostManagementProxyResource): # pylint: disable=too-many-instance-attributes +class Export(CostManagementProxyResource): """An export resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1816,8 +3162,12 @@ class Export(CostManagementProxyResource): # pylint: disable=too-many-instance- :ivar e_tag: 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. :vartype e_tag: str - :ivar format: The format of the export being delivered. Currently only 'Csv' is supported. - "Csv" + :ivar identity: The managed identity associated with Export. + :vartype identity: ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity + :ivar location: The location of the Export's managed identity. Only required when utilizing + managed identity. + :vartype location: str + :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType :ivar delivery_info: Has delivery information for the export. :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo @@ -1826,12 +3176,27 @@ class Export(CostManagementProxyResource): # pylint: disable=too-many-instance- :ivar run_history: If requested, has the most recent run history for the export. :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult :ivar partition_data: 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. + blob directory together with a manifest file. :vartype partition_data: bool + :ivar data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :vartype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :ivar compression_mode: Allow customers to select compress data for exports. This setting will + enable destination file compression scheme at runtime. By default set to None. Gzip is for csv + and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :ivar export_description: The export description set by customer at time of export + creation/update. + :vartype export_description: str :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the next run time. :vartype next_run_time_estimate: ~datetime.datetime + :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended + state. This is not populated currently. + :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext :ivar schedule: Has schedule information for the export. :vartype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule """ @@ -1841,6 +3206,7 @@ class Export(CostManagementProxyResource): # pylint: disable=too-many-instance- "name": {"readonly": True}, "type": {"readonly": True}, "next_run_time_estimate": {"readonly": True}, + "system_suspension_context": {"readonly": True}, } _attribute_map = { @@ -1848,12 +3214,18 @@ class Export(CostManagementProxyResource): # pylint: disable=too-many-instance- "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "e_tag": {"key": "eTag", "type": "str"}, + "identity": {"key": "identity", "type": "SystemAssignedServiceIdentity"}, + "location": {"key": "location", "type": "str"}, "format": {"key": "properties.format", "type": "str"}, "delivery_info": {"key": "properties.deliveryInfo", "type": "ExportDeliveryInfo"}, "definition": {"key": "properties.definition", "type": "ExportDefinition"}, "run_history": {"key": "properties.runHistory", "type": "ExportExecutionListResult"}, "partition_data": {"key": "properties.partitionData", "type": "bool"}, + "data_overwrite_behavior": {"key": "properties.dataOverwriteBehavior", "type": "str"}, + "compression_mode": {"key": "properties.compressionMode", "type": "str"}, + "export_description": {"key": "properties.exportDescription", "type": "str"}, "next_run_time_estimate": {"key": "properties.nextRunTimeEstimate", "type": "iso-8601"}, + "system_suspension_context": {"key": "properties.systemSuspensionContext", "type": "ExportSuspensionContext"}, "schedule": {"key": "properties.schedule", "type": "ExportSchedule"}, } @@ -1861,11 +3233,16 @@ def __init__( self, *, e_tag: Optional[str] = None, + identity: Optional["_models.SystemAssignedServiceIdentity"] = None, + location: 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, + data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, + compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, + export_description: Optional[str] = None, schedule: Optional["_models.ExportSchedule"] = None, **kwargs: Any ) -> None: @@ -1873,8 +3250,13 @@ def __init__( :keyword e_tag: 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. :paramtype e_tag: str - :keyword format: The format of the export being delivered. Currently only 'Csv' is supported. - "Csv" + :keyword identity: The managed identity associated with Export. + :paramtype identity: ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity + :keyword location: The location of the Export's managed identity. Only required when utilizing + managed identity. + :paramtype location: str + :keyword format: The format of the export being delivered. Known values are: "Csv" and + "Parquet". :paramtype format: str or ~azure.mgmt.costmanagement.models.FormatType :keyword delivery_info: Has delivery information for the export. :paramtype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo @@ -1883,27 +3265,45 @@ def __init__( :keyword run_history: If requested, has the most recent run history for the export. :paramtype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult :keyword partition_data: 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. + in a blob directory together with a manifest file. :paramtype partition_data: bool + :keyword data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :paramtype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :keyword compression_mode: Allow customers to select compress data for exports. This setting + will enable destination file compression scheme at runtime. By default set to None. Gzip is for + csv and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :paramtype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :keyword export_description: The export description set by customer at time of export + creation/update. + :paramtype export_description: str :keyword schedule: Has schedule information for the export. :paramtype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule """ super().__init__(e_tag=e_tag, **kwargs) + self.identity = identity + self.location = location self.format = format self.delivery_info = delivery_info self.definition = definition self.run_history = run_history self.partition_data = partition_data - self.next_run_time_estimate = None + self.data_overwrite_behavior = data_overwrite_behavior + self.compression_mode = compression_mode + self.export_description = export_description + self.next_run_time_estimate: Optional[datetime.datetime] = None + self.system_suspension_context: Optional["_models.ExportSuspensionContext"] = None self.schedule = schedule class ExportDataset(_serialization.Model): """The definition for data in the export. - :ivar granularity: The granularity of rows in the export. Currently only 'Daily' is supported. - "Daily" + :ivar granularity: The granularity of rows in the export. Currently 'Daily' is supported for + most cases. Known values are: "Daily" and "Monthly". :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :ivar configuration: The export dataset configuration. :vartype configuration: ~azure.mgmt.costmanagement.models.ExportDatasetConfiguration @@ -1922,8 +3322,8 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword granularity: The granularity of rows in the export. Currently only 'Daily' is - supported. "Daily" + :keyword granularity: The granularity of rows in the export. Currently 'Daily' is supported for + most cases. Known values are: "Daily" and "Monthly". :paramtype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :keyword configuration: The export dataset configuration. :paramtype configuration: ~azure.mgmt.costmanagement.models.ExportDatasetConfiguration @@ -1934,42 +3334,64 @@ def __init__( class ExportDatasetConfiguration(_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. + """This is on path to deprecation and will not be supported going forward. :ivar columns: 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). :vartype columns: list[str] + :ivar data_version: The data version for the selected for the export. If not provided then the + export will default to latest data version. + :vartype data_version: str + :ivar filters: Filters associated with the data sets. + :vartype filters: list[~azure.mgmt.costmanagement.models.FilterItems] """ _attribute_map = { "columns": {"key": "columns", "type": "[str]"}, + "data_version": {"key": "dataVersion", "type": "str"}, + "filters": {"key": "filters", "type": "[FilterItems]"}, } - def __init__(self, *, columns: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + columns: Optional[list[str]] = None, + data_version: Optional[str] = None, + filters: Optional[list["_models.FilterItems"]] = None, + **kwargs: Any + ) -> None: """ :keyword columns: 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). :paramtype columns: list[str] + :keyword data_version: The data version for the selected for the export. If not provided then + the export will default to latest data version. + :paramtype data_version: str + :keyword filters: Filters associated with the data sets. + :paramtype filters: list[~azure.mgmt.costmanagement.models.FilterItems] """ super().__init__(**kwargs) self.columns = columns + self.data_version = data_version + self.filters = filters class ExportDefinition(_serialization.Model): """The definition of an export. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar type: 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". + reservations. Required. Known values are: "Usage", "ActualCost", "AmortizedCost", "FocusCost", + "PriceSheet", "ReservationTransactions", "ReservationRecommendations", and + "ReservationDetails". :vartype type: str or ~azure.mgmt.costmanagement.models.ExportType :ivar timeframe: 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". + "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom", and "TheCurrentMonth". :vartype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :ivar time_period: Has time period for pulling data for the export. :vartype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod @@ -2001,11 +3423,13 @@ def __init__( """ :keyword type: 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". + reservations. Required. Known values are: "Usage", "ActualCost", "AmortizedCost", "FocusCost", + "PriceSheet", "ReservationTransactions", "ReservationRecommendations", and + "ReservationDetails". :paramtype type: str or ~azure.mgmt.costmanagement.models.ExportType :keyword timeframe: 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". + "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom", and "TheCurrentMonth". :paramtype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :keyword time_period: Has time period for pulling data for the export. :paramtype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod @@ -2037,8 +3461,11 @@ class ExportDeliveryDestination(_serialization.Model): 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. + All required parameters must be populated in order to send to server. + :ivar type: The export delivery destination type. Currently only 'AzureBlob' is supported. + "AzureBlob" + :vartype type: str or ~azure.mgmt.costmanagement.models.DestinationType :ivar resource_id: The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified. :vartype resource_id: str @@ -2063,6 +3490,7 @@ class ExportDeliveryDestination(_serialization.Model): } _attribute_map = { + "type": {"key": "type", "type": "str"}, "resource_id": {"key": "resourceId", "type": "str"}, "container": {"key": "container", "type": "str"}, "root_folder_path": {"key": "rootFolderPath", "type": "str"}, @@ -2074,6 +3502,7 @@ def __init__( self, *, container: str, + type: Optional[Union[str, "_models.DestinationType"]] = None, resource_id: Optional[str] = None, root_folder_path: Optional[str] = None, sas_token: Optional[str] = None, @@ -2081,6 +3510,9 @@ def __init__( **kwargs: Any ) -> None: """ + :keyword type: The export delivery destination type. Currently only 'AzureBlob' is supported. + "AzureBlob" + :paramtype type: str or ~azure.mgmt.costmanagement.models.DestinationType :keyword resource_id: The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified. :paramtype resource_id: str @@ -2100,6 +3532,7 @@ def __init__( :paramtype storage_account: str """ super().__init__(**kwargs) + self.type = type self.resource_id = resource_id self.container = container self.root_folder_path = root_folder_path @@ -2110,7 +3543,7 @@ def __init__( class ExportDeliveryInfo(_serialization.Model): """The delivery information associated with a export. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar destination: Has destination for the export being delivered. Required. :vartype destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination @@ -2153,7 +3586,7 @@ class ExportExecutionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.ExportRun"]] = None class ExportListResult(_serialization.Model): @@ -2176,7 +3609,7 @@ class ExportListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Export"]] = None class ExportProperties(CommonExportProperties): @@ -2184,10 +3617,9 @@ class ExportProperties(CommonExportProperties): 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. + All required parameters must be populated in order to send to server. - :ivar format: The format of the export being delivered. Currently only 'Csv' is supported. - "Csv" + :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType :ivar delivery_info: Has delivery information for the export. Required. :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo @@ -2196,12 +3628,27 @@ class ExportProperties(CommonExportProperties): :ivar run_history: If requested, has the most recent run history for the export. :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult :ivar partition_data: 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. + blob directory together with a manifest file. :vartype partition_data: bool + :ivar data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :vartype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :ivar compression_mode: Allow customers to select compress data for exports. This setting will + enable destination file compression scheme at runtime. By default set to None. Gzip is for csv + and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :ivar export_description: The export description set by customer at time of export + creation/update. + :vartype export_description: str :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the next run time. :vartype next_run_time_estimate: ~datetime.datetime + :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended + state. This is not populated currently. + :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext :ivar schedule: Has schedule information for the export. :vartype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule """ @@ -2210,6 +3657,7 @@ class ExportProperties(CommonExportProperties): "delivery_info": {"required": True}, "definition": {"required": True}, "next_run_time_estimate": {"readonly": True}, + "system_suspension_context": {"readonly": True}, } _attribute_map = { @@ -2218,7 +3666,11 @@ class ExportProperties(CommonExportProperties): "definition": {"key": "definition", "type": "ExportDefinition"}, "run_history": {"key": "runHistory", "type": "ExportExecutionListResult"}, "partition_data": {"key": "partitionData", "type": "bool"}, + "data_overwrite_behavior": {"key": "dataOverwriteBehavior", "type": "str"}, + "compression_mode": {"key": "compressionMode", "type": "str"}, + "export_description": {"key": "exportDescription", "type": "str"}, "next_run_time_estimate": {"key": "nextRunTimeEstimate", "type": "iso-8601"}, + "system_suspension_context": {"key": "systemSuspensionContext", "type": "ExportSuspensionContext"}, "schedule": {"key": "schedule", "type": "ExportSchedule"}, } @@ -2230,12 +3682,15 @@ def __init__( format: Optional[Union[str, "_models.FormatType"]] = None, run_history: Optional["_models.ExportExecutionListResult"] = None, partition_data: Optional[bool] = None, + data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, + compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, + export_description: Optional[str] = None, schedule: Optional["_models.ExportSchedule"] = None, **kwargs: Any ) -> None: """ - :keyword format: The format of the export being delivered. Currently only 'Csv' is supported. - "Csv" + :keyword format: The format of the export being delivered. Known values are: "Csv" and + "Parquet". :paramtype format: str or ~azure.mgmt.costmanagement.models.FormatType :keyword delivery_info: Has delivery information for the export. Required. :paramtype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo @@ -2244,9 +3699,21 @@ def __init__( :keyword run_history: If requested, has the most recent run history for the export. :paramtype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult :keyword partition_data: 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. + in a blob directory together with a manifest file. :paramtype partition_data: bool + :keyword data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :paramtype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :keyword compression_mode: Allow customers to select compress data for exports. This setting + will enable destination file compression scheme at runtime. By default set to None. Gzip is for + csv and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :paramtype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :keyword export_description: The export description set by customer at time of export + creation/update. + :paramtype export_description: str :keyword schedule: Has schedule information for the export. :paramtype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule """ @@ -2256,6 +3723,9 @@ def __init__( definition=definition, run_history=run_history, partition_data=partition_data, + data_overwrite_behavior=data_overwrite_behavior, + compression_mode=compression_mode, + export_description=export_description, **kwargs ) self.schedule = schedule @@ -2264,7 +3734,7 @@ def __init__( class ExportRecurrencePeriod(_serialization.Model): """The start and end date for recurrence schedule. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar from_property: The start date of recurrence. Required. :vartype from_property: ~datetime.datetime @@ -2295,7 +3765,7 @@ def __init__( self.to = to -class ExportRun(CostManagementProxyResource): # pylint: disable=too-many-instance-attributes +class ExportRun(CostManagementProxyResource): """An export run. Variables are only populated by the server, and will be ignored when sending a request. @@ -2323,8 +3793,14 @@ class ExportRun(CostManagementProxyResource): # pylint: disable=too-many-instan :vartype processing_start_time: ~datetime.datetime :ivar processing_end_time: The time when the export run finished. :vartype processing_end_time: ~datetime.datetime + :ivar start_date: The start datetime for the export. + :vartype start_date: ~datetime.datetime + :ivar end_date: The end datetime for the export. + :vartype end_date: ~datetime.datetime :ivar file_name: The name of the exported file. :vartype file_name: str + :ivar manifest_file: The manifest file location(URI location) for the exported files. + :vartype manifest_file: str :ivar run_settings: The export settings that were in effect for this run. :vartype run_settings: ~azure.mgmt.costmanagement.models.CommonExportProperties :ivar error: The details of any error. @@ -2348,7 +3824,10 @@ class ExportRun(CostManagementProxyResource): # pylint: disable=too-many-instan "submitted_time": {"key": "properties.submittedTime", "type": "iso-8601"}, "processing_start_time": {"key": "properties.processingStartTime", "type": "iso-8601"}, "processing_end_time": {"key": "properties.processingEndTime", "type": "iso-8601"}, + "start_date": {"key": "properties.startDate", "type": "iso-8601"}, + "end_date": {"key": "properties.endDate", "type": "iso-8601"}, "file_name": {"key": "properties.fileName", "type": "str"}, + "manifest_file": {"key": "properties.manifestFile", "type": "str"}, "run_settings": {"key": "properties.runSettings", "type": "CommonExportProperties"}, "error": {"key": "properties.error", "type": "ErrorDetails"}, } @@ -2363,7 +3842,10 @@ def __init__( submitted_time: Optional[datetime.datetime] = None, processing_start_time: Optional[datetime.datetime] = None, processing_end_time: Optional[datetime.datetime] = None, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, file_name: Optional[str] = None, + manifest_file: Optional[str] = None, run_settings: Optional["_models.CommonExportProperties"] = None, error: Optional["_models.ErrorDetails"] = None, **kwargs: Any @@ -2387,8 +3869,14 @@ def __init__( :paramtype processing_start_time: ~datetime.datetime :keyword processing_end_time: The time when the export run finished. :paramtype processing_end_time: ~datetime.datetime + :keyword start_date: The start datetime for the export. + :paramtype start_date: ~datetime.datetime + :keyword end_date: The end datetime for the export. + :paramtype end_date: ~datetime.datetime :keyword file_name: The name of the exported file. :paramtype file_name: str + :keyword manifest_file: The manifest file location(URI location) for the exported files. + :paramtype manifest_file: str :keyword run_settings: The export settings that were in effect for this run. :paramtype run_settings: ~azure.mgmt.costmanagement.models.CommonExportProperties :keyword error: The details of any error. @@ -2401,16 +3889,40 @@ def __init__( self.submitted_time = submitted_time self.processing_start_time = processing_start_time self.processing_end_time = processing_end_time + self.start_date = start_date + self.end_date = end_date self.file_name = file_name + self.manifest_file = manifest_file self.run_settings = run_settings self.error = error +class ExportRunRequest(_serialization.Model): + """The export run request. + + :ivar time_period: Has time period for pulling data for the export. + :vartype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod + """ + + _attribute_map = { + "time_period": {"key": "timePeriod", "type": "ExportTimePeriod"}, + } + + def __init__(self, *, time_period: Optional["_models.ExportTimePeriod"] = None, **kwargs: Any) -> None: + """ + :keyword time_period: Has time period for pulling data for the export. + :paramtype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod + """ + super().__init__(**kwargs) + self.time_period = time_period + + class ExportSchedule(_serialization.Model): """The schedule associated with the export. :ivar status: The status of the export's schedule. If 'Inactive', the export's schedule is - paused. Known values are: "Active" and "Inactive". + paused. To enable export set the status to be Active and then make a PUT request. Known values + are: "Active" and "Inactive". :vartype status: str or ~azure.mgmt.costmanagement.models.StatusType :ivar recurrence: The schedule recurrence. Known values are: "Daily", "Weekly", "Monthly", and "Annually". @@ -2436,7 +3948,8 @@ def __init__( ) -> None: """ :keyword status: The status of the export's schedule. If 'Inactive', the export's schedule is - paused. Known values are: "Active" and "Inactive". + paused. To enable export set the status to be Active and then make a PUT request. Known values + are: "Active" and "Inactive". :paramtype status: str or ~azure.mgmt.costmanagement.models.StatusType :keyword recurrence: The schedule recurrence. Known values are: "Daily", "Weekly", "Monthly", and "Annually". @@ -2451,11 +3964,50 @@ def __init__( self.recurrence_period = recurrence_period +class ExportSuspensionContext(_serialization.Model): + """The properties of the export run. This is not populated currently. + + :ivar suspension_code: The code for export suspension. + :vartype suspension_code: str + :ivar suspension_reason: The detailed reason for export suspension. + :vartype suspension_reason: str + :ivar suspension_time: The time when the export was suspended. + :vartype suspension_time: ~datetime.datetime + """ + + _attribute_map = { + "suspension_code": {"key": "suspensionCode", "type": "str"}, + "suspension_reason": {"key": "suspensionReason", "type": "str"}, + "suspension_time": {"key": "suspensionTime", "type": "iso-8601"}, + } + + def __init__( + self, + *, + suspension_code: Optional[str] = None, + suspension_reason: Optional[str] = None, + suspension_time: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword suspension_code: The code for export suspension. + :paramtype suspension_code: str + :keyword suspension_reason: The detailed reason for export suspension. + :paramtype suspension_reason: str + :keyword suspension_time: The time when the export was suspended. + :paramtype suspension_time: ~datetime.datetime + """ + super().__init__(**kwargs) + self.suspension_code = suspension_code + self.suspension_reason = suspension_reason + self.suspension_time = suspension_time + + class ExportTimePeriod(_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. + 'Custom'. The maximum date range is 1 calendar month. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar from_property: The start date for export data. Required. :vartype from_property: ~datetime.datetime @@ -2496,7 +4048,7 @@ class FileDestination(_serialization.Model): "file_formats": {"key": "fileFormats", "type": "[str]"}, } - def __init__(self, *, file_formats: Optional[List[Union[str, "_models.FileFormat"]]] = None, **kwargs: Any) -> None: + def __init__(self, *, file_formats: Optional[list[Union[str, "_models.FileFormat"]]] = None, **kwargs: Any) -> None: """ :keyword file_formats: Destination of the view data. Currently only CSV format is supported. :paramtype file_formats: list[str or ~azure.mgmt.costmanagement.models.FileFormat] @@ -2505,10 +4057,57 @@ def __init__(self, *, file_formats: Optional[List[Union[str, "_models.FileFormat self.file_formats = file_formats +class FilterItems(_serialization.Model): + """Will contain the filter name and value to operate on. This is currently only supported for + Export Definition type of ReservationRecommendations. + + :ivar name: The name of the filter. This is currently only supported for Export Definition type + of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', + 'ResourceType']. Known values are: "ReservationScope", "ResourceType", and "LookBackPeriod". + :vartype name: str or ~azure.mgmt.costmanagement.models.FilterItemNames + :ivar value: Value to filter by. Currently values supported per name are, for + 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported + values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values + are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', + 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', + 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. + :vartype value: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "_models.FilterItemNames"]] = None, + value: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the filter. This is currently only supported for Export Definition + type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', + 'ResourceType']. Known values are: "ReservationScope", "ResourceType", and "LookBackPeriod". + :paramtype name: str or ~azure.mgmt.costmanagement.models.FilterItemNames + :keyword value: Value to filter by. Currently values supported per name are, for + 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported + values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values + are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', + 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', + 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. + :paramtype value: str + """ + super().__init__(**kwargs) + self.name = name + self.value = value + + class ForecastAggregation(_serialization.Model): """The aggregation expression to be used in the forecast. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar name: The name of the column to aggregate. Required. Known values are: "PreTaxCostUSD", "Cost", "CostUSD", and "PreTaxCost". @@ -2571,11 +4170,11 @@ def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, ** class ForecastComparisonExpression(_serialization.Model): """The comparison expression to be used in the forecast. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar name: The name of the column to use in comparison. Required. :vartype name: str - :ivar operator: The operator to use for comparison. Required. Known values are: "In" and "In". + :ivar operator: The operator to use for comparison. Required. "In" :vartype operator: str or ~azure.mgmt.costmanagement.models.ForecastOperatorType :ivar values: Array of values to use for comparison. Required. :vartype values: list[str] @@ -2594,13 +4193,12 @@ class ForecastComparisonExpression(_serialization.Model): } def __init__( - self, *, name: str, operator: Union[str, "_models.ForecastOperatorType"], values: List[str], **kwargs: Any + self, *, name: str, operator: Union[str, "_models.ForecastOperatorType"], values: list[str], **kwargs: Any ) -> None: """ :keyword name: The name of the column to use in comparison. Required. :paramtype name: str - :keyword operator: The operator to use for comparison. Required. Known values are: "In" and - "In". + :keyword operator: The operator to use for comparison. Required. "In" :paramtype operator: str or ~azure.mgmt.costmanagement.models.ForecastOperatorType :keyword values: Array of values to use for comparison. Required. :paramtype values: list[str] @@ -2614,9 +4212,10 @@ def __init__( class ForecastDataset(_serialization.Model): """The definition of data present in the forecast. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. - :ivar granularity: The granularity of rows in the forecast. "Daily" + :ivar granularity: The granularity of rows in the forecast. Known values are: "Daily" and + "Monthly". :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :ivar configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. @@ -2643,14 +4242,15 @@ class ForecastDataset(_serialization.Model): def __init__( self, *, - aggregation: Dict[str, "_models.ForecastAggregation"], + aggregation: dict[str, "_models.ForecastAggregation"], granularity: Optional[Union[str, "_models.GranularityType"]] = None, configuration: Optional["_models.ForecastDatasetConfiguration"] = None, filter: Optional["_models.ForecastFilter"] = None, # pylint: disable=redefined-builtin **kwargs: Any ) -> None: """ - :keyword granularity: The granularity of rows in the forecast. "Daily" + :keyword granularity: The granularity of rows in the forecast. Known values are: "Daily" and + "Monthly". :paramtype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :keyword configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. @@ -2681,7 +4281,7 @@ class ForecastDatasetConfiguration(_serialization.Model): "columns": {"key": "columns", "type": "[str]"}, } - def __init__(self, *, columns: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, columns: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword columns: 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. @@ -2694,7 +4294,7 @@ def __init__(self, *, columns: Optional[List[str]] = None, **kwargs: Any) -> Non class ForecastDefinition(_serialization.Model): """The definition of a forecast. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar type: The type of the forecast. Required. Known values are: "Usage", "ActualCost", and "AmortizedCost". @@ -2792,8 +4392,8 @@ class ForecastFilter(_serialization.Model): def __init__( self, *, - and_property: Optional[List["_models.ForecastFilter"]] = None, - or_property: Optional[List["_models.ForecastFilter"]] = None, + 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: Any @@ -2869,8 +4469,8 @@ def __init__( self, *, next_link: Optional[str] = None, - columns: Optional[List["_models.ForecastColumn"]] = None, - rows: Optional[List[List[Any]]] = None, + columns: Optional[list["_models.ForecastColumn"]] = None, + rows: Optional[list[list[Any]]] = None, **kwargs: Any ) -> None: """ @@ -2887,10 +4487,41 @@ def __init__( self.rows = rows +class ForecastSpend(_serialization.Model): + """The forecasted cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar amount: The forecasted cost for the total time period which is being tracked by the + budget. This value is only provided if the budget contains a forecast alert type. + :vartype amount: float + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + "amount": {"readonly": True}, + "unit": {"readonly": True}, + } + + _attribute_map = { + "amount": {"key": "amount", "type": "float"}, + "unit": {"key": "unit", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.amount: Optional[float] = None + self.unit: Optional[str] = None + + class ForecastTimePeriod(_serialization.Model): """Has time period for pulling data for the forecast. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar from_property: The start date to pull data from. Required. :vartype from_property: ~datetime.datetime @@ -2969,7 +4600,7 @@ def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs: self.error = error -class GenerateCostDetailsReportRequestDefinition(_serialization.Model): +class GenerateCostDetailsReportRequestDefinition(_serialization.Model): # pylint: disable=name-too-long """The definition of a cost detailed report. :ivar metric: The type of the detailed report. By default ActualCost is provided. Known values @@ -3148,7 +4779,7 @@ def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs: self.error = error -class GenerateDetailedCostReportOperationResult(_serialization.Model): +class GenerateDetailedCostReportOperationResult(_serialization.Model): # pylint: disable=name-too-long """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. @@ -3209,12 +4840,12 @@ def __init__( self.id = id self.name = name self.type = type - self.expiry_time = None + self.expiry_time: Optional[datetime.datetime] = None self.valid_till = valid_till self.download_url = download_url -class GenerateDetailedCostReportOperationStatuses(_serialization.Model): +class GenerateDetailedCostReportOperationStatuses(_serialization.Model): # pylint: disable=name-too-long """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. @@ -3303,7 +4934,7 @@ def __init__( self.end_time = end_time self.type = type self.error = error - self.expiry_time = None + self.expiry_time: Optional[datetime.datetime] = None self.valid_till = valid_till self.download_url = download_url @@ -3311,7 +4942,7 @@ def __init__( class GenerateDetailedCostReportTimePeriod(_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. + All required parameters must be populated in order to send to server. :ivar start: The start date to pull data from. example format 2020-03-15. Required. :vartype start: str @@ -3346,7 +4977,7 @@ class IncludedQuantityUtilizationSummary(BenefitUtilizationSummary): 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -3408,15 +5039,17 @@ def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] """ super().__init__(**kwargs) self.kind: str = "IncludedQuantity" - self.arm_sku_name = None - self.benefit_id = None - self.benefit_order_id = None + self.arm_sku_name: Optional[str] = None + self.benefit_id: Optional[str] = None + self.benefit_order_id: Optional[str] = None self.benefit_type = benefit_type - self.usage_date = None - self.utilization_percentage = None + self.usage_date: Optional[datetime.datetime] = None + self.utilization_percentage: Optional[float] = None -class IncludedQuantityUtilizationSummaryProperties(BenefitUtilizationSummaryProperties): +class IncludedQuantityUtilizationSummaryProperties( + BenefitUtilizationSummaryProperties +): # pylint: disable=name-too-long """Included Quantity utilization summary properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -3461,7 +5094,7 @@ def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind """ super().__init__(benefit_type=benefit_type, **kwargs) - self.utilization_percentage = None + self.utilization_percentage: Optional[float] = None class KpiProperties(_serialization.Model): @@ -3503,10 +5136,374 @@ def __init__( self.enabled = enabled +class MCAPriceSheetProperties(_serialization.Model): + """The properties of the price sheet. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar billing_account_id: Unique identifier for the billing account. + :vartype billing_account_id: str + :ivar billing_account_name: Name of the billing profile that is set up to receive invoices. The + prices in the price sheet are associated with this billing profile. + :vartype billing_account_name: str + :ivar billing_profile_id: Unique identifier for the billing profile. + :vartype billing_profile_id: str + :ivar billing_profile_name: Name of the billing profile that is set up to receive invoices. The + prices in the price sheet are associated with this billing profile. + :vartype billing_profile_name: str + :ivar product_order_name: Name of the purchased product plan. Indicates if this pricing is + standard Azure Plan pricing, Dev/Test pricing etc. + + Currently unavailable for Azure 3rd party and ReservedInstance meters. + :vartype product_order_name: str + :ivar service_family: Type of Azure service. For example, Compute, Analytics, and Security. + :vartype service_family: float + :ivar product: Name of the product accruing the charges. + :vartype product: str + :ivar product_id: Unique identifier for the product whose meter is consumed. + :vartype product_id: str + :ivar sku_id: Unique identifier of the SKU. + :vartype sku_id: str + :ivar unit_of_measure: How usage is measured for the service. + :vartype unit_of_measure: str + :ivar meter_id: Unique identifier of the meter. + :vartype meter_id: str + :ivar meter_name: Name of the meter. The meter represents the deployable resource of an Azure + service. + :vartype meter_name: str + :ivar meter_type: Name of the meter type. + :vartype meter_type: str + :ivar meter_category: Name of the classification category for the meter. For example, Cloud + services, Networking, etc. + :vartype meter_category: str + :ivar meter_sub_category: Name of the meter subclassification category. + :vartype meter_sub_category: str + :ivar meter_region: Name of the Azure region where the meter for the service is available. + :vartype meter_region: str + :ivar tier_minimum_units: Defines the lower bound of the tier range for which prices are + defined. For example, if the range is 0 to 100, tierMinimumUnits would be 0. + :vartype tier_minimum_units: str + :ivar effective_start_date: Effective start date of the Price Sheet billing period. + :vartype effective_start_date: ~datetime.datetime + :ivar effective_end_date: Effective end date of the Price Sheet billing period. + :vartype effective_end_date: ~datetime.datetime + :ivar unit_price: The per-unit price at the time of billing for a given product or service, + inclusive of any negotiated discounts on top of the market price. + + For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year + commitment including discounts. + + Note: The unit price isn't the same as the effective price in usage details downloads when + services have differential prices across tiers. + + If services have multi-tiered pricing, the effective price is a blended rate across the tiers + and doesn't show a tier-specific unit price. The blended price or effective price is the net + price for the consumed quantity spanning across the multiple tiers (where each tier has a + specific unit price). + :vartype unit_price: str + :ivar base_price: The unit price at the time the customer signs on or the unit price at the + time of service meter GA launch if it is after sign-on. + + This is applicable for Enterprise Agreement users. + :vartype base_price: str + :ivar market_price: The current list price for a given product or service. This price is + without any negotiations and is based on your Microsoft Agreement type. + + For PriceType Consumption, market price is reflected as the pay-as-you-go price. + + For PriceType Savings Plan, market price reflects the Savings plan benefit on top of + pay-as-you-go price for the corresponding commitment term. + + For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year + commitment. + :vartype market_price: str + :ivar currency: Currency in which all the prices are reflected. + :vartype currency: str + :ivar billing_currency: Currency in which charges are posted. + :vartype billing_currency: str + :ivar term: Term length for Azure Savings Plan or Reservation term – one year or three years + (P1Y or P3Y). + :vartype term: str + :ivar price_type: Price type for a product. For example, an Azure resource with a pay-as-you-go + rate with priceType as Consumption. Other price types include ReservedInstance and Savings + Plan. + :vartype price_type: str + """ + + _validation = { + "billing_account_id": {"readonly": True}, + "billing_account_name": {"readonly": True}, + "billing_profile_id": {"readonly": True}, + "billing_profile_name": {"readonly": True}, + "product_order_name": {"readonly": True}, + "service_family": {"readonly": True}, + "product": {"readonly": True}, + "product_id": {"readonly": True}, + "sku_id": {"readonly": True}, + "unit_of_measure": {"readonly": True}, + "meter_id": {"readonly": True}, + "meter_name": {"readonly": True}, + "meter_type": {"readonly": True}, + "meter_category": {"readonly": True}, + "meter_sub_category": {"readonly": True}, + "meter_region": {"readonly": True}, + "tier_minimum_units": {"readonly": True}, + "effective_start_date": {"readonly": True}, + "effective_end_date": {"readonly": True}, + "unit_price": {"readonly": True}, + "base_price": {"readonly": True}, + "market_price": {"readonly": True}, + "currency": {"readonly": True}, + "billing_currency": {"readonly": True}, + "term": {"readonly": True}, + "price_type": {"readonly": True}, + } + + _attribute_map = { + "billing_account_id": {"key": "billingAccountID", "type": "str"}, + "billing_account_name": {"key": "billingAccountName", "type": "str"}, + "billing_profile_id": {"key": "billingProfileId", "type": "str"}, + "billing_profile_name": {"key": "billingProfileName", "type": "str"}, + "product_order_name": {"key": "productOrderName", "type": "str"}, + "service_family": {"key": "serviceFamily", "type": "float"}, + "product": {"key": "product", "type": "str"}, + "product_id": {"key": "productId", "type": "str"}, + "sku_id": {"key": "skuId", "type": "str"}, + "unit_of_measure": {"key": "unitOfMeasure", "type": "str"}, + "meter_id": {"key": "meterId", "type": "str"}, + "meter_name": {"key": "meterName", "type": "str"}, + "meter_type": {"key": "meterType", "type": "str"}, + "meter_category": {"key": "meterCategory", "type": "str"}, + "meter_sub_category": {"key": "meterSubCategory", "type": "str"}, + "meter_region": {"key": "meterRegion", "type": "str"}, + "tier_minimum_units": {"key": "tierMinimumUnits", "type": "str"}, + "effective_start_date": {"key": "effectiveStartDate", "type": "iso-8601"}, + "effective_end_date": {"key": "effectiveEndDate", "type": "iso-8601"}, + "unit_price": {"key": "unitPrice", "type": "str"}, + "base_price": {"key": "basePrice", "type": "str"}, + "market_price": {"key": "marketPrice", "type": "str"}, + "currency": {"key": "currency", "type": "str"}, + "billing_currency": {"key": "billingCurrency", "type": "str"}, + "term": {"key": "term", "type": "str"}, + "price_type": {"key": "priceType", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals + """ """ + super().__init__(**kwargs) + self.billing_account_id: Optional[str] = None + self.billing_account_name: Optional[str] = None + self.billing_profile_id: Optional[str] = None + self.billing_profile_name: Optional[str] = None + self.product_order_name: Optional[str] = None + self.service_family: Optional[float] = None + self.product: Optional[str] = None + self.product_id: Optional[str] = None + self.sku_id: Optional[str] = None + self.unit_of_measure: Optional[str] = None + self.meter_id: Optional[str] = None + self.meter_name: Optional[str] = None + self.meter_type: Optional[str] = None + self.meter_category: Optional[str] = None + self.meter_sub_category: Optional[str] = None + self.meter_region: Optional[str] = None + self.tier_minimum_units: Optional[str] = None + self.effective_start_date: Optional[datetime.datetime] = None + self.effective_end_date: Optional[datetime.datetime] = None + self.unit_price: Optional[str] = None + self.base_price: Optional[str] = None + self.market_price: Optional[str] = None + self.currency: Optional[str] = None + self.billing_currency: Optional[str] = None + self.term: Optional[str] = None + self.price_type: Optional[str] = None + + +class Notification(_serialization.Model): + """The notification associated with a budget. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + All required parameters must be populated in order to send to server. + + :ivar enabled: The notification is enabled or not. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required. + :vartype enabled: bool + :ivar operator: The comparison operator. Supported for CategoryType(s): Cost, + ReservationUtilization. Supported operators for **CategoryType: Cost** + + * GreaterThan + * + GreaterThanOrEqualTo + + Supported operators for **CategoryType: ReservationUtilization** + + * LessThan. Required. Known values are: "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", + and "LessThan". + :vartype operator: str or ~azure.mgmt.costmanagement.models.BudgetNotificationOperatorType + :ivar threshold: Threshold value associated with a notification. It is always percent with a + maximum of 2 decimal places. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + **CategoryType: Cost** - Must be between 0 and 1000. Notification is sent when the cost + exceeded the threshold. + + **CategoryType: ReservationUtilization** - Must be between 0 and 100. Notification is sent + when a reservation has a utilization percentage below the threshold. Required. + :vartype threshold: float + :ivar frequency: Frequency of a notification. Represents how long the notification will be + silent after triggering an alert for a threshold breach. If not specified, the frequency will + be set by default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when + timeGrain: Last30Days). + + Supported for CategoryType(s): ReservationUtilization. Known values are: "Daily", "Weekly", + and "Monthly". + :vartype frequency: str or ~azure.mgmt.costmanagement.models.Frequency + :ivar contact_emails: Email addresses to send the notification to when the threshold is + breached. Must have at least one contact email or contact group specified at the Subscription + or Resource Group scopes. All other scopes must have at least one contact email specified. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required. + :vartype contact_emails: list[str] + :ivar contact_roles: Subscription or Resource Group scopes only. Contact roles to send the + notification to when the threshold is breached. + + Supported for CategoryType(s): Cost. + :vartype contact_roles: list[str] + :ivar contact_groups: Subscription or Resource Group scopes only. Action groups to send the + notification to when the threshold is exceeded. Must be provided as a fully qualified Azure + resource id. + + Supported for CategoryType(s): Cost. + :vartype contact_groups: list[str] + :ivar threshold_type: The type of threshold. + + Supported for CategoryType(s): Cost. Known values are: "Actual" and "Forecasted". + :vartype threshold_type: str or ~azure.mgmt.costmanagement.models.ThresholdType + :ivar locale: Language in which the recipient will receive the notification, + + Supported for CategoryType(s): Cost, ReservationUtilization. Known values are: "en-us", + "ja-jp", "zh-cn", "de-de", "es-es", "fr-fr", "it-it", "ko-kr", "pt-br", "ru-ru", "zh-tw", + "cs-cz", "pl-pl", "tr-tr", "da-dk", "en-gb", "hu-hu", "nb-no", "nl-nl", "pt-pt", and "sv-se". + :vartype locale: str or ~azure.mgmt.costmanagement.models.CultureCode + """ + + _validation = { + "enabled": {"required": True}, + "operator": {"required": True}, + "threshold": {"required": True}, + "contact_emails": {"required": True, "max_items": 50, "min_items": 0}, + "contact_groups": {"max_items": 50, "min_items": 0}, + } + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "operator": {"key": "operator", "type": "str"}, + "threshold": {"key": "threshold", "type": "float"}, + "frequency": {"key": "frequency", "type": "str"}, + "contact_emails": {"key": "contactEmails", "type": "[str]"}, + "contact_roles": {"key": "contactRoles", "type": "[str]"}, + "contact_groups": {"key": "contactGroups", "type": "[str]"}, + "threshold_type": {"key": "thresholdType", "type": "str"}, + "locale": {"key": "locale", "type": "str"}, + } + + def __init__( + self, + *, + enabled: bool, + operator: Union[str, "_models.BudgetNotificationOperatorType"], + threshold: float, + contact_emails: list[str], + frequency: Optional[Union[str, "_models.Frequency"]] = None, + contact_roles: Optional[list[str]] = None, + contact_groups: Optional[list[str]] = None, + threshold_type: Union[str, "_models.ThresholdType"] = "Actual", + locale: Optional[Union[str, "_models.CultureCode"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword enabled: The notification is enabled or not. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required. + :paramtype enabled: bool + :keyword operator: The comparison operator. Supported for CategoryType(s): Cost, + ReservationUtilization. Supported operators for **CategoryType: Cost** + + * GreaterThan + * + GreaterThanOrEqualTo + + Supported operators for **CategoryType: ReservationUtilization** + + * LessThan. Required. Known values are: "EqualTo", "GreaterThan", + "GreaterThanOrEqualTo", and "LessThan". + :paramtype operator: str or ~azure.mgmt.costmanagement.models.BudgetNotificationOperatorType + :keyword threshold: Threshold value associated with a notification. It is always percent with a + maximum of 2 decimal places. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + **CategoryType: Cost** - Must be between 0 and 1000. Notification is sent when the cost + exceeded the threshold. + + **CategoryType: ReservationUtilization** - Must be between 0 and 100. Notification is sent + when a reservation has a utilization percentage below the threshold. Required. + :paramtype threshold: float + :keyword frequency: Frequency of a notification. Represents how long the notification will be + silent after triggering an alert for a threshold breach. If not specified, the frequency will + be set by default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when + timeGrain: Last30Days). + + Supported for CategoryType(s): ReservationUtilization. Known values are: "Daily", "Weekly", + and "Monthly". + :paramtype frequency: str or ~azure.mgmt.costmanagement.models.Frequency + :keyword contact_emails: Email addresses to send the notification to when the threshold is + breached. Must have at least one contact email or contact group specified at the Subscription + or Resource Group scopes. All other scopes must have at least one contact email specified. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required. + :paramtype contact_emails: list[str] + :keyword contact_roles: Subscription or Resource Group scopes only. Contact roles to send the + notification to when the threshold is breached. + + Supported for CategoryType(s): Cost. + :paramtype contact_roles: list[str] + :keyword contact_groups: Subscription or Resource Group scopes only. Action groups to send the + notification to when the threshold is exceeded. Must be provided as a fully qualified Azure + resource id. + + Supported for CategoryType(s): Cost. + :paramtype contact_groups: list[str] + :keyword threshold_type: The type of threshold. + + Supported for CategoryType(s): Cost. Known values are: "Actual" and "Forecasted". + :paramtype threshold_type: str or ~azure.mgmt.costmanagement.models.ThresholdType + :keyword locale: Language in which the recipient will receive the notification, + + Supported for CategoryType(s): Cost, ReservationUtilization. Known values are: "en-us", + "ja-jp", "zh-cn", "de-de", "es-es", "fr-fr", "it-it", "ko-kr", "pt-br", "ru-ru", "zh-tw", + "cs-cz", "pl-pl", "tr-tr", "da-dk", "en-gb", "hu-hu", "nb-no", "nl-nl", "pt-pt", and "sv-se". + :paramtype locale: str or ~azure.mgmt.costmanagement.models.CultureCode + """ + super().__init__(**kwargs) + self.enabled = enabled + self.operator = operator + self.threshold = threshold + self.frequency = frequency + self.contact_emails = contact_emails + self.contact_roles = contact_roles + self.contact_groups = contact_groups + self.threshold_type = threshold_type + self.locale = locale + + class NotificationProperties(_serialization.Model): """The properties of the scheduled action notification. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar to: Array of email addresses. Required. :vartype to: list[str] @@ -3537,7 +5534,7 @@ class NotificationProperties(_serialization.Model): def __init__( self, *, - to: List[str], + to: list[str], subject: str, language: Optional[str] = None, message: Optional[str] = None, @@ -3602,10 +5599,10 @@ class OperationDisplay(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None + self.provider: Optional[str] = None + self.resource: Optional[str] = None + self.operation: Optional[str] = None + self.description: Optional[str] = None class OperationListResult(_serialization.Model): @@ -3634,15 +5631,15 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.CostManagementOperation"]] = None + self.next_link: Optional[str] = None class OperationStatus(_serialization.Model): """The status of the long running operation. :ivar status: The status of the long running operation. Known values are: "Running", - "Completed", and "Failed". + "Complete", "Failed", and "Completed". :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType :ivar report_url: The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity. Known values are: "InstanceFlexibilityGroup", @@ -3655,35 +5652,84 @@ class OperationStatus(_serialization.Model): _attribute_map = { "status": {"key": "status", "type": "str"}, - "report_url": {"key": "properties.reportUrl", "type": "str"}, - "valid_until": {"key": "properties.validUntil", "type": "iso-8601"}, + "report_url": {"key": "properties.reportUrl", "type": "str"}, + "valid_until": {"key": "properties.validUntil", "type": "iso-8601"}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "_models.OperationStatusType"]] = None, + report_url: Optional[Union[str, "_models.ReservationReportSchema"]] = None, + valid_until: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: The status of the long running operation. Known values are: "Running", + "Complete", "Failed", and "Completed". + :paramtype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType + :keyword report_url: 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". + :paramtype report_url: str or ~azure.mgmt.costmanagement.models.ReservationReportSchema + :keyword valid_until: The time at which report URL becomes invalid. + :paramtype valid_until: ~datetime.datetime + """ + super().__init__(**kwargs) + self.status = status + self.report_url = report_url + self.valid_until = valid_until + + +class OperationStatusAutoGenerated(_serialization.Model): + """The status of the long running operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The status of the long running operation. Known values are: "Running", + "Complete", "Failed", and "Completed". + :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType + :ivar download_url: The link (url) to download the pricesheet. + :vartype download_url: str + :ivar valid_till: Download link validity. + :vartype valid_till: ~datetime.datetime + :ivar download_file_properties: The properties in downloaded file. + :vartype download_file_properties: ~azure.mgmt.costmanagement.models.EAPriceSheetProperties + """ + + _validation = { + "download_url": {"readonly": True}, + "valid_till": {"readonly": True}, + } + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "download_url": {"key": "properties.downloadUrl", "type": "str"}, + "valid_till": {"key": "properties.validTill", "type": "iso-8601"}, + "download_file_properties": {"key": "properties.downloadFileProperties", "type": "EAPriceSheetProperties"}, } def __init__( self, *, status: Optional[Union[str, "_models.OperationStatusType"]] = None, - report_url: Optional[Union[str, "_models.ReservationReportSchema"]] = None, - valid_until: Optional[datetime.datetime] = None, + download_file_properties: Optional["_models.EAPriceSheetProperties"] = None, **kwargs: Any ) -> None: """ :keyword status: The status of the long running operation. Known values are: "Running", - "Completed", and "Failed". + "Complete", "Failed", and "Completed". :paramtype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType - :keyword report_url: 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". - :paramtype report_url: str or ~azure.mgmt.costmanagement.models.ReservationReportSchema - :keyword valid_until: The time at which report URL becomes invalid. - :paramtype valid_until: ~datetime.datetime + :keyword download_file_properties: The properties in downloaded file. + :paramtype download_file_properties: ~azure.mgmt.costmanagement.models.EAPriceSheetProperties """ super().__init__(**kwargs) self.status = status - self.report_url = report_url - self.valid_until = valid_until + self.download_url: Optional[str] = None + self.valid_till: Optional[datetime.datetime] = None + self.download_file_properties = download_file_properties class PivotProperties(_serialization.Model): @@ -3714,6 +5760,49 @@ def __init__( self.name = name +class PricesheetDownloadProperties(_serialization.Model): + """The URL to download the generated report. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiry_time: The time at which report URL becomes invalid/expires in UTC e.g. + 2020-12-08T05:55:59.4394737Z. + :vartype expiry_time: ~datetime.datetime + :ivar download_url: The URL to download the generated report. + :vartype download_url: str + :ivar download_file_properties: The properties in downloaded file. + :vartype download_file_properties: ~azure.mgmt.costmanagement.models.MCAPriceSheetProperties + """ + + _validation = { + "expiry_time": {"readonly": True}, + } + + _attribute_map = { + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "download_url": {"key": "downloadUrl", "type": "str"}, + "download_file_properties": {"key": "downloadFileProperties", "type": "MCAPriceSheetProperties"}, + } + + def __init__( + self, + *, + download_url: Optional[str] = None, + download_file_properties: Optional["_models.MCAPriceSheetProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword download_url: The URL to download the generated report. + :paramtype download_url: str + :keyword download_file_properties: The properties in downloaded file. + :paramtype download_file_properties: ~azure.mgmt.costmanagement.models.MCAPriceSheetProperties + """ + super().__init__(**kwargs) + self.expiry_time: Optional[datetime.datetime] = None + self.download_url = download_url + self.download_file_properties = download_file_properties + + class ProxyResource(Resource): """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. @@ -3730,27 +5819,11 @@ class ProxyResource(Resource): :vartype type: str """ - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - class QueryAggregation(_serialization.Model): """The aggregation expression to be used in the query. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar name: The name of the column to aggregate. Required. :vartype name: str @@ -3809,11 +5882,11 @@ def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, ** class QueryComparisonExpression(_serialization.Model): """The comparison expression to be used in the query. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar name: The name of the column to use in comparison. Required. :vartype name: str - :ivar operator: The operator to use for comparison. Required. Known values are: "In" and "In". + :ivar operator: The operator to use for comparison. Required. "In" :vartype operator: str or ~azure.mgmt.costmanagement.models.QueryOperatorType :ivar values: Array of values to use for comparison. Required. :vartype values: list[str] @@ -3832,13 +5905,12 @@ class QueryComparisonExpression(_serialization.Model): } def __init__( - self, *, name: str, operator: Union[str, "_models.QueryOperatorType"], values: List[str], **kwargs: Any + self, *, name: str, operator: Union[str, "_models.QueryOperatorType"], values: list[str], **kwargs: Any ) -> None: """ :keyword name: The name of the column to use in comparison. Required. :paramtype name: str - :keyword operator: The operator to use for comparison. Required. Known values are: "In" and - "In". + :keyword operator: The operator to use for comparison. Required. "In" :paramtype operator: str or ~azure.mgmt.costmanagement.models.QueryOperatorType :keyword values: Array of values to use for comparison. Required. :paramtype values: list[str] @@ -3852,7 +5924,8 @@ def __init__( class QueryDataset(_serialization.Model): """The definition of data present in the query. - :ivar granularity: The granularity of rows in the query. "Daily" + :ivar granularity: The granularity of rows in the query. Known values are: "Daily" and + "Monthly". :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :ivar configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. @@ -3886,13 +5959,14 @@ def __init__( *, 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, + aggregation: Optional[dict[str, "_models.QueryAggregation"]] = None, + grouping: Optional[list["_models.QueryGrouping"]] = None, filter: Optional["_models.QueryFilter"] = None, # pylint: disable=redefined-builtin **kwargs: Any ) -> None: """ - :keyword granularity: The granularity of rows in the query. "Daily" + :keyword granularity: The granularity of rows in the query. Known values are: "Daily" and + "Monthly". :paramtype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :keyword configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. @@ -3928,7 +6002,7 @@ class QueryDatasetConfiguration(_serialization.Model): "columns": {"key": "columns", "type": "[str]"}, } - def __init__(self, *, columns: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, columns: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword columns: 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. @@ -3941,14 +6015,15 @@ def __init__(self, *, columns: Optional[List[str]] = None, **kwargs: Any) -> Non class QueryDefinition(_serialization.Model): """The definition of a query. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. - :ivar type: The type of the query. Required. Known values are: "Usage", "ActualCost", and - "AmortizedCost". + :ivar type: The type of the query. Required. Known values are: "Usage", "ActualCost", + "AmortizedCost", "FocusCost", "PriceSheet", "ReservationTransactions", + "ReservationRecommendations", and "ReservationDetails". :vartype type: str or ~azure.mgmt.costmanagement.models.ExportType :ivar timeframe: 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". + "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom", and "TheCurrentMonth". :vartype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :ivar time_period: Has time period for pulling data for the query. :vartype time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod @@ -3979,12 +6054,13 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword type: The type of the query. Required. Known values are: "Usage", "ActualCost", and - "AmortizedCost". + :keyword type: The type of the query. Required. Known values are: "Usage", "ActualCost", + "AmortizedCost", "FocusCost", "PriceSheet", "ReservationTransactions", + "ReservationRecommendations", and "ReservationDetails". :paramtype type: str or ~azure.mgmt.costmanagement.models.ExportType :keyword timeframe: 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". + "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom", and "TheCurrentMonth". :paramtype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :keyword time_period: Has time period for pulling data for the query. :paramtype time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod @@ -4026,8 +6102,8 @@ class QueryFilter(_serialization.Model): def __init__( self, *, - and_property: Optional[List["_models.QueryFilter"]] = None, - or_property: Optional[List["_models.QueryFilter"]] = None, + 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: Any @@ -4052,7 +6128,7 @@ def __init__( class QueryGrouping(_serialization.Model): """The group by expression to be used in the query. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar type: Has type of the column to group. Required. Known values are: "TagKey" and "Dimension". @@ -4138,8 +6214,8 @@ def __init__( self, *, next_link: Optional[str] = None, - columns: Optional[List["_models.QueryColumn"]] = None, - rows: Optional[List[List[Any]]] = None, + columns: Optional[list["_models.QueryColumn"]] = None, + rows: Optional[list[list[Any]]] = None, **kwargs: Any ) -> None: """ @@ -4159,7 +6235,7 @@ def __init__( class QueryTimePeriod(_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. + All required parameters must be populated in order to send to server. :ivar from_property: The start date to pull data from. Required. :vartype from_property: ~datetime.datetime @@ -4220,13 +6296,13 @@ def __init__(self, *, usage_grain: Optional[Union[str, "_models.Grain"]] = None, """ super().__init__(**kwargs) self.usage_grain = usage_grain - self.charges = None + self.charges: Optional[list[float]] = None class ReportConfigAggregation(_serialization.Model): """The aggregation expression to be used in the report. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar name: The name of the column to aggregate. Required. :vartype name: str @@ -4259,12 +6335,12 @@ def __init__(self, *, name: str, function: Union[str, "_models.FunctionType"], * class ReportConfigComparisonExpression(_serialization.Model): """The comparison expression to be used in the report. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar name: The name of the column to use in comparison. Required. :vartype name: str - :ivar operator: The operator to use for comparison. Required. Known values are: "In", - "Contains", and "In". + :ivar operator: The operator to use for comparison. Required. Known values are: "In" and + "Contains". :vartype operator: str or ~azure.mgmt.costmanagement.models.OperatorType :ivar values: Array of values to use for comparison. Required. :vartype values: list[str] @@ -4283,13 +6359,13 @@ class ReportConfigComparisonExpression(_serialization.Model): } def __init__( - self, *, name: str, operator: Union[str, "_models.OperatorType"], values: List[str], **kwargs: Any + self, *, name: str, operator: Union[str, "_models.OperatorType"], values: list[str], **kwargs: Any ) -> None: """ :keyword name: The name of the column to use in comparison. Required. :paramtype name: str - :keyword operator: The operator to use for comparison. Required. Known values are: "In", - "Contains", and "In". + :keyword operator: The operator to use for comparison. Required. Known values are: "In" and + "Contains". :paramtype operator: str or ~azure.mgmt.costmanagement.models.OperatorType :keyword values: Array of values to use for comparison. Required. :paramtype values: list[str] @@ -4340,9 +6416,9 @@ def __init__( *, 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, + aggregation: Optional[dict[str, "_models.ReportConfigAggregation"]] = None, + grouping: Optional[list["_models.ReportConfigGrouping"]] = None, + sorting: Optional[list["_models.ReportConfigSorting"]] = None, filter: Optional["_models.ReportConfigFilter"] = None, # pylint: disable=redefined-builtin **kwargs: Any ) -> None: @@ -4386,7 +6462,7 @@ class ReportConfigDatasetConfiguration(_serialization.Model): "columns": {"key": "columns", "type": "[str]"}, } - def __init__(self, *, columns: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, columns: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword columns: 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. @@ -4424,8 +6500,8 @@ class ReportConfigFilter(_serialization.Model): def __init__( self, *, - and_property: Optional[List["_models.ReportConfigFilter"]] = None, - or_property: Optional[List["_models.ReportConfigFilter"]] = None, + 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: Any @@ -4450,7 +6526,7 @@ def __init__( class ReportConfigGrouping(_serialization.Model): """The group by expression to be used in the report. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar type: Has type of the column to group. Required. Known values are: "TagKey" and "Dimension". @@ -4487,7 +6563,7 @@ def __init__(self, *, type: Union[str, "_models.QueryColumnType"], name: str, ** class ReportConfigSorting(_serialization.Model): """The order by expression to be used in the report. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar direction: Direction of sort. Known values are: "Ascending" and "Descending". :vartype direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingType @@ -4521,7 +6597,7 @@ def __init__( class ReportConfigTimePeriod(_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. + All required parameters must be populated in order to send to server. :ivar from_property: The start date to pull data from. Required. :vartype from_property: ~datetime.datetime @@ -4551,12 +6627,12 @@ def __init__(self, *, from_property: datetime.datetime, to: datetime.datetime, * self.to = to -class SavingsPlanUtilizationSummary(BenefitUtilizationSummary): # pylint: disable=too-many-instance-attributes +class SavingsPlanUtilizationSummary(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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -4583,14 +6659,14 @@ class SavingsPlanUtilizationSummary(BenefitUtilizationSummary): # pylint: disab :vartype usage_date: ~datetime.datetime :ivar avg_utilization_percentage: 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 + 2025-03-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. :vartype avg_utilization_percentage: float :ivar min_utilization_percentage: 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 + 2025-03-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 @@ -4598,7 +6674,7 @@ class SavingsPlanUtilizationSummary(BenefitUtilizationSummary): # pylint: disab :vartype min_utilization_percentage: float :ivar max_utilization_percentage: 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 + 2025-03-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 @@ -4643,14 +6719,14 @@ def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] """ super().__init__(**kwargs) self.kind: str = "SavingsPlan" - self.arm_sku_name = None - self.benefit_id = None - self.benefit_order_id = None + self.arm_sku_name: Optional[str] = None + self.benefit_id: Optional[str] = None + self.benefit_order_id: Optional[str] = None self.benefit_type = benefit_type - self.usage_date = None - self.avg_utilization_percentage = None - self.min_utilization_percentage = None - self.max_utilization_percentage = None + self.usage_date: Optional[datetime.datetime] = None + self.avg_utilization_percentage: Optional[float] = None + self.min_utilization_percentage: Optional[float] = None + self.max_utilization_percentage: Optional[float] = None class SavingsPlanUtilizationSummaryProperties(BenefitUtilizationSummaryProperties): @@ -4672,14 +6748,14 @@ class SavingsPlanUtilizationSummaryProperties(BenefitUtilizationSummaryPropertie :vartype usage_date: ~datetime.datetime :ivar avg_utilization_percentage: 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 + 2025-03-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. :vartype avg_utilization_percentage: float :ivar min_utilization_percentage: 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 + 2025-03-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 @@ -4687,7 +6763,7 @@ class SavingsPlanUtilizationSummaryProperties(BenefitUtilizationSummaryPropertie :vartype min_utilization_percentage: float :ivar max_utilization_percentage: 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 + 2025-03-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 @@ -4723,9 +6799,9 @@ def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind """ super().__init__(benefit_type=benefit_type, **kwargs) - self.avg_utilization_percentage = None - self.min_utilization_percentage = None - self.max_utilization_percentage = None + self.avg_utilization_percentage: Optional[float] = None + self.min_utilization_percentage: Optional[float] = None + self.max_utilization_percentage: Optional[float] = None class ScheduledActionProxyResource(ProxyResource): @@ -4775,12 +6851,12 @@ def __init__(self, *, kind: Optional[Union[str, "_models.ScheduledActionKind"]] :paramtype kind: str or ~azure.mgmt.costmanagement.models.ScheduledActionKind """ super().__init__(**kwargs) - self.e_tag = None + self.e_tag: Optional[str] = None self.kind = kind - self.system_data = None + self.system_data: Optional["_models.SystemData"] = None -class ScheduledAction(ScheduledActionProxyResource): # pylint: disable=too-many-instance-attributes +class ScheduledAction(ScheduledActionProxyResource): """Scheduled action definition. Variables are only populated by the server, and will be ignored when sending a request. @@ -4813,10 +6889,11 @@ class ScheduledAction(ScheduledActionProxyResource): # pylint: disable=too-many :vartype notification_email: str :ivar schedule: Schedule of the scheduled action. :vartype schedule: ~azure.mgmt.costmanagement.models.ScheduleProperties - :ivar scope: 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, + :ivar scope: For private scheduled action(Create or Update), scope will be empty.\\ :code:`
` For shared scheduled action(Create or Update By Scope), Cost Management scope can be + '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}' @@ -4891,10 +6968,11 @@ def __init__( :paramtype notification_email: str :keyword schedule: Schedule of the scheduled action. :paramtype schedule: ~azure.mgmt.costmanagement.models.ScheduleProperties - :keyword scope: 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, + :keyword scope: For private scheduled action(Create or Update), scope will be empty.\\ + :code:`
` For shared scheduled action(Create or Update By Scope), Cost Management scope + can be '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}' @@ -4950,14 +7028,14 @@ class ScheduledActionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.ScheduledAction"]] = None + self.next_link: Optional[str] = None class ScheduleProperties(_serialization.Model): """The properties of the schedule. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar frequency: Frequency of the schedule. Required. Known values are: "Daily", "Weekly", and "Monthly". @@ -5003,8 +7081,8 @@ def __init__( 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, + 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: Any ) -> None: @@ -5039,14 +7117,79 @@ def __init__( self.end_date = end_date -class SharedScopeBenefitRecommendationProperties( - BenefitRecommendationProperties -): # pylint: disable=too-many-instance-attributes +class Setting(ProxyResource): + """Setting definition. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + TagInheritanceSetting + + 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 server. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar kind: Specifies the kind of settings. Required. "taginheritance" + :vartype kind: str or ~azure.mgmt.costmanagement.models.SettingsKind + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + } + + _subtype_map = {"kind": {"taginheritance": "TagInheritanceSetting"}} + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.kind: Optional[str] = None + + +class SettingsListResult(_serialization.Model): + """Setting list result. It contains a list of settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of settings. + :vartype value: list[~azure.mgmt.costmanagement.models.Setting] + """ + + _validation = { + "value": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[Setting]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.value: Optional[list["_models.Setting"]] = None + + +class SharedScopeBenefitRecommendationProperties(BenefitRecommendationProperties): # pylint: disable=name-too-long """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. + All required parameters must be populated in order to send to server. :ivar first_consumption_date: The first usage date used for looking back for computing the recommendations. @@ -5150,14 +7293,12 @@ def __init__( self.scope: str = "Shared" -class SingleScopeBenefitRecommendationProperties( - BenefitRecommendationProperties -): # pylint: disable=too-many-instance-attributes +class SingleScopeBenefitRecommendationProperties(BenefitRecommendationProperties): # pylint: disable=name-too-long """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. + All required parameters must be populated in order to send to server. :ivar first_consumption_date: The first usage date used for looking back for computing the recommendations. @@ -5269,8 +7410,59 @@ def __init__( **kwargs ) self.scope: str = "Single" - self.subscription_id = None - self.resource_group = None + self.subscription_id: Optional[str] = None + self.resource_group: Optional[str] = None + + +class SourceCostAllocationResource(CostAllocationResource): + """Source resources for cost allocation. + + All required parameters must be populated in order to send to server. + + :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known + values are: "Dimension" and "Tag". + :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :ivar name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :vartype name: str + :ivar values: Source Resources for cost allocation. This list cannot contain more than 25 + values. Required. + :vartype values: list[str] + """ + + _validation = { + "resource_type": {"required": True}, + "name": {"required": True}, + "values": {"required": True}, + } + + _attribute_map = { + "resource_type": {"key": "resourceType", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "values": {"key": "values", "type": "[str]"}, + } + + def __init__( + self, + *, + resource_type: Union[str, "_models.CostAllocationResourceType"], + name: str, + values: list[str], + **kwargs: Any + ) -> None: + """ + :keyword resource_type: Type of resources contained in this cost allocation rule. Required. + Known values are: "Dimension" and "Tag". + :paramtype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :keyword name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :paramtype name: str + :keyword values: Source Resources for cost allocation. This list cannot contain more than 25 + values. Required. + :paramtype values: list[str] + """ + super().__init__(resource_type=resource_type, name=name, **kwargs) + self.values = values class Status(_serialization.Model): @@ -5297,6 +7489,48 @@ def __init__( self.status = status +class SystemAssignedServiceIdentity(_serialization.Model): + """Managed service identity (either system assigned, or none). + + 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 server. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: Type of managed service identity (either system assigned, or none). Required. Known + values are: "None" and "SystemAssigned". + :vartype type: str or ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType + """ + + _validation = { + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + "type": {"required": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, *, type: Union[str, "_models.SystemAssignedServiceIdentityType"], **kwargs: Any) -> None: + """ + :keyword type: Type of managed service identity (either system assigned, or none). Required. + Known values are: "None" and "SystemAssigned". + :paramtype type: str or ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType + """ + super().__init__(**kwargs) + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None + self.type = type + + class SystemData(_serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -5361,7 +7595,150 @@ def __init__( self.last_modified_at = last_modified_at -class View(CostManagementProxyResource): # pylint: disable=too-many-instance-attributes +class TagInheritanceProperties(_serialization.Model): + """The properties of the tag inheritance setting. + + All required parameters must be populated in order to send to server. + + :ivar prefer_container_tags: This property defines the behavior when an inherited tag being + applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to + true - when tags match, the highest scope tags will be applied. Billing profile is the highest + scope, followed by invoice sections, subscriptions and resource groups (allows overriding of + lower scope tag values). If set to false - when tags match, the lowest scope tags will be + applied. So, if a resource has the same tag as a subscription tag, the resource tag will be + applied (does not allow overriding of lower scope tag values). Required. + :vartype prefer_container_tags: bool + """ + + _validation = { + "prefer_container_tags": {"required": True}, + } + + _attribute_map = { + "prefer_container_tags": {"key": "preferContainerTags", "type": "bool"}, + } + + def __init__(self, *, prefer_container_tags: bool, **kwargs: Any) -> None: + """ + :keyword prefer_container_tags: This property defines the behavior when an inherited tag being + applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to + true - when tags match, the highest scope tags will be applied. Billing profile is the highest + scope, followed by invoice sections, subscriptions and resource groups (allows overriding of + lower scope tag values). If set to false - when tags match, the lowest scope tags will be + applied. So, if a resource has the same tag as a subscription tag, the resource tag will be + applied (does not allow overriding of lower scope tag values). Required. + :paramtype prefer_container_tags: bool + """ + super().__init__(**kwargs) + self.prefer_container_tags = prefer_container_tags + + +class TagInheritanceSetting(Setting): + """Tag Inheritance Setting definition. + + 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 server. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar kind: Specifies the kind of settings. Required. "taginheritance" + :vartype kind: str or ~azure.mgmt.costmanagement.models.SettingsKind + :ivar properties: The properties of the tag inheritance setting. + :vartype properties: ~azure.mgmt.costmanagement.models.TagInheritanceProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "TagInheritanceProperties"}, + } + + def __init__(self, *, properties: Optional["_models.TagInheritanceProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the tag inheritance setting. + :paramtype properties: ~azure.mgmt.costmanagement.models.TagInheritanceProperties + """ + super().__init__(**kwargs) + self.kind: str = "taginheritance" + self.properties = properties + + +class TargetCostAllocationResource(CostAllocationResource): + """Target resources for cost allocation. + + All required parameters must be populated in order to send to server. + + :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known + values are: "Dimension" and "Tag". + :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :ivar name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :vartype name: str + :ivar values: Target resources for cost allocation. This list cannot contain more than 25 + values. Required. + :vartype values: list[~azure.mgmt.costmanagement.models.CostAllocationProportion] + :ivar policy_type: Method of cost allocation for the rule. Required. "FixedProportion" + :vartype policy_type: str or ~azure.mgmt.costmanagement.models.CostAllocationPolicyType + """ + + _validation = { + "resource_type": {"required": True}, + "name": {"required": True}, + "values": {"required": True}, + "policy_type": {"required": True}, + } + + _attribute_map = { + "resource_type": {"key": "resourceType", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "values": {"key": "values", "type": "[CostAllocationProportion]"}, + "policy_type": {"key": "policyType", "type": "str"}, + } + + def __init__( + self, + *, + resource_type: Union[str, "_models.CostAllocationResourceType"], + name: str, + values: list["_models.CostAllocationProportion"], + policy_type: Union[str, "_models.CostAllocationPolicyType"], + **kwargs: Any + ) -> None: + """ + :keyword resource_type: Type of resources contained in this cost allocation rule. Required. + Known values are: "Dimension" and "Tag". + :paramtype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :keyword name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :paramtype name: str + :keyword values: Target resources for cost allocation. This list cannot contain more than 25 + values. Required. + :paramtype values: list[~azure.mgmt.costmanagement.models.CostAllocationProportion] + :keyword policy_type: Method of cost allocation for the rule. Required. "FixedProportion" + :paramtype policy_type: str or ~azure.mgmt.costmanagement.models.CostAllocationPolicyType + """ + super().__init__(resource_type=resource_type, name=name, **kwargs) + self.values = values + self.policy_type = policy_type + + +class View(CostManagementProxyResource): """States and configurations of Cost Analysis. Variables are only populated by the server, and will be ignored when sending a request. @@ -5436,7 +7813,6 @@ class View(CostManagementProxyResource): # pylint: disable=too-many-instance-at "name": {"readonly": True}, "type": {"readonly": True}, "created_on": {"readonly": True}, - "modified_on": {"readonly": True}, "currency": {"readonly": True}, } @@ -5469,12 +7845,13 @@ def __init__( e_tag: Optional[str] = None, display_name: Optional[str] = None, scope: Optional[str] = None, + modified_on: Optional[datetime.datetime] = None, date_range: 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, + 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, @@ -5506,6 +7883,8 @@ def __init__( '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope. :paramtype scope: str + :keyword modified_on: Date when the user last modified this view. + :paramtype modified_on: ~datetime.datetime :keyword date_range: Date range of the current view. :paramtype date_range: str :keyword chart: Chart type of the main view in Cost Analysis. Required. Known values are: @@ -5538,10 +7917,10 @@ def __init__( super().__init__(e_tag=e_tag, **kwargs) self.display_name = display_name self.scope = scope - self.created_on = None - self.modified_on = None + self.created_on: Optional[datetime.datetime] = None + self.modified_on = modified_on self.date_range = date_range - self.currency = None + self.currency: Optional[str] = None self.chart = chart self.accumulated = accumulated self.metric = metric @@ -5578,5 +7957,5 @@ class ViewListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.View"]] = None + self.next_link: Optional[str] = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py index ba3f6355c103..cf144b3ea8d6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,49 +6,59 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import Operations -from ._views_operations import ViewsOperations -from ._alerts_operations import AlertsOperations -from ._forecast_operations import ForecastOperations -from ._dimensions_operations import DimensionsOperations -from ._query_operations import QueryOperations -from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations -from ._exports_operations import ExportsOperations -from ._generate_cost_details_report_operations import GenerateCostDetailsReportOperations -from ._generate_detailed_cost_report_operations import GenerateDetailedCostReportOperations -from ._generate_detailed_cost_report_operation_results_operations import ( - GenerateDetailedCostReportOperationResultsOperations, -) -from ._generate_detailed_cost_report_operation_status_operations import ( - GenerateDetailedCostReportOperationStatusOperations, -) -from ._price_sheet_operations import PriceSheetOperations -from ._scheduled_actions_operations import ScheduledActionsOperations -from ._benefit_recommendations_operations import BenefitRecommendationsOperations -from ._benefit_utilization_summaries_operations import BenefitUtilizationSummariesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._cost_allocation_rules_operations import CostAllocationRulesOperations # type: ignore +from ._benefit_recommendations_operations import BenefitRecommendationsOperations # type: ignore +from ._benefit_utilization_summaries_operations import BenefitUtilizationSummariesOperations # type: ignore +from ._generate_benefit_utilization_summaries_report_operations import GenerateBenefitUtilizationSummariesReportOperations # type: ignore +from ._budgets_operations import BudgetsOperations # type: ignore +from ._exports_operations import ExportsOperations # type: ignore +from ._generate_cost_details_report_operations import GenerateCostDetailsReportOperations # type: ignore +from ._generate_detailed_cost_report_operations import GenerateDetailedCostReportOperations # type: ignore +from ._generate_detailed_cost_report_operation_results_operations import GenerateDetailedCostReportOperationResultsOperations # type: ignore +from ._generate_detailed_cost_report_operation_status_operations import GenerateDetailedCostReportOperationStatusOperations # type: ignore +from ._views_operations import ViewsOperations # type: ignore +from ._alerts_operations import AlertsOperations # type: ignore +from ._forecast_operations import ForecastOperations # type: ignore +from ._dimensions_operations import DimensionsOperations # type: ignore +from ._query_operations import QueryOperations # type: ignore +from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations # type: ignore +from ._price_sheet_operations import PriceSheetOperations # type: ignore +from ._scheduled_actions_operations import ScheduledActionsOperations # type: ignore +from ._settings_operations import SettingsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "Operations", + "CostAllocationRulesOperations", + "BenefitRecommendationsOperations", + "BenefitUtilizationSummariesOperations", + "GenerateBenefitUtilizationSummariesReportOperations", + "BudgetsOperations", + "ExportsOperations", + "GenerateCostDetailsReportOperations", + "GenerateDetailedCostReportOperations", + "GenerateDetailedCostReportOperationResultsOperations", + "GenerateDetailedCostReportOperationStatusOperations", "ViewsOperations", "AlertsOperations", "ForecastOperations", "DimensionsOperations", "QueryOperations", "GenerateReservationDetailsReportOperations", - "ExportsOperations", - "GenerateCostDetailsReportOperations", - "GenerateDetailedCostReportOperations", - "GenerateDetailedCostReportOperationResultsOperations", - "GenerateDetailedCostReportOperationStatusOperations", "PriceSheetOperations", "ScheduledActionsOperations", - "BenefitRecommendationsOperations", - "BenefitUtilizationSummariesOperations", + "SettingsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py index 266574888da0..9cf118310c9f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,18 +20,18 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -39,7 +41,7 @@ def build_list_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -48,7 +50,7 @@ def build_list_request(scope: str, **kwargs: Any) -> HttpRequest: "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -63,7 +65,7 @@ def build_get_request(scope: str, alert_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +75,7 @@ def build_get_request(scope: str, alert_id: str, **kwargs: Any) -> HttpRequest: "alertId": _SERIALIZER.url("alert_id", alert_id, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +90,7 @@ def build_dismiss_request(scope: str, alert_id: str, **kwargs: Any) -> HttpReque _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -99,7 +101,7 @@ def build_dismiss_request(scope: str, alert_id: str, **kwargs: Any) -> HttpReque "alertId": _SERIALIZER.url("alert_id", alert_id, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -120,14 +122,14 @@ def build_list_external_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "externalCloudProviderType": _SERIALIZER.url( "external_cloud_provider_type", external_cloud_provider_type, "str" @@ -135,7 +137,7 @@ def build_list_external_request( "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -158,12 +160,12 @@ class AlertsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: @@ -189,12 +191,11 @@ def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertsResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.AlertsResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,36 +209,35 @@ def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - request = build_list_request( + _request = build_list_request( scope=scope, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AlertsResult", pipeline_response) + deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - list.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/alerts"} + return deserialized # type: ignore @distributed_trace def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: @@ -265,12 +265,11 @@ def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: :type scope: str :param alert_id: Alert ID. Required. :type alert_id: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -284,37 +283,36 @@ def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( scope=scope, alert_id=alert_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Alert", pipeline_response) + deserialized = self._deserialize("Alert", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}"} + return deserialized # type: ignore @overload def dismiss( @@ -355,7 +353,6 @@ def dismiss( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: @@ -363,7 +360,7 @@ def dismiss( @overload def dismiss( - self, scope: str, alert_id: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, alert_id: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.Alert: """Dismisses the specified alert. @@ -390,11 +387,10 @@ def dismiss( :param alert_id: Alert ID. Required. :type alert_id: str :param parameters: Parameters supplied to the Dismiss Alert operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: @@ -402,7 +398,7 @@ def dismiss( @distributed_trace def dismiss( - self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, IO], **kwargs: Any + self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, IO[bytes]], **kwargs: Any ) -> _models.Alert: """Dismisses the specified alert. @@ -429,17 +425,13 @@ def dismiss( :param alert_id: Alert ID. Required. :type alert_id: str :param parameters: Parameters supplied to the Dismiss Alert operation. Is either a - DismissAlertPayload type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + DismissAlertPayload type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or IO[bytes] :return: Alert or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Alert :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,40 +454,39 @@ def dismiss( else: _json = self._serialize.body(parameters, "DismissAlertPayload") - request = build_dismiss_request( + _request = build_dismiss_request( scope=scope, alert_id=alert_id, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.dismiss.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Alert", pipeline_response) + deserialized = self._deserialize("Alert", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - dismiss.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}"} + return deserialized # type: ignore @distributed_trace def list_external( @@ -519,12 +510,11 @@ def list_external( '{externalBillingAccountId}' for consolidated account used with dimension/query operations. Required. :type external_cloud_provider_id: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertsResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.AlertsResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -538,36 +528,33 @@ def list_external( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - request = build_list_external_request( + _request = build_list_external_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, api_version=api_version, - template_url=self.list_external.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AlertsResult", pipeline_response) + deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - list_external.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py index 3503a1d3721e..d8e6ea1945cc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,18 +20,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -47,7 +48,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -56,7 +57,7 @@ def build_list_request( "billingScope": _SERIALIZER.url("billing_scope", billing_scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters if filter is not None: @@ -85,12 +86,12 @@ class BenefitRecommendationsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -100,7 +101,7 @@ def list( orderby: Optional[str] = None, expand: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.BenefitRecommendationModel"]: + ) -> ItemPaged["_models.BenefitRecommendationModel"]: """List of recommendations for purchasing savings plan. .. seealso:: @@ -127,7 +128,6 @@ def list( :param expand: May be used to expand the properties by: properties/usage, properties/allRecommendationDetails. Default value is None. :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitRecommendationModel or the result of cls(response) :rtype: @@ -140,7 +140,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitRecommendationsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -151,18 +151,16 @@ def list( def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( billing_scope=billing_scope, filter=filter, orderby=orderby, expand=expand, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -174,13 +172,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("BenefitRecommendationsListResult", pipeline_response) @@ -190,21 +187,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list.metadata = {"url": "/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations"} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py index 3a8af9d96867..7c9e81c31ebf 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,18 +21,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,19 +48,19 @@ def build_list_by_billing_account_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -84,20 +86,20 @@ def build_list_by_billing_profile_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,19 +124,19 @@ def build_list_by_savings_plan_order_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -160,20 +162,20 @@ def build_list_by_savings_plan_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), "savingsPlanId": _SERIALIZER.url("savings_plan_id", savings_plan_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -200,12 +202,12 @@ class BenefitUtilizationSummariesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_account_id( @@ -214,7 +216,7 @@ def list_by_billing_account_id( grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.BenefitUtilizationSummary"]: + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: """Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'. @@ -229,7 +231,6 @@ def list_by_billing_account_id( :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -242,7 +243,7 @@ def list_by_billing_account_id( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,17 +254,15 @@ def list_by_billing_account_id( def prepare_request(next_link=None): if not next_link: - request = build_list_by_billing_account_id_request( + _request = build_list_by_billing_account_id_request( billing_account_id=billing_account_id, grain_parameter=grain_parameter, filter=filter, api_version=api_version, - template_url=self.list_by_billing_account_id.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -275,13 +274,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -291,27 +289,26 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_billing_account_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } - @distributed_trace def list_by_billing_profile_id( self, @@ -320,7 +317,7 @@ def list_by_billing_profile_id( grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.BenefitUtilizationSummary"]: + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: """Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'. @@ -337,7 +334,6 @@ def list_by_billing_profile_id( :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -350,7 +346,7 @@ def list_by_billing_profile_id( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -361,18 +357,16 @@ def list_by_billing_profile_id( def prepare_request(next_link=None): if not next_link: - request = build_list_by_billing_profile_id_request( + _request = build_list_by_billing_profile_id_request( billing_account_id=billing_account_id, billing_profile_id=billing_profile_id, grain_parameter=grain_parameter, filter=filter, api_version=api_version, - template_url=self.list_by_billing_profile_id.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -384,13 +378,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -400,27 +393,26 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_billing_profile_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } - @distributed_trace def list_by_savings_plan_order( self, @@ -428,7 +420,7 @@ def list_by_savings_plan_order( filter: Optional[str] = None, grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, **kwargs: Any - ) -> Iterable["_models.BenefitUtilizationSummary"]: + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: """Lists the savings plan utilization summaries for daily or monthly grain. .. seealso:: @@ -441,7 +433,6 @@ def list_by_savings_plan_order( :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default value is None. :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -454,7 +445,7 @@ def list_by_savings_plan_order( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,17 +456,15 @@ def list_by_savings_plan_order( def prepare_request(next_link=None): if not next_link: - request = build_list_by_savings_plan_order_request( + _request = build_list_by_savings_plan_order_request( savings_plan_order_id=savings_plan_order_id, filter=filter, grain_parameter=grain_parameter, api_version=api_version, - template_url=self.list_by_savings_plan_order.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -487,13 +476,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -503,27 +491,26 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_savings_plan_order.metadata = { - "url": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } - @distributed_trace def list_by_savings_plan_id( self, @@ -532,7 +519,7 @@ def list_by_savings_plan_id( filter: Optional[str] = None, grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, **kwargs: Any - ) -> Iterable["_models.BenefitUtilizationSummary"]: + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: """Lists the savings plan utilization summaries for daily or monthly grain. .. seealso:: @@ -547,7 +534,6 @@ def list_by_savings_plan_id( :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default value is None. :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BenefitUtilizationSummary or the result of cls(response) :rtype: @@ -560,7 +546,7 @@ def list_by_savings_plan_id( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -571,18 +557,16 @@ def list_by_savings_plan_id( def prepare_request(next_link=None): if not next_link: - request = build_list_by_savings_plan_id_request( + _request = build_list_by_savings_plan_id_request( savings_plan_order_id=savings_plan_order_id, savings_plan_id=savings_plan_id, filter=filter, grain_parameter=grain_parameter, api_version=api_version, - template_url=self.list_by_savings_plan_id.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -594,13 +578,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) @@ -610,23 +593,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_savings_plan_id.metadata = { - "url": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" - } diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py new file mode 100644 index 000000000000..1e368ba81552 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py @@ -0,0 +1,815 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "budgetName": _SERIALIZER.url( + "budget_name", budget_name, "str", max_length=63, min_length=1, pattern=r"^[a-zA-Z0-9_-]+$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "budgetName": _SERIALIZER.url( + "budget_name", budget_name, "str", max_length=63, min_length=1, pattern=r"^[a-zA-Z0-9_-]+$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "budgetName": _SERIALIZER.url( + "budget_name", budget_name, "str", max_length=63, min_length=1, pattern=r"^[a-zA-Z0-9_-]+$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class BudgetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`budgets` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, scope: str, filter: Optional[str] = None, **kwargs: Any) -> ItemPaged["_models.Budget"]: + """Lists all budgets for the defined scope. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param filter: OData filter option. May be used to filter budgets by properties/category. The + filter supports 'eq' only. Default value is None. + :type filter: str + :return: An iterator like instance of either Budget or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Budget] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.BudgetsListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_request( + scope=scope, + filter=filter, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BudgetsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: + """Gets the budget for the scope by budget name. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + _request = build_get_request( + scope=scope, + budget_name=budget_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Budget", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + scope: str, + budget_name: str, + parameters: _models.Budget, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + scope: str, + budget_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, scope: str, budget_name: str, parameters: Union[_models.Budget, IO[bytes]], **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Is either a Budget type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget or IO[bytes] + :return: Budget or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "Budget") + + _request = build_create_or_update_request( + scope=scope, + budget_name=budget_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Budget", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, scope: str, budget_name: str, **kwargs: Any + ) -> None: + """The operation to delete a budget. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/CostManagement/ + + :param scope: The scope associated with budget operations. + + Supported scopes for **CategoryType: Cost** + + Azure RBAC Scopes: + + + * '/subscriptions/{subscriptionId}/' for subscription scope + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope + * + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope + + EA (Enterprise Agreement) Scopes: + + * + '/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 + + MCA (Modern Customer Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only) + + Supported scopes for **CategoryType: ReservationUtilization** + + EA (Enterprise Agreement) Scopes: + + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope + + MCA (Modern Customer Agreement) Scopes: + + + * + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope (non-CSP only) + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for + customer scope (CSP only). Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + scope=scope, + budget_name=budget_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py new file mode 100644 index 000000000000..849ec05068a9 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py @@ -0,0 +1,667 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +import urllib.parse + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(billing_account_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_check_name_availability_request(billing_account_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request(billing_account_id: str, rule_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"[A-Za-z0-9\-_]+"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request(billing_account_id: str, rule_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"[A-Za-z0-9\-_]+"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request(billing_account_id: str, rule_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"[A-Za-z0-9\-_]+"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class CostAllocationRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`cost_allocation_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, billing_account_id: str, **kwargs: Any) -> ItemPaged["_models.CostAllocationRuleDefinition"]: + """Get the list of all cost allocation rules for a billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :return: An iterator like instance of either CostAllocationRuleDefinition or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.CostAllocationRuleList] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_list_request( + billing_account_id=billing_account_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize("CostAllocationRuleList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: _models.CostAllocationRuleCheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: Union[ + _models.CostAllocationRuleCheckNameAvailabilityRequest, IO[bytes] + ], + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Is either a CostAllocationRuleCheckNameAvailabilityRequest type or a IO[bytes] + type. Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest or IO[bytes] + :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleCheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cost_allocation_rule_check_name_availability_request, (IOBase, bytes)): + _content = cost_allocation_rule_check_name_availability_request + else: + _json = self._serialize.body( + cost_allocation_rule_check_name_availability_request, "CostAllocationRuleCheckNameAvailabilityRequest" + ) + + _request = build_check_name_availability_request( + billing_account_id=billing_account_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize( + "CostAllocationRuleCheckNameAvailabilityResponse", pipeline_response.http_response + ) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> _models.CostAllocationRuleDefinition: + """Get a cost allocation rule by rule name and billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + _request = build_get_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: _models.CostAllocationRuleDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: Union[_models.CostAllocationRuleDefinition, IO[bytes]], + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Is either a + CostAllocationRuleDefinition type or a IO[bytes] type. Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition or + IO[bytes] + :return: CostAllocationRuleDefinition or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cost_allocation_rule, (IOBase, bytes)): + _content = cost_allocation_rule + else: + _json = self._serialize.body(cost_allocation_rule, "CostAllocationRuleDefinition") + + _request = build_create_or_update_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, billing_account_id: str, rule_name: str, **kwargs: Any + ) -> None: + """Delete cost allocation rule for billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py index 19dec07c7dc7..0ecbd2a36b35 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar, Union import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,18 +21,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -48,7 +50,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -57,7 +59,7 @@ def build_list_request( "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -76,7 +78,7 @@ def build_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_by_external_cloud_provider_type_request( +def build_by_external_cloud_provider_type_request( # pylint: disable=name-too-long external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, *, @@ -89,14 +91,14 @@ def build_by_external_cloud_provider_type_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "externalCloudProviderType": _SERIALIZER.url( "external_cloud_provider_type", external_cloud_provider_type, "str" @@ -104,7 +106,7 @@ def build_by_external_cloud_provider_type_request( "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -135,12 +137,12 @@ class DimensionsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list( @@ -151,7 +153,7 @@ def list( skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.Dimension"]: + ) -> ItemPaged["_models.Dimension"]: """Lists the dimensions by the defined scope. .. seealso:: @@ -189,7 +191,6 @@ def list( :param top: May be used to limit the number of results to the most recent N dimension data. Default value is None. :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Dimension or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Dimension] :raises ~azure.core.exceptions.HttpResponseError: @@ -200,7 +201,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,19 +212,17 @@ def list( def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( scope=scope, filter=filter, expand=expand, skiptoken=skiptoken, top=top, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -235,13 +234,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("DimensionsListResult", pipeline_response) @@ -251,25 +249,26 @@ def extract_data(pipeline_response): return None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/dimensions"} - @distributed_trace def by_external_cloud_provider_type( self, @@ -280,7 +279,7 @@ def by_external_cloud_provider_type( skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any - ) -> Iterable["_models.Dimension"]: + ) -> ItemPaged["_models.Dimension"]: """Lists the dimensions by the external cloud provider type. .. seealso:: @@ -311,7 +310,6 @@ def by_external_cloud_provider_type( :param top: May be used to limit the number of results to the most recent N dimension data. Default value is None. :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Dimension or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Dimension] :raises ~azure.core.exceptions.HttpResponseError: @@ -322,7 +320,7 @@ def by_external_cloud_provider_type( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -333,7 +331,7 @@ def by_external_cloud_provider_type( def prepare_request(next_link=None): if not next_link: - request = build_by_external_cloud_provider_type_request( + _request = build_by_external_cloud_provider_type_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, filter=filter, @@ -341,12 +339,10 @@ def prepare_request(next_link=None): skiptoken=skiptoken, top=top, api_version=api_version, - template_url=self.by_external_cloud_provider_type.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -358,13 +354,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("DimensionsListResult", pipeline_response) @@ -374,23 +369,22 @@ def extract_data(pipeline_response): return None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - by_external_cloud_provider_type.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions" - } diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py index e747255baa54..ba3f4d00b08e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,18 +20,18 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -39,7 +41,7 @@ def build_list_request(scope: str, *, expand: Optional[str] = None, **kwargs: An _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -48,7 +50,7 @@ def build_list_request(scope: str, *, expand: Optional[str] = None, **kwargs: An "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -65,7 +67,7 @@ def build_get_request(scope: str, export_name: str, *, expand: Optional[str] = N _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +77,7 @@ def build_get_request(scope: str, export_name: str, *, expand: Optional[str] = N "exportName": _SERIALIZER.url("export_name", export_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -92,7 +94,7 @@ def build_create_or_update_request(scope: str, export_name: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -103,7 +105,7 @@ def build_create_or_update_request(scope: str, export_name: str, **kwargs: Any) "exportName": _SERIALIZER.url("export_name", export_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -120,7 +122,7 @@ def build_delete_request(scope: str, export_name: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -130,7 +132,7 @@ def build_delete_request(scope: str, export_name: str, **kwargs: Any) -> HttpReq "exportName": _SERIALIZER.url("export_name", export_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -145,7 +147,8 @@ def build_execute_request(scope: str, export_name: str, **kwargs: Any) -> HttpRe _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -155,12 +158,14 @@ def build_execute_request(scope: str, export_name: str, **kwargs: Any) -> HttpRe "exportName": _SERIALIZER.url("export_name", export_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) @@ -170,7 +175,7 @@ def build_get_execution_history_request(scope: str, export_name: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -180,7 +185,7 @@ def build_get_execution_history_request(scope: str, export_name: str, **kwargs: "exportName": _SERIALIZER.url("export_name", export_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -203,12 +208,12 @@ class ExportsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> _models.ExportListResult: @@ -238,12 +243,11 @@ def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> _mode 'runHistory' is supported and will return information for the last run of each export. Default value is None. :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ExportListResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ExportListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,37 +261,36 @@ def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> _mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExportListResult] = kwargs.pop("cls", None) - request = build_list_request( + _request = build_list_request( scope=scope, expand=expand, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ExportListResult", pipeline_response) + deserialized = self._deserialize("ExportListResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - list.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports"} + return deserialized # type: ignore @distributed_trace def get(self, scope: str, export_name: str, expand: Optional[str] = None, **kwargs: Any) -> _models.Export: @@ -319,12 +322,11 @@ def get(self, scope: str, export_name: str, expand: Optional[str] = None, **kwar 'runHistory' is supported and will return information for the last 10 runs of the export. Default value is None. :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -338,38 +340,37 @@ def get(self, scope: str, export_name: str, expand: Optional[str] = None, **kwar api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Export] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( scope=scope, export_name=export_name, expand=expand, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Export", pipeline_response) + deserialized = self._deserialize("Export", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}"} + return deserialized # type: ignore @overload def create_or_update( @@ -412,7 +413,6 @@ def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: @@ -420,7 +420,13 @@ def create_or_update( @overload def create_or_update( - self, scope: str, export_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, + scope: str, + export_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.Export: """The operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -449,11 +455,10 @@ def create_or_update( :param export_name: Export Name. Required. :type export_name: str :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: @@ -461,7 +466,7 @@ def create_or_update( @distributed_trace def create_or_update( - self, scope: str, export_name: str, parameters: Union[_models.Export, IO], **kwargs: Any + self, scope: str, export_name: str, parameters: Union[_models.Export, IO[bytes]], **kwargs: Any ) -> _models.Export: """The operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -490,17 +495,13 @@ def create_or_update( :param export_name: Export Name. Required. :type export_name: str :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Is either a - Export type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Export or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + Export type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Export or IO[bytes] :return: Export or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.Export :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,45 +524,40 @@ def create_or_update( else: _json = self._serialize.body(parameters, "Export") - request = build_create_or_update_request( + _request = build_create_or_update_request( scope=scope, export_name=export_name, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("Export", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Export", pipeline_response) + deserialized = self._deserialize("Export", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}"} - @distributed_trace def delete( # pylint: disable=inconsistent-return-statements self, scope: str, export_name: str, **kwargs: Any @@ -590,12 +586,11 @@ def delete( # pylint: disable=inconsistent-return-statements :type scope: str :param export_name: Export Name. Required. :type export_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -609,37 +604,128 @@ def delete( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( scope=scope, export_name=export_name, api_version=api_version, - template_url=self.delete.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore + + @overload + def execute( + self, + scope: str, + export_name: str, + parameters: Optional[_models.ExportRunRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """The operation to run an export. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/costmanagement/ + + :param scope: The scope associated with export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def execute( + self, + scope: str, + export_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """The operation to run an export. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - delete.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}"} + :param scope: The scope associated with export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace def execute( # pylint: disable=inconsistent-return-statements - self, scope: str, export_name: str, **kwargs: Any + self, + scope: str, + export_name: str, + parameters: Optional[Union[_models.ExportRunRequest, IO[bytes]]] = None, + **kwargs: Any ) -> None: """The operation to run an export. @@ -665,12 +751,14 @@ def execute( # pylint: disable=inconsistent-return-statements :type scope: str :param export_name: Export Name. Required. :type export_name: str - :keyword callable cls: A custom type or function that will be passed the direct response + :param parameters: Parameters supplied to the Execute Export operation. Is either a + ExportRunRequest type or a IO[bytes] type. Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest or IO[bytes] :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -678,39 +766,54 @@ def execute( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None cls: ClsType[None] = kwargs.pop("cls", None) - request = build_execute_request( + content_type = content_type or "application/json" if parameters else None + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _json = self._serialize.body(parameters, "ExportRunRequest") + else: + _json = None + + _request = build_execute_request( scope=scope, export_name=export_name, api_version=api_version, - template_url=self.execute.metadata["url"], + content_type=content_type, + json=_json, + content=_content, headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - execute.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def get_execution_history(self, scope: str, export_name: str, **kwargs: Any) -> _models.ExportExecutionListResult: @@ -738,12 +841,11 @@ def get_execution_history(self, scope: str, export_name: str, **kwargs: Any) -> :type scope: str :param export_name: Export Name. Required. :type export_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ExportExecutionListResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -757,36 +859,33 @@ def get_execution_history(self, scope: str, export_name: str, **kwargs: Any) -> api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExportExecutionListResult] = kwargs.pop("cls", None) - request = build_get_execution_history_request( + _request = build_get_execution_history_request( scope=scope, export_name=export_name, api_version=api_version, - template_url=self.get_execution_history.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ExportExecutionListResult", pipeline_response) + deserialized = self._deserialize("ExportExecutionListResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get_execution_history.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py index e39d94f30f09..b1694abf4bf1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,18 +20,18 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -39,7 +41,7 @@ def build_usage_request(scope: str, *, filter: Optional[str] = None, **kwargs: A _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -49,7 +51,7 @@ def build_usage_request(scope: str, *, filter: Optional[str] = None, **kwargs: A "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters if filter is not None: @@ -64,7 +66,7 @@ def build_usage_request(scope: str, *, filter: Optional[str] = None, **kwargs: A return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_external_cloud_provider_usage_request( +def build_external_cloud_provider_usage_request( # pylint: disable=name-too-long external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, *, @@ -74,7 +76,7 @@ def build_external_cloud_provider_usage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -82,7 +84,7 @@ def build_external_cloud_provider_usage_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "externalCloudProviderType": _SERIALIZER.url( "external_cloud_provider_type", external_cloud_provider_type, "str" @@ -90,7 +92,7 @@ def build_external_cloud_provider_usage_request( "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters if filter is not None: @@ -117,12 +119,12 @@ class ForecastOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def usage( @@ -166,7 +168,6 @@ def usage( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -176,7 +177,7 @@ def usage( def usage( self, scope: str, - parameters: IO, + parameters: IO[bytes], filter: Optional[str] = None, *, content_type: str = "application/json", @@ -206,7 +207,7 @@ def usage( :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. @@ -214,7 +215,6 @@ def usage( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -222,7 +222,11 @@ def usage( @distributed_trace def usage( - self, scope: str, parameters: Union[_models.ForecastDefinition, IO], filter: Optional[str] = None, **kwargs: Any + self, + scope: str, + parameters: Union[_models.ForecastDefinition, IO[bytes]], + filter: Optional[str] = None, + **kwargs: Any ) -> Optional[_models.ForecastResult]: """Lists the forecast charges for scope defined. @@ -247,21 +251,17 @@ def usage( specific for partners. Required. :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO + either a ForecastDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. :type filter: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -284,42 +284,41 @@ def usage( else: _json = self._serialize.body(parameters, "ForecastDefinition") - request = build_usage_request( + _request = build_usage_request( scope=scope, filter=filter, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.usage.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize("ForecastResult", pipeline_response) + deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - usage.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/forecast"} + return deserialized # type: ignore @overload def external_cloud_provider_usage( @@ -357,7 +356,6 @@ def external_cloud_provider_usage( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult :raises ~azure.core.exceptions.HttpResponseError: @@ -368,7 +366,7 @@ def external_cloud_provider_usage( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: IO, + parameters: IO[bytes], filter: Optional[str] = None, *, content_type: str = "application/json", @@ -391,7 +389,7 @@ def external_cloud_provider_usage( :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. @@ -399,7 +397,6 @@ def external_cloud_provider_usage( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult :raises ~azure.core.exceptions.HttpResponseError: @@ -410,7 +407,7 @@ def external_cloud_provider_usage( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: Union[_models.ForecastDefinition, IO], + parameters: Union[_models.ForecastDefinition, IO[bytes]], filter: Optional[str] = None, **kwargs: Any ) -> _models.ForecastResult: @@ -430,21 +427,17 @@ def external_cloud_provider_usage( Required. :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO + either a ForecastDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. :type filter: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ForecastResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ForecastResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -467,7 +460,7 @@ def external_cloud_provider_usage( else: _json = self._serialize.body(parameters, "ForecastDefinition") - request = build_external_cloud_provider_usage_request( + _request = build_external_cloud_provider_usage_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, filter=filter, @@ -475,32 +468,29 @@ def external_cloud_provider_usage( content_type=content_type, json=_json, content=_content, - template_url=self.external_cloud_provider_usage.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ForecastResult", pipeline_response) + deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - external_cloud_provider_usage.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py new file mode 100644 index 000000000000..0a638d2258ea --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py @@ -0,0 +1,1534 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_generate_by_billing_account_request( # pylint: disable=name-too-long + billing_account_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_by_billing_profile_request( # pylint: disable=name-too-long + billing_account_id: str, billing_profile_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_by_reservation_order_id_request( # pylint: disable=name-too-long + reservation_order_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", + ) + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_by_reservation_id_request( + reservation_order_id: str, reservation_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", + ) + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_by_savings_plan_order_id_request( # pylint: disable=name-too-long + savings_plan_order_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", + ) + path_format_arguments = { + "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_by_savings_plan_id_request( # pylint: disable=name-too-long + savings_plan_order_id: str, savings_plan_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", + ) + path_format_arguments = { + "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), + "savingsPlanId": _SERIALIZER.url("savings_plan_id", savings_plan_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class GenerateBenefitUtilizationSummariesReportOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`generate_benefit_utilization_summaries_report` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _generate_by_billing_account_initial( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_billing_account_request( + billing_account_id=billing_account_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_billing_account_initial( + billing_account_id=billing_account_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_billing_profile_initial( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_billing_profile_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param billing_account_id: Billing account ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_billing_profile_initial( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_reservation_order_id_initial( # pylint: disable=name-too-long + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_reservation_order_id_request( + reservation_order_id=reservation_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_reservation_order_id_initial( + reservation_order_id=reservation_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_reservation_id_initial( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_reservation_id_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_reservation_id_initial( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_savings_plan_order_id_initial( # pylint: disable=name-too-long + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_savings_plan_order_id_request( + savings_plan_order_id=savings_plan_order_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_savings_plan_order_id_initial( + savings_plan_order_id=savings_plan_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_savings_plan_id_initial( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") + + _request = build_generate_by_savings_plan_id_request( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] + :return: An instance of LROPoller that returns either + BenefitUtilizationSummariesOperationStatus or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_savings_plan_id_initial( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize( + "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py index 7f9f5529f879..6c5761a0992c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,32 +5,36 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -41,7 +44,7 @@ def build_create_operation_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -51,7 +54,7 @@ def build_create_operation_request(scope: str, **kwargs: Any) -> HttpRequest: "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -68,19 +71,19 @@ def build_get_operation_results_request(scope: str, operation_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -103,17 +106,20 @@ class GenerateCostDetailsReportOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_operation_initial( - self, scope: str, parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO], **kwargs: Any - ) -> Optional[_models.CostDetailsOperationResults]: - error_map = { + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -126,7 +132,7 @@ def _create_operation_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.CostDetailsOperationResults]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -136,50 +142,48 @@ def _create_operation_initial( else: _json = self._serialize.body(parameters, "GenerateCostDetailsReportRequestDefinition") - request = build_create_operation_request( + _request = build_create_operation_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._create_operation_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.GenerateCostDetailsReportErrorResponse, pipeline_response + _models.GenerateCostDetailsReportErrorResponse, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, deserialized, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - _create_operation_initial.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport" - } + return deserialized # type: ignore @overload def begin_create_operation( @@ -201,27 +205,20 @@ def begin_create_operation( response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields. + https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create cost details operation. Required. :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -231,7 +228,7 @@ def begin_create_operation( @overload def begin_create_operation( - self, scope: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.CostDetailsOperationResults]: """This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) @@ -244,27 +241,20 @@ def begin_create_operation( response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields. + https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create cost details operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -274,7 +264,10 @@ def begin_create_operation( @distributed_trace def begin_create_operation( - self, scope: str, parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO], **kwargs: Any + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.CostDetailsOperationResults]: """This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) @@ -287,29 +280,19 @@ def begin_create_operation( response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields. + https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create cost details operation. Is either a - GenerateCostDetailsReportRequestDefinition type or a IO type. Required. + GenerateCostDetailsReportRequestDefinition type or a IO[bytes] type. Required. :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + or IO[bytes] :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -336,12 +319,13 @@ def begin_create_operation( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) + deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -353,20 +337,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CostDetailsOperationResults].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create_operation.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport"} + return LROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _get_operation_results_initial( - self, scope: str, operation_id: str, **kwargs: Any - ) -> Optional[_models.CostDetailsOperationResults]: - error_map = { + def _get_operation_results_initial(self, scope: str, operation_id: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -378,43 +360,43 @@ def _get_operation_results_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.CostDetailsOperationResults]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_get_operation_results_request( + _request = build_get_operation_results_request( scope=scope, operation_id=operation_id, api_version=api_version, - template_url=self._get_operation_results_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - _get_operation_results_initial.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}" - } + return deserialized # type: ignore @distributed_trace def begin_get_operation_results( @@ -423,19 +405,12 @@ def begin_get_operation_results( """Get the result of the specified operation. This link is provided in the CostDetails creation request response Location header. - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + https://aka.ms/costmgmt/scopes. Required. :type scope: str :param operation_id: The target operation Id. Required. :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result of cls(response) :rtype: @@ -460,12 +435,13 @@ def begin_get_operation_results( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response) + deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -477,14 +453,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CostDetailsOperationResults].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_get_operation_results.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}" - } + return LROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py index fe9816fc945f..f6703d99d8f6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,31 +5,35 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -40,7 +43,7 @@ def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpReque _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -50,7 +53,7 @@ def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpReque "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -61,7 +64,7 @@ def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class GenerateDetailedCostReportOperationResultsOperations: +class GenerateDetailedCostReportOperationResultsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. @@ -73,17 +76,15 @@ class GenerateDetailedCostReportOperationResultsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _get_initial( - self, operation_id: str, scope: str, **kwargs: Any - ) -> Optional[_models.GenerateDetailedCostReportOperationResult]: - error_map = { + def _get_initial(self, operation_id: str, scope: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95,41 +96,43 @@ def _get_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.GenerateDetailedCostReportOperationResult]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( operation_id=operation_id, scope=scope, api_version=api_version, - template_url=self._get_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - _get_initial.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/operationResults/{operationId}"} + return deserialized # type: ignore @distributed_trace def begin_get( @@ -143,14 +146,6 @@ def begin_get( :param scope: The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -175,12 +170,15 @@ def begin_get( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) + deserialized = self._deserialize( + "GenerateDetailedCostReportOperationResult", pipeline_response.http_response + ) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -190,12 +188,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/operationResults/{operationId}"} + return LROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py index 35352c896734..6821f0299c7e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -17,18 +18,18 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -38,7 +39,7 @@ def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpReque _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -48,7 +49,7 @@ def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpReque "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -59,7 +60,7 @@ def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class GenerateDetailedCostReportOperationStatusOperations: +class GenerateDetailedCostReportOperationStatusOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. @@ -71,12 +72,12 @@ class GenerateDetailedCostReportOperationStatusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, operation_id: str, scope: str, **kwargs: Any) -> _models.GenerateDetailedCostReportOperationStatuses: @@ -88,12 +89,11 @@ def get(self, operation_id: str, scope: str, **kwargs: Any) -> _models.GenerateD :param scope: The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: GenerateDetailedCostReportOperationStatuses or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,34 +107,33 @@ def get(self, operation_id: str, scope: str, **kwargs: Any) -> _models.GenerateD api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.GenerateDetailedCostReportOperationStatuses] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( operation_id=operation_id, scope=scope, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("GenerateDetailedCostReportOperationStatuses", pipeline_response) + deserialized = self._deserialize("GenerateDetailedCostReportOperationStatuses", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/operationStatus/{operationId}"} + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py index d97dc71e376c..9b5d485051d5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,32 +5,36 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -41,7 +44,7 @@ def build_create_operation_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -51,7 +54,7 @@ def build_create_operation_request(scope: str, **kwargs: Any) -> HttpRequest: "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -76,17 +79,17 @@ class GenerateDetailedCostReportOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_operation_initial( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO], **kwargs: Any - ) -> Optional[_models.GenerateDetailedCostReportOperationResult]: - error_map = { + self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +102,7 @@ def _create_operation_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.GenerateDetailedCostReportOperationResult]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -109,38 +112,38 @@ def _create_operation_initial( else: _json = self._serialize.body(parameters, "GenerateDetailedCostReportDefinition") - request = build_create_operation_request( + _request = build_create_operation_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._create_operation_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.GenerateDetailedCostReportErrorResponse, pipeline_response + _models.GenerateDetailedCostReportErrorResponse, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-Consumption-AsyncOperation"] = self._deserialize( @@ -151,14 +154,12 @@ def _create_operation_initial( ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _create_operation_initial.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport" - } + return deserialized # type: ignore @overload def begin_create_operation( @@ -186,14 +187,6 @@ def begin_create_operation( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -203,7 +196,7 @@ def begin_create_operation( @overload def begin_create_operation( - self, scope: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: """Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header @@ -218,18 +211,10 @@ def begin_create_operation( billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create detailed cost report operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -239,7 +224,7 @@ def begin_create_operation( @distributed_trace def begin_create_operation( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO], **kwargs: Any + self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: """Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header @@ -254,19 +239,9 @@ def begin_create_operation( billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. :type scope: str :param parameters: Parameters supplied to the Create detailed cost report operation. Is either - a GenerateDetailedCostReportDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + a GenerateDetailedCostReportDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or + IO[bytes] :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult or the result of cls(response) :rtype: @@ -293,12 +268,15 @@ def begin_create_operation( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("GenerateDetailedCostReportOperationResult", pipeline_response) + deserialized = self._deserialize( + "GenerateDetailedCostReportOperationResult", pipeline_response.http_response + ) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -310,12 +288,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create_operation.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport"} + return LROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py index acfd66c3eca0..6fbfd2c46be4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,31 +6,35 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,19 +46,19 @@ def build_by_billing_account_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["startDate"] = _SERIALIZER.query("start_date", start_date, "str") @@ -73,20 +77,20 @@ def build_by_billing_profile_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["startDate"] = _SERIALIZER.query("start_date", start_date, "str") @@ -99,7 +103,7 @@ def build_by_billing_profile_id_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class GenerateReservationDetailsReportOperations: +class GenerateReservationDetailsReportOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. @@ -111,17 +115,17 @@ class GenerateReservationDetailsReportOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _by_billing_account_id_initial( self, billing_account_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> Optional[_models.OperationStatus]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,49 +137,49 @@ def _by_billing_account_id_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.OperationStatus]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_by_billing_account_id_request( + _request = build_by_billing_account_id_request( billing_account_id=billing_account_id, start_date=start_date, end_date=end_date, api_version=api_version, - template_url=self._by_billing_account_id_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OperationStatus", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _by_billing_account_id_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return deserialized # type: ignore @distributed_trace def begin_by_billing_account_id( @@ -184,7 +188,7 @@ def begin_by_billing_account_id( """Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, - https://docs.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role. + https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ @@ -195,14 +199,6 @@ def begin_by_billing_account_id( :type start_date: str :param end_date: End Date. Required. :type end_date: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either OperationStatus or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatus] @@ -227,12 +223,13 @@ def begin_by_billing_account_id( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response) + deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -244,22 +241,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.OperationStatus].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_by_billing_account_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return LROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _by_billing_profile_id_initial( self, billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> Optional[_models.OperationStatus]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -271,50 +266,50 @@ def _by_billing_profile_id_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.OperationStatus]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_by_billing_profile_id_request( + _request = build_by_billing_profile_id_request( billing_account_id=billing_account_id, billing_profile_id=billing_profile_id, start_date=start_date, end_date=end_date, api_version=api_version, - template_url=self._by_billing_profile_id_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OperationStatus", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _by_billing_profile_id_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return deserialized # type: ignore @distributed_trace def begin_by_billing_profile_id( @@ -323,7 +318,7 @@ def begin_by_billing_profile_id( """Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, - https://docs.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access. + https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ @@ -336,14 +331,6 @@ def begin_by_billing_profile_id( :type start_date: str :param end_date: End Date. Required. :type end_date: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either OperationStatus or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatus] @@ -369,12 +356,13 @@ def begin_by_billing_profile_id( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response) + deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -386,14 +374,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.OperationStatus].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_by_billing_profile_id.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" - } + return LROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py index d227fb63fadc..62c1c559b28b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,18 +20,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -40,7 +41,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,18 +68,17 @@ class Operations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.CostManagementOperation"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.CostManagementOperation"]: """Lists all of the available cost management REST API operations. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CostManagementOperation or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.CostManagementOperation] @@ -90,7 +90,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.CostManagementOperation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -101,14 +101,12 @@ def list(self, **kwargs: Any) -> Iterable["_models.CostManagementOperation"]: def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -120,13 +118,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("OperationListResult", pipeline_response) @@ -136,21 +133,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list.metadata = {"url": "/providers/Microsoft.CostManagement/operations"} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py index 708b3b455e76..5f36fb4b7369 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,50 +6,54 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_download_request( +def build_download_by_invoice_request( billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -63,7 +67,7 @@ def build_download_request( "invoiceName": _SERIALIZER.url("invoice_name", invoice_name, "str", pattern=r"[A-Za-z0-9]+"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -74,20 +78,20 @@ def build_download_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_download_by_billing_profile_request( +def build_download_by_billing_profile_request( # pylint: disable=name-too-long billing_account_name: str, billing_profile_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -100,7 +104,37 @@ def build_download_by_billing_profile_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_download_by_billing_account_request( # pylint: disable=name-too-long + billing_account_id: str, billing_period_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download", + ) + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "billingPeriodName": _SERIALIZER.url("billing_period_name", billing_period_name, "str", pattern=r"^[0-9]*$"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -123,17 +157,17 @@ class PriceSheetOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _download_initial( + def _download_by_invoice_initial( self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any - ) -> Optional[_models.DownloadURL]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,53 +179,53 @@ def _download_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.DownloadURL]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_download_request( + _request = build_download_by_invoice_request( billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, invoice_name=invoice_name, api_version=api_version, - template_url=self._download_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("DownloadURL", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _download_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + return deserialized # type: ignore @distributed_trace - def begin_download( + def begin_download_by_invoice( self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any ) -> LROPoller[_models.DownloadURL]: """Gets a URL to download the pricesheet for an invoice. The operation is supported for billing @@ -203,14 +237,6 @@ def begin_download( :type billing_profile_name: str :param invoice_name: The ID that uniquely identifies an invoice. Required. :type invoice_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either DownloadURL or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.DownloadURL] @@ -225,7 +251,7 @@ def begin_download( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._download_initial( + raw_result = self._download_by_invoice_initial( billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, invoice_name=invoice_name, @@ -235,12 +261,13 @@ def begin_download( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DownloadURL", pipeline_response) + deserialized = self._deserialize("DownloadURL", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -252,22 +279,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.DownloadURL].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_download.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + return LROPoller[_models.DownloadURL]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _download_by_billing_profile_initial( self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> Optional[_models.DownloadURL]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,82 +304,80 @@ def _download_by_billing_profile_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.DownloadURL]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_download_by_billing_profile_request( + _request = build_download_by_billing_profile_request( billing_account_name=billing_account_name, billing_profile_name=billing_profile_name, api_version=api_version, - template_url=self._download_by_billing_profile_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("DownloadURL", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _download_by_billing_profile_initial.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + return deserialized # type: ignore @distributed_trace def begin_download_by_billing_profile( self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> LROPoller[_models.DownloadURL]: + ) -> LROPoller[_models.PricesheetDownloadProperties]: """Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft - Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in - this preview version will be updated from a single csv file to a Zip file containing multiple - csv files, each with max 200k records. + Customer Agreement. + + You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure + Reserved Instance (RI) pricing is only available through the new version of the API. + + Due to Azure product growth, the Azure price sheet download experience in this preview version + will be updated from a single csv/json file to a Zip file containing multiple csv/json files, + each with max size of 75MB. :param billing_account_name: The ID that uniquely identifies a billing account. Required. :type billing_account_name: str :param billing_profile_name: The ID that uniquely identifies a billing profile. Required. :type billing_profile_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - :return: An instance of LROPoller that returns either DownloadURL or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.DownloadURL] + :return: An instance of LROPoller that returns either PricesheetDownloadProperties or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.PricesheetDownloadProperties] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DownloadURL] = kwargs.pop("cls", None) + cls: ClsType[_models.PricesheetDownloadProperties] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -368,12 +391,13 @@ def begin_download_by_billing_profile( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DownloadURL", pipeline_response) + deserialized = self._deserialize("PricesheetDownloadProperties", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -385,14 +409,155 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.PricesheetDownloadProperties].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return LROPoller[_models.PricesheetDownloadProperties]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - begin_download_by_billing_profile.metadata = { - "url": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download" - } + def _download_by_billing_account_initial( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_download_by_billing_account_request( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseAutoGenerated2, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_download_by_billing_account( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> LROPoller[_models.OperationStatusAutoGenerated]: + """Generates the pricesheet for the provided billing period asynchronously based on the Enrollment + ID. This is for Enterprise Agreement customers. + + **Migrate to version 2025-03-01** + + You can use the 2025-03-01 API version with the new URI: + + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download' + + With a new schema detailed below, the new version of the price sheet provides additional + information and includes prices for Azure Reserved Instances (RI) for the current billing + period. We recommend downloading an Azure Price Sheet for when entering a new billing period if + you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing. + + The EA Azure price sheet is available for billing periods in the past 13 months. To request a + price sheet for a billing period older than 13 months, please contact support. + + The Azure price sheet download experience has been updated from a single .csv file to a zip + file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has + been upgraded to use http POST method; details can be found below. + + All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account + (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to + be retired on 01 June 2026 and will no longer be supported after this date. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_period_name: Billing Period Name. Required. + :type billing_period_name: str + :return: An instance of LROPoller that returns either OperationStatusAutoGenerated or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatusAutoGenerated] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.OperationStatusAutoGenerated] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._download_by_billing_account_initial( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("OperationStatusAutoGenerated", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatusAutoGenerated].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatusAutoGenerated]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py index 6438c2d581b9..c6a84d9dda29 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -18,18 +20,18 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -39,7 +41,7 @@ def build_usage_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -49,7 +51,7 @@ def build_usage_request(scope: str, **kwargs: Any) -> HttpRequest: "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -62,7 +64,7 @@ def build_usage_request(scope: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_usage_by_external_cloud_provider_type_request( +def build_usage_by_external_cloud_provider_type_request( # pylint: disable=name-too-long external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, **kwargs: Any @@ -70,7 +72,7 @@ def build_usage_by_external_cloud_provider_type_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -78,7 +80,7 @@ def build_usage_by_external_cloud_provider_type_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "externalCloudProviderType": _SERIALIZER.url( "external_cloud_provider_type", external_cloud_provider_type, "str" @@ -86,7 +88,7 @@ def build_usage_by_external_cloud_provider_type_request( "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -111,12 +113,12 @@ class QueryOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def usage( @@ -149,7 +151,6 @@ def usage( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -157,7 +158,7 @@ def usage( @overload def usage( - self, scope: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> Optional[_models.QueryResult]: """Query the usage data for scope defined. @@ -182,11 +183,10 @@ def usage( specific for partners. Required. :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None :raises ~azure.core.exceptions.HttpResponseError: @@ -194,7 +194,7 @@ def usage( @distributed_trace def usage( - self, scope: str, parameters: Union[_models.QueryDefinition, IO], **kwargs: Any + self, scope: str, parameters: Union[_models.QueryDefinition, IO[bytes]], **kwargs: Any ) -> Optional[_models.QueryResult]: """Query the usage data for scope defined. @@ -219,17 +219,13 @@ def usage( specific for partners. Required. :type scope: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + a QueryDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] :return: QueryResult or None or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -252,41 +248,40 @@ def usage( else: _json = self._serialize.body(parameters, "QueryDefinition") - request = build_usage_request( + _request = build_usage_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.usage.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize("QueryResult", pipeline_response) + deserialized = self._deserialize("QueryResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - usage.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/query"} + return deserialized # type: ignore @overload def usage_by_external_cloud_provider_type( @@ -318,7 +313,6 @@ def usage_by_external_cloud_provider_type( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult :raises ~azure.core.exceptions.HttpResponseError: @@ -329,7 +323,7 @@ def usage_by_external_cloud_provider_type( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: IO, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -350,11 +344,10 @@ def usage_by_external_cloud_provider_type( Required. :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult :raises ~azure.core.exceptions.HttpResponseError: @@ -365,7 +358,7 @@ def usage_by_external_cloud_provider_type( self, external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], external_cloud_provider_id: str, - parameters: Union[_models.QueryDefinition, IO], + parameters: Union[_models.QueryDefinition, IO[bytes]], **kwargs: Any ) -> _models.QueryResult: """Query the usage data for external cloud provider type defined. @@ -384,17 +377,13 @@ def usage_by_external_cloud_provider_type( Required. :type external_cloud_provider_id: str :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + a QueryDefinition type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] :return: QueryResult or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.QueryResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,39 +406,36 @@ def usage_by_external_cloud_provider_type( else: _json = self._serialize.body(parameters, "QueryDefinition") - request = build_usage_by_external_cloud_provider_type_request( + _request = build_usage_by_external_cloud_provider_type_request( external_cloud_provider_type=external_cloud_provider_type, external_cloud_provider_id=external_cloud_provider_id, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.usage_by_external_cloud_provider_type.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("QueryResult", pipeline_response) + deserialized = self._deserialize("QueryResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - usage_by_external_cloud_provider_type.metadata = { - "url": "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py index c50ba6872037..18978c5985da 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -20,18 +22,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -41,7 +43,7 @@ def build_list_request(*, filter: Optional[str] = None, **kwargs: Any) -> HttpRe _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -62,7 +64,7 @@ def build_list_by_scope_request(scope: str, *, filter: Optional[str] = None, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +73,7 @@ def build_list_by_scope_request(scope: str, *, filter: Optional[str] = None, **k "scope": _SERIALIZER.url("scope", scope, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +90,7 @@ def build_create_or_update_request(name: str, *, if_match: Optional[str] = None, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -98,7 +100,7 @@ def build_create_or_update_request(name: str, *, if_match: Optional[str] = None, "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -117,7 +119,7 @@ def build_get_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -126,7 +128,7 @@ def build_get_request(name: str, **kwargs: Any) -> HttpRequest: "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -141,7 +143,7 @@ def build_delete_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -150,7 +152,7 @@ def build_delete_request(name: str, **kwargs: Any) -> HttpRequest: "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -167,7 +169,7 @@ def build_create_or_update_by_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -178,7 +180,7 @@ def build_create_or_update_by_scope_request( "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -197,7 +199,7 @@ def build_get_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +209,7 @@ def build_get_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpRequ "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -222,7 +224,7 @@ def build_delete_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpR _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,7 +234,7 @@ def build_delete_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpR "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -247,7 +249,7 @@ def build_run_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -256,7 +258,7 @@ def build_run_request(name: str, **kwargs: Any) -> HttpRequest: "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -271,7 +273,7 @@ def build_run_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -281,7 +283,7 @@ def build_run_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpRequ "name": _SERIALIZER.url("name", name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -296,7 +298,7 @@ def build_check_name_availability_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -314,11 +316,13 @@ def build_check_name_availability_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_check_name_availability_by_scope_request(scope: str, **kwargs: Any) -> HttpRequest: +def build_check_name_availability_by_scope_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -328,7 +332,7 @@ def build_check_name_availability_by_scope_request(scope: str, **kwargs: Any) -> "scope": _SERIALIZER.url("scope", scope, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -353,15 +357,15 @@ class ScheduledActionsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models.ScheduledAction"]: + def list(self, filter: Optional[str] = None, **kwargs: Any) -> ItemPaged["_models.ScheduledAction"]: """List all private scheduled actions. .. seealso:: @@ -370,7 +374,6 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScheduledAction or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] :raises ~azure.core.exceptions.HttpResponseError: @@ -381,7 +384,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -392,15 +395,13 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( filter=filter, api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -412,13 +413,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) @@ -428,18 +428,19 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, pipeline_response + _models.ErrorResponseWithNestedDetails, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -447,12 +448,10 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - list.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions"} - @distributed_trace def list_by_scope( self, scope: str, filter: Optional[str] = None, **kwargs: Any - ) -> Iterable["_models.ScheduledAction"]: + ) -> ItemPaged["_models.ScheduledAction"]: """List all shared scheduled actions within the given scope. .. seealso:: @@ -479,7 +478,6 @@ def list_by_scope( :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. Default value is None. :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScheduledAction or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] :raises ~azure.core.exceptions.HttpResponseError: @@ -490,7 +488,7 @@ def list_by_scope( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -501,16 +499,14 @@ def list_by_scope( def prepare_request(next_link=None): if not next_link: - request = build_list_by_scope_request( + _request = build_list_by_scope_request( scope=scope, filter=filter, api_version=api_version, - template_url=self.list_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -522,13 +518,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) @@ -538,18 +533,19 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, pipeline_response + _models.ErrorResponseWithNestedDetails, + pipeline_response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -557,8 +553,6 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - list_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions"} - @overload def create_or_update( self, @@ -582,7 +576,6 @@ def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -592,7 +585,7 @@ def create_or_update( def create_or_update( self, name: str, - scheduled_action: IO, + scheduled_action: IO[bytes], if_match: Optional[str] = None, *, content_type: str = "application/json", @@ -603,7 +596,7 @@ def create_or_update( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO + :type scheduled_action: IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. @@ -611,7 +604,6 @@ def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -621,7 +613,7 @@ def create_or_update( def create_or_update( self, name: str, - scheduled_action: Union[_models.ScheduledAction, IO], + scheduled_action: Union[_models.ScheduledAction, IO[bytes]], if_match: Optional[str] = None, **kwargs: Any ) -> _models.ScheduledAction: @@ -630,21 +622,17 @@ def create_or_update( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO + type or a IO[bytes] type. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. :type if_match: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -667,45 +655,40 @@ def create_or_update( else: _json = self._serialize.body(scheduled_action, "ScheduledAction") - request = build_create_or_update_request( + _request = build_create_or_update_request( name=name, if_match=if_match, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("ScheduledAction", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}"} - @distributed_trace def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: """Get the private scheduled action by name. @@ -715,12 +698,11 @@ def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -734,36 +716,35 @@ def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( name=name, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return deserialized # type: ignore @distributed_trace def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements @@ -774,12 +755,11 @@ def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsist :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,32 +773,31 @@ def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsist api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( name=name, api_version=api_version, - template_url=self.delete.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return cls(pipeline_response, None, {}) # type: ignore @overload def create_or_update_by_scope( @@ -862,7 +841,6 @@ def create_or_update_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -873,7 +851,7 @@ def create_or_update_by_scope( self, scope: str, name: str, - scheduled_action: IO, + scheduled_action: IO[bytes], if_match: Optional[str] = None, *, content_type: str = "application/json", @@ -902,7 +880,7 @@ def create_or_update_by_scope( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO + :type scheduled_action: IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. @@ -910,7 +888,6 @@ def create_or_update_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: @@ -921,7 +898,7 @@ def create_or_update_by_scope( self, scope: str, name: str, - scheduled_action: Union[_models.ScheduledAction, IO], + scheduled_action: Union[_models.ScheduledAction, IO[bytes]], if_match: Optional[str] = None, **kwargs: Any ) -> _models.ScheduledAction: @@ -948,21 +925,17 @@ def create_or_update_by_scope( :param name: Scheduled action name. Required. :type name: str :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO + type or a IO[bytes] type. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] :param if_match: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency. Default value is None. :type if_match: str - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,7 +958,7 @@ def create_or_update_by_scope( else: _json = self._serialize.body(scheduled_action, "ScheduledAction") - request = build_create_or_update_by_scope_request( + _request = build_create_or_update_by_scope_request( scope=scope, name=name, if_match=if_match, @@ -993,38 +966,33 @@ def create_or_update_by_scope( content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("ScheduledAction", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}"} - @distributed_trace def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.ScheduledAction: """Get the shared scheduled action from the given scope by name. @@ -1052,12 +1020,11 @@ def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.Schedule :type scope: str :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledAction or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1071,37 +1038,36 @@ def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.Schedule api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - request = build_get_by_scope_request( + _request = build_get_by_scope_request( scope=scope, name=name, api_version=api_version, - template_url=self.get_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ScheduledAction", pipeline_response) + deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return deserialized # type: ignore @distributed_trace def delete_by_scope( # pylint: disable=inconsistent-return-statements @@ -1132,12 +1098,11 @@ def delete_by_scope( # pylint: disable=inconsistent-return-statements :type scope: str :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1151,33 +1116,32 @@ def delete_by_scope( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_by_scope_request( + _request = build_delete_by_scope_request( scope=scope, name=name, api_version=api_version, - template_url=self.delete_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def run(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements @@ -1185,12 +1149,11 @@ def run(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1204,32 +1167,31 @@ def run(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_run_request( + _request = build_run_request( name=name, api_version=api_version, - template_url=self.run.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - run.metadata = {"url": "/providers/Microsoft.CostManagement/scheduledActions/{name}/execute"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def run_by_scope( # pylint: disable=inconsistent-return-statements @@ -1257,12 +1219,11 @@ def run_by_scope( # pylint: disable=inconsistent-return-statements :type scope: str :param name: Scheduled action name. Required. :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1276,33 +1237,32 @@ def run_by_scope( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_run_by_scope_request( + _request = build_run_by_scope_request( scope=scope, name=name, api_version=api_version, - template_url=self.run_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - run_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute"} + return cls(pipeline_response, None, {}) # type: ignore @overload def check_name_availability( @@ -1320,7 +1280,6 @@ def check_name_availability( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1328,16 +1287,15 @@ def check_name_availability( @overload def check_name_availability( - self, check_name_availability_request: IO, *, content_type: str = "application/json", **kwargs: Any + self, check_name_availability_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action. :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO + :type check_name_availability_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1345,23 +1303,19 @@ def check_name_availability( @distributed_trace def check_name_availability( - self, check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO], **kwargs: Any + self, check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action. :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO type. Required. + CheckNameAvailabilityRequest type or a IO[bytes] type. Required. :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1384,38 +1338,37 @@ def check_name_availability( else: _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - request = build_check_name_availability_request( + _request = build_check_name_availability_request( api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.check_name_availability.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - check_name_availability.metadata = {"url": "/providers/Microsoft.CostManagement/checkNameAvailability"} + return deserialized # type: ignore @overload def check_name_availability_by_scope( @@ -1452,7 +1405,6 @@ def check_name_availability_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1460,7 +1412,12 @@ def check_name_availability_by_scope( @overload def check_name_availability_by_scope( - self, scope: str, check_name_availability_request: IO, *, content_type: str = "application/json", **kwargs: Any + self, + scope: str, + check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action within the given scope. @@ -1483,11 +1440,10 @@ def check_name_availability_by_scope( Required. :type scope: str :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO + :type check_name_availability_request: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: @@ -1497,7 +1453,7 @@ def check_name_availability_by_scope( def check_name_availability_by_scope( self, scope: str, - check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO], + check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], **kwargs: Any ) -> _models.CheckNameAvailabilityResponse: """Checks availability and correctness of the name for a scheduled action within the given scope. @@ -1521,18 +1477,14 @@ def check_name_availability_by_scope( Required. :type scope: str :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO type. Required. + CheckNameAvailabilityRequest type or a IO[bytes] type. Required. :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] :return: CheckNameAvailabilityResponse or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1555,38 +1507,35 @@ def check_name_availability_by_scope( else: _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - request = build_check_name_availability_by_scope_request( + _request = build_check_name_availability_by_scope_request( scope=scope, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.check_name_availability_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWithNestedDetails, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - check_name_availability_by_scope.metadata = { - "url": "/{scope}/providers/Microsoft.CostManagement/checkNameAvailability" - } + return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py new file mode 100644 index 000000000000..406e7cbda747 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py @@ -0,0 +1,489 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request(scope: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_by_scope_request( + scope: str, type: Union[str, _models.SettingType], **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings/{type}") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "type": _SERIALIZER.url("type", type, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_by_scope_request(scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings/{type}") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "type": _SERIALIZER.url("type", type, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_by_scope_request(scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings/{type}") + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "type": _SERIALIZER.url("type", type, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +class SettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`settings` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, scope: str, **kwargs: Any) -> _models.SettingsListResult: + """List all cost management settings in the requested scope. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :return: SettingsListResult or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.SettingsListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.SettingsListResult] = kwargs.pop("cls", None) + + _request = build_list_request( + scope=scope, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("SettingsListResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: _models.Setting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: Union[_models.Setting, IO[bytes]], + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Is either a Setting type or a IO[bytes] type. + Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting or IO[bytes] + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(setting, (IOBase, bytes)): + _content = setting + else: + _json = self._serialize.body(setting, "Setting") + + _request = build_create_or_update_by_scope_request( + scope=scope, + type=type, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Setting", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> _models.Setting: + """Get the setting from the given scope by name. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: Setting or the result of cls(response) + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + _request = build_get_by_scope_request( + scope=scope, + type=type, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Setting", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_by_scope( # pylint: disable=inconsistent-return-statements + self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any + ) -> None: + """Delete a setting within the given scope. + + .. seealso:: + - https://docs.microsoft.com/rest/api/cost-management/ + + :param scope: The scope associated with this setting. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_delete_by_scope_request( + scope=scope, + type=type, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py index 421a20005715..11a7faa058d0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -20,18 +22,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import CostManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -41,7 +43,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -60,7 +62,7 @@ def build_list_by_scope_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,7 +71,7 @@ def build_list_by_scope_request(scope: str, **kwargs: Any) -> HttpRequest: "scope": _SERIALIZER.url("scope", scope, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -84,7 +86,7 @@ def build_get_request(view_name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +95,7 @@ def build_get_request(view_name: str, **kwargs: Any) -> HttpRequest: "viewName": _SERIALIZER.url("view_name", view_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -108,7 +110,7 @@ def build_create_or_update_request(view_name: str, **kwargs: Any) -> HttpRequest _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -118,7 +120,7 @@ def build_create_or_update_request(view_name: str, **kwargs: Any) -> HttpRequest "viewName": _SERIALIZER.url("view_name", view_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -135,7 +137,7 @@ def build_delete_request(view_name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -144,7 +146,7 @@ def build_delete_request(view_name: str, **kwargs: Any) -> HttpRequest: "viewName": _SERIALIZER.url("view_name", view_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -159,7 +161,7 @@ def build_get_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -169,7 +171,7 @@ def build_get_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> Htt "viewName": _SERIALIZER.url("view_name", view_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -184,7 +186,7 @@ def build_create_or_update_by_scope_request(scope: str, view_name: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -195,7 +197,7 @@ def build_create_or_update_by_scope_request(scope: str, view_name: str, **kwargs "viewName": _SERIALIZER.url("view_name", view_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -212,7 +214,7 @@ def build_delete_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -222,7 +224,7 @@ def build_delete_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> "viewName": _SERIALIZER.url("view_name", view_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,21 +247,20 @@ class ViewsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.View"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.View"]: """Lists all views by tenant and object. .. seealso:: - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either View or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.View] :raises ~azure.core.exceptions.HttpResponseError: @@ -270,7 +271,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.View"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -281,14 +282,12 @@ def list(self, **kwargs: Any) -> Iterable["_models.View"]: def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -300,13 +299,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("ViewListResult", pipeline_response) @@ -316,27 +314,28 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list.metadata = {"url": "/providers/Microsoft.CostManagement/views"} - @distributed_trace - def list_by_scope(self, scope: str, **kwargs: Any) -> Iterable["_models.View"]: + def list_by_scope(self, scope: str, **kwargs: Any) -> ItemPaged["_models.View"]: """Lists all views at the given scope. .. seealso:: @@ -360,7 +359,6 @@ def list_by_scope(self, scope: str, **kwargs: Any) -> Iterable["_models.View"]: 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. Required. :type scope: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either View or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.View] :raises ~azure.core.exceptions.HttpResponseError: @@ -371,7 +369,7 @@ def list_by_scope(self, scope: str, **kwargs: Any) -> Iterable["_models.View"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -382,15 +380,13 @@ def list_by_scope(self, scope: str, **kwargs: Any) -> Iterable["_models.View"]: def prepare_request(next_link=None): if not next_link: - request = build_list_by_scope_request( + _request = build_list_by_scope_request( scope=scope, api_version=api_version, - template_url=self.list_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -402,13 +398,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("ViewListResult", pipeline_response) @@ -418,25 +413,26 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views"} - @distributed_trace def get(self, view_name: str, **kwargs: Any) -> _models.View: """Gets the view by view name. @@ -446,12 +442,11 @@ def get(self, view_name: str, **kwargs: Any) -> _models.View: :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,36 +460,35 @@ def get(self, view_name: str, **kwargs: Any) -> _models.View: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.View] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( view_name=view_name, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = {"url": "/providers/Microsoft.CostManagement/views/{viewName}"} + return deserialized # type: ignore @overload def create_or_update( @@ -514,7 +508,6 @@ def create_or_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: @@ -522,7 +515,7 @@ def create_or_update( @overload def create_or_update( - self, view_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, view_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -534,18 +527,19 @@ def create_or_update( :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def create_or_update(self, view_name: str, parameters: Union[_models.View, IO], **kwargs: Any) -> _models.View: + def create_or_update( + self, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any + ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. @@ -556,17 +550,13 @@ def create_or_update(self, view_name: str, parameters: Union[_models.View, IO], :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -589,44 +579,39 @@ def create_or_update(self, view_name: str, parameters: Union[_models.View, IO], else: _json = self._serialize.body(parameters, "View") - request = build_create_or_update_request( + _request = build_create_or_update_request( view_name=view_name, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("View", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update.metadata = {"url": "/providers/Microsoft.CostManagement/views/{viewName}"} - @distributed_trace def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements """The operation to delete a view. @@ -636,12 +621,11 @@ def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disable=inco :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,32 +639,31 @@ def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disable=inco api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( view_name=view_name, api_version=api_version, - template_url=self.delete.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {"url": "/providers/Microsoft.CostManagement/views/{viewName}"} + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.View: @@ -709,12 +692,11 @@ def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.Vie :type scope: str :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -728,37 +710,36 @@ def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.Vie api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.View] = kwargs.pop("cls", None) - request = build_get_by_scope_request( + _request = build_get_by_scope_request( scope=scope, view_name=view_name, api_version=api_version, - template_url=self.get_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views/{viewName}"} + return deserialized # type: ignore @overload def create_or_update_by_scope( @@ -802,7 +783,6 @@ def create_or_update_by_scope( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: @@ -810,7 +790,13 @@ def create_or_update_by_scope( @overload def create_or_update_by_scope( - self, scope: str, view_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any + self, + scope: str, + view_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -840,11 +826,10 @@ def create_or_update_by_scope( :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: @@ -852,7 +837,7 @@ def create_or_update_by_scope( @distributed_trace def create_or_update_by_scope( - self, scope: str, view_name: str, parameters: Union[_models.View, IO], **kwargs: Any + self, scope: str, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any ) -> _models.View: """The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation @@ -882,17 +867,13 @@ def create_or_update_by_scope( :param view_name: View name. Required. :type view_name: str :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response + type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] :return: View or the result of cls(response) :rtype: ~azure.mgmt.costmanagement.models.View :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -915,45 +896,40 @@ def create_or_update_by_scope( else: _json = self._serialize.body(parameters, "View") - request = build_create_or_update_by_scope_request( + _request = build_create_or_update_by_scope_request( scope=scope, view_name=view_name, api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self.create_or_update_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("View", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("View", pipeline_response) + deserialized = self._deserialize("View", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - create_or_update_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views/{viewName}"} - @distributed_trace def delete_by_scope( # pylint: disable=inconsistent-return-statements self, scope: str, view_name: str, **kwargs: Any @@ -983,12 +959,11 @@ def delete_by_scope( # pylint: disable=inconsistent-return-statements :type scope: str :param view_name: View name. Required. :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1002,30 +977,29 @@ def delete_by_scope( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) - request = build_delete_by_scope_request( + _request = build_delete_by_scope_request( scope=scope, view_name=view_name, api_version=api_version, - template_url=self.delete_by_scope.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, None, {}) - - delete_by_scope.metadata = {"url": "/{scope}/providers/Microsoft.CostManagement/views/{viewName}"} + return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/code_report_swagger.json b/sdk/costmanagement/azure-mgmt-costmanagement/code_report_swagger.json new file mode 100644 index 000000000000..a0422b556561 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/code_report_swagger.json @@ -0,0 +1,31513 @@ +{ + "azure.mgmt.costmanagement": { + "class_nodes": { + "CostManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "cost_allocation_rules": { + "attr_type": "CostAllocationRulesOperations" + }, + "benefit_recommendations": { + "attr_type": "BenefitRecommendationsOperations" + }, + "benefit_utilization_summaries": { + "attr_type": "BenefitUtilizationSummariesOperations" + }, + "generate_benefit_utilization_summaries_report": { + "attr_type": "GenerateBenefitUtilizationSummariesReportOperations" + }, + "budgets": { + "attr_type": "BudgetsOperations" + }, + "exports": { + "attr_type": "ExportsOperations" + }, + "generate_cost_details_report": { + "attr_type": "GenerateCostDetailsReportOperations" + }, + "generate_detailed_cost_report": { + "attr_type": "GenerateDetailedCostReportOperations" + }, + "generate_detailed_cost_report_operation_results": { + "attr_type": "GenerateDetailedCostReportOperationResultsOperations" + }, + "generate_detailed_cost_report_operation_status": { + "attr_type": "GenerateDetailedCostReportOperationStatusOperations" + }, + "views": { + "attr_type": "ViewsOperations" + }, + "alerts": { + "attr_type": "AlertsOperations" + }, + "forecast": { + "attr_type": "ForecastOperations" + }, + "dimensions": { + "attr_type": "DimensionsOperations" + }, + "query": { + "attr_type": "QueryOperations" + }, + "generate_reservation_details_report": { + "attr_type": "GenerateReservationDetailsReportOperations" + }, + "price_sheet": { + "attr_type": "PriceSheetOperations" + }, + "scheduled_actions": { + "attr_type": "ScheduledActionsOperations" + }, + "settings": { + "attr_type": "SettingsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.aio": { + "class_nodes": { + "CostManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "cost_allocation_rules": { + "attr_type": "CostAllocationRulesOperations" + }, + "benefit_recommendations": { + "attr_type": "BenefitRecommendationsOperations" + }, + "benefit_utilization_summaries": { + "attr_type": "BenefitUtilizationSummariesOperations" + }, + "generate_benefit_utilization_summaries_report": { + "attr_type": "GenerateBenefitUtilizationSummariesReportOperations" + }, + "budgets": { + "attr_type": "BudgetsOperations" + }, + "exports": { + "attr_type": "ExportsOperations" + }, + "generate_cost_details_report": { + "attr_type": "GenerateCostDetailsReportOperations" + }, + "generate_detailed_cost_report": { + "attr_type": "GenerateDetailedCostReportOperations" + }, + "generate_detailed_cost_report_operation_results": { + "attr_type": "GenerateDetailedCostReportOperationResultsOperations" + }, + "generate_detailed_cost_report_operation_status": { + "attr_type": "GenerateDetailedCostReportOperationStatusOperations" + }, + "views": { + "attr_type": "ViewsOperations" + }, + "alerts": { + "attr_type": "AlertsOperations" + }, + "forecast": { + "attr_type": "ForecastOperations" + }, + "dimensions": { + "attr_type": "DimensionsOperations" + }, + "query": { + "attr_type": "QueryOperations" + }, + "generate_reservation_details_report": { + "attr_type": "GenerateReservationDetailsReportOperations" + }, + "price_sheet": { + "attr_type": "PriceSheetOperations" + }, + "scheduled_actions": { + "attr_type": "ScheduledActionsOperations" + }, + "settings": { + "attr_type": "SettingsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.aio.operations": { + "class_nodes": { + "AlertsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "dismiss": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Alert", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DismissAlertPayload", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Alert" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Alert" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Alert", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AlertsResult", + "overloads": [] + }, + "list_external": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AlertsResult", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitRecommendationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitRecommendationModel]", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitUtilizationSummariesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_order": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + } + }, + "properties": {} + }, + "BudgetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Budget", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Budget", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Budget" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Budget" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Budget", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Budget]", + "overloads": [] + } + }, + "properties": {} + }, + "CostAllocationRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "CostAllocationRuleCheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "CostAllocationRuleDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CostAllocationRuleDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "DimensionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skiptoken": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Dimension]", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skiptoken": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Dimension]", + "overloads": [] + } + }, + "properties": {} + }, + "ExportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Export", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Export", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Export" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Export" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "execute": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ExportRunRequest]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "None" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Export", + "overloads": [] + }, + "get_execution_history": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ExportExecutionListResult", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ExportListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ForecastOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "external_cloud_provider_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ForecastResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ForecastResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ForecastResult" + } + ] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Optional[ForecastResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[ForecastResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[ForecastResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateBenefitUtilizationSummariesReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_generate_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + } + }, + "properties": {} + }, + "GenerateCostDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateCostDetailsReportRequestDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]" + } + ] + }, + "begin_get_operation_results": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "GenerateDetailedCostReportOperationStatuses", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateDetailedCostReportDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateReservationDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "end_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatus]", + "overloads": [] + }, + "begin_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "end_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatus]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CostManagementOperation]", + "overloads": [] + } + }, + "properties": {} + }, + "PriceSheetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_download_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_period_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusAutoGenerated]", + "overloads": [] + }, + "begin_download_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PricesheetDownloadProperties]", + "overloads": [] + }, + "begin_download_by_invoice": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "invoice_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DownloadURL]", + "overloads": [] + } + }, + "properties": {} + }, + "QueryOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Optional[QueryResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[QueryResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[QueryResult]" + } + ] + }, + "usage_by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "QueryResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "QueryResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "QueryResult" + } + ] + } + }, + "properties": {} + }, + "ScheduledActionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "check_name_availability_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "run": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "run_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "SettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Setting", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "Setting", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Setting" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Setting" + } + ] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Setting", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SettingsListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ViewsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.View]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.View]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.models": { + "class_nodes": { + "AccumulatedType": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "INTERNAL": "INTERNAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Alert": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "default": "none", + "param_type": "keyword_only" + }, + "definition": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "source": { + "default": "none", + "param_type": "keyword_only" + }, + "details": { + "default": "none", + "param_type": "keyword_only" + }, + "cost_entity_id": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "creation_time": { + "default": "none", + "param_type": "keyword_only" + }, + "close_time": { + "default": "none", + "param_type": "keyword_only" + }, + "modification_time": { + "default": "none", + "param_type": "keyword_only" + }, + "status_modification_user_name": { + "default": "none", + "param_type": "keyword_only" + }, + "status_modification_time": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "definition": { + "attr_type": "definition" + }, + "description": { + "attr_type": "description" + }, + "source": { + "attr_type": "source" + }, + "details": { + "attr_type": "details" + }, + "cost_entity_id": { + "attr_type": "cost_entity_id" + }, + "status": { + "attr_type": "status" + }, + "creation_time": { + "attr_type": "creation_time" + }, + "close_time": { + "attr_type": "close_time" + }, + "modification_time": { + "attr_type": "modification_time" + }, + "status_modification_user_name": { + "attr_type": "status_modification_user_name" + }, + "status_modification_time": { + "attr_type": "status_modification_time" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "e_tag": { + "attr_type": "e_tag" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AlertCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "BILLING": "BILLING", + "COST": "COST", + "SYSTEM": "SYSTEM", + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertCriteria": { + "type": "Enum", + "methods": {}, + "properties": { + "COST_THRESHOLD_EXCEEDED": "COST_THRESHOLD_EXCEEDED", + "CREDIT_THRESHOLD_APPROACHING": "CREDIT_THRESHOLD_APPROACHING", + "CREDIT_THRESHOLD_REACHED": "CREDIT_THRESHOLD_REACHED", + "CROSS_CLOUD_COLLECTION_ERROR": "CROSS_CLOUD_COLLECTION_ERROR", + "CROSS_CLOUD_NEW_DATA_AVAILABLE": "CROSS_CLOUD_NEW_DATA_AVAILABLE", + "FORECAST_COST_THRESHOLD_EXCEEDED": "FORECAST_COST_THRESHOLD_EXCEEDED", + "FORECAST_USAGE_THRESHOLD_EXCEEDED": "FORECAST_USAGE_THRESHOLD_EXCEEDED", + "GENERAL_THRESHOLD_ERROR": "GENERAL_THRESHOLD_ERROR", + "INVOICE_DUE_DATE_APPROACHING": "INVOICE_DUE_DATE_APPROACHING", + "INVOICE_DUE_DATE_REACHED": "INVOICE_DUE_DATE_REACHED", + "MULTI_CURRENCY": "MULTI_CURRENCY", + "QUOTA_THRESHOLD_APPROACHING": "QUOTA_THRESHOLD_APPROACHING", + "QUOTA_THRESHOLD_REACHED": "QUOTA_THRESHOLD_REACHED", + "USAGE_THRESHOLD_EXCEEDED": "USAGE_THRESHOLD_EXCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL_TO": "EQUAL_TO", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL_TO": "GREATER_THAN_OR_EQUAL_TO", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL_TO": "LESS_THAN_OR_EQUAL_TO", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertPropertiesDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "category": { + "default": "none", + "param_type": "keyword_only" + }, + "criteria": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "category": { + "attr_type": "category" + }, + "criteria": { + "attr_type": "criteria" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AlertPropertiesDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "time_grain_type": { + "default": "none", + "param_type": "keyword_only" + }, + "period_start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "triggered_by": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_group_filter": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_filter": { + "default": "none", + "param_type": "keyword_only" + }, + "meter_filter": { + "default": "none", + "param_type": "keyword_only" + }, + "tag_filter": { + "default": "none", + "param_type": "keyword_only" + }, + "threshold": { + "default": "none", + "param_type": "keyword_only" + }, + "operator": { + "default": "none", + "param_type": "keyword_only" + }, + "amount": { + "default": "none", + "param_type": "keyword_only" + }, + "unit": { + "default": "none", + "param_type": "keyword_only" + }, + "current_spend": { + "default": "none", + "param_type": "keyword_only" + }, + "contact_emails": { + "default": "none", + "param_type": "keyword_only" + }, + "contact_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "contact_roles": { + "default": "none", + "param_type": "keyword_only" + }, + "overriding_alert": { + "default": "none", + "param_type": "keyword_only" + }, + "department_name": { + "default": "none", + "param_type": "keyword_only" + }, + "company_name": { + "default": "none", + "param_type": "keyword_only" + }, + "enrollment_number": { + "default": "none", + "param_type": "keyword_only" + }, + "enrollment_start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "enrollment_end_date": { + "default": "none", + "param_type": "keyword_only" + }, + "invoicing_threshold": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "time_grain_type": { + "attr_type": "time_grain_type" + }, + "period_start_date": { + "attr_type": "period_start_date" + }, + "triggered_by": { + "attr_type": "triggered_by" + }, + "resource_group_filter": { + "attr_type": "resource_group_filter" + }, + "resource_filter": { + "attr_type": "resource_filter" + }, + "meter_filter": { + "attr_type": "meter_filter" + }, + "tag_filter": { + "attr_type": "tag_filter" + }, + "threshold": { + "attr_type": "threshold" + }, + "operator": { + "attr_type": "operator" + }, + "amount": { + "attr_type": "amount" + }, + "unit": { + "attr_type": "unit" + }, + "current_spend": { + "attr_type": "current_spend" + }, + "contact_emails": { + "attr_type": "contact_emails" + }, + "contact_groups": { + "attr_type": "contact_groups" + }, + "contact_roles": { + "attr_type": "contact_roles" + }, + "overriding_alert": { + "attr_type": "overriding_alert" + }, + "department_name": { + "attr_type": "department_name" + }, + "company_name": { + "attr_type": "company_name" + }, + "enrollment_number": { + "attr_type": "enrollment_number" + }, + "enrollment_start_date": { + "attr_type": "enrollment_start_date" + }, + "enrollment_end_date": { + "attr_type": "enrollment_end_date" + }, + "invoicing_threshold": { + "attr_type": "invoicing_threshold" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AlertSource": { + "type": "Enum", + "methods": {}, + "properties": { + "PRESET": "PRESET", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "DISMISSED": "DISMISSED", + "NONE": "NONE", + "OVERRIDDEN": "OVERRIDDEN", + "RESOLVED": "RESOLVED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertTimeGrainType": { + "type": "Enum", + "methods": {}, + "properties": { + "ANNUALLY": "ANNUALLY", + "BILLING_ANNUAL": "BILLING_ANNUAL", + "BILLING_MONTH": "BILLING_MONTH", + "BILLING_QUARTER": "BILLING_QUARTER", + "MONTHLY": "MONTHLY", + "NONE": "NONE", + "QUARTERLY": "QUARTERLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertType": { + "type": "Enum", + "methods": {}, + "properties": { + "BUDGET": "BUDGET", + "BUDGET_FORECAST": "BUDGET_FORECAST", + "CREDIT": "CREDIT", + "GENERAL": "GENERAL", + "INVOICE": "INVOICE", + "QUOTA": "QUOTA", + "X_CLOUD": "X_CLOUD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertsResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AllSavingsBenefitDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "overage_cost": { + "attr_type": null + }, + "benefit_cost": { + "attr_type": null + }, + "total_cost": { + "attr_type": null + }, + "savings_amount": { + "attr_type": null + }, + "savings_percentage": { + "attr_type": null + }, + "coverage_percentage": { + "attr_type": null + }, + "commitment_amount": { + "attr_type": null + }, + "average_utilization_percentage": { + "attr_type": null + }, + "wastage_cost": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AllSavingsList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AsyncOperationStatusProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "report_url": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_report_url": { + "default": "none", + "param_type": "keyword_only" + }, + "valid_until": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "report_url": { + "attr_type": "report_url" + }, + "secondary_report_url": { + "attr_type": "secondary_report_url" + }, + "valid_until": { + "attr_type": "valid_until" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitKind": { + "type": "Enum", + "methods": {}, + "properties": { + "INCLUDED_QUANTITY": "INCLUDED_QUANTITY", + "RESERVATION": "RESERVATION", + "SAVINGS_PLAN": "SAVINGS_PLAN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BenefitRecommendationModel": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "properties": { + "attr_type": "properties" + }, + "kind": { + "attr_type": "kind" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitRecommendationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "look_back_period": { + "default": "none", + "param_type": "keyword_only" + }, + "usage": { + "default": "none", + "param_type": "keyword_only" + }, + "term": { + "default": "none", + "param_type": "keyword_only" + }, + "commitment_granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "recommendation_details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "first_consumption_date": { + "attr_type": null + }, + "last_consumption_date": { + "attr_type": null + }, + "look_back_period": { + "attr_type": "look_back_period" + }, + "total_hours": { + "attr_type": null + }, + "usage": { + "attr_type": "usage" + }, + "arm_sku_name": { + "attr_type": null + }, + "term": { + "attr_type": "term" + }, + "commitment_granularity": { + "attr_type": "commitment_granularity" + }, + "currency_code": { + "attr_type": null + }, + "cost_without_benefit": { + "attr_type": null + }, + "recommendation_details": { + "attr_type": "recommendation_details" + }, + "all_recommendation_details": { + "attr_type": null + }, + "scope": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitRecommendationsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": "kind" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitUtilizationSummariesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitUtilizationSummariesOperationStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "input": { + "attr_type": "input" + }, + "status": { + "attr_type": "status" + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitUtilizationSummariesRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain": { + "default": null, + "param_type": "keyword_only" + }, + "start_date": { + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "default": null, + "param_type": "keyword_only" + }, + "billing_account_id": { + "default": "none", + "param_type": "keyword_only" + }, + "billing_profile_id": { + "default": "none", + "param_type": "keyword_only" + }, + "benefit_order_id": { + "default": "none", + "param_type": "keyword_only" + }, + "benefit_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kind": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "billing_account_id": { + "attr_type": "billing_account_id" + }, + "billing_profile_id": { + "attr_type": "billing_profile_id" + }, + "benefit_order_id": { + "attr_type": "benefit_order_id" + }, + "benefit_id": { + "attr_type": "benefit_id" + }, + "grain": { + "attr_type": "grain" + }, + "start_date": { + "attr_type": "start_date" + }, + "end_date": { + "attr_type": "end_date" + }, + "kind": { + "attr_type": "kind" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitUtilizationSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitUtilizationSummaryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "arm_sku_name": { + "attr_type": null + }, + "benefit_id": { + "attr_type": null + }, + "benefit_order_id": { + "attr_type": null + }, + "benefit_type": { + "attr_type": "benefit_type" + }, + "usage_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BenefitUtilizationSummaryReportSchema": { + "type": "Enum", + "methods": {}, + "properties": { + "AVG_UTILIZATION_PERCENTAGE": "AVG_UTILIZATION_PERCENTAGE", + "BENEFIT_ID": "BENEFIT_ID", + "BENEFIT_ORDER_ID": "BENEFIT_ORDER_ID", + "BENEFIT_TYPE": "BENEFIT_TYPE", + "KIND": "KIND", + "MAX_UTILIZATION_PERCENTAGE": "MAX_UTILIZATION_PERCENTAGE", + "MIN_UTILIZATION_PERCENTAGE": "MIN_UTILIZATION_PERCENTAGE", + "USAGE_DATE": "USAGE_DATE", + "UTILIZED_PERCENTAGE": "UTILIZED_PERCENTAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BlobInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blob_link": { + "default": "none", + "param_type": "keyword_only" + }, + "byte_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "blob_link": { + "attr_type": "blob_link" + }, + "byte_count": { + "attr_type": "byte_count" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Budget": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "default": "none", + "param_type": "keyword_only" + }, + "category": { + "default": "none", + "param_type": "keyword_only" + }, + "amount": { + "default": "none", + "param_type": "keyword_only" + }, + "time_grain": { + "default": "none", + "param_type": "keyword_only" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "notifications": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "category": { + "attr_type": "category" + }, + "amount": { + "attr_type": "amount" + }, + "time_grain": { + "attr_type": "time_grain" + }, + "time_period": { + "attr_type": "time_period" + }, + "filter": { + "attr_type": "filter" + }, + "current_spend": { + "attr_type": null + }, + "notifications": { + "attr_type": "notifications" + }, + "forecast_spend": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "e_tag": { + "attr_type": "e_tag" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BudgetComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "values": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "operator": { + "attr_type": "operator" + }, + "values": { + "attr_type": "values" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BudgetFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "default": "none", + "param_type": "keyword_only" + }, + "dimensions": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "and_property": { + "attr_type": "and_property" + }, + "dimensions": { + "attr_type": "dimensions" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BudgetFilterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "dimensions": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "dimensions": { + "attr_type": "dimensions" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BudgetNotificationOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL_TO": "EQUAL_TO", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL_TO": "GREATER_THAN_OR_EQUAL_TO", + "LESS_THAN": "LESS_THAN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BudgetOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BudgetTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "start_date": { + "attr_type": "start_date" + }, + "end_date": { + "attr_type": "end_date" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BudgetsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CategoryType": { + "type": "Enum", + "methods": {}, + "properties": { + "COST": "COST", + "RESERVATION_UTILIZATION": "RESERVATION_UTILIZATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ChartType": { + "type": "Enum", + "methods": {}, + "properties": { + "AREA": "AREA", + "GROUPED_COLUMN": "GROUPED_COLUMN", + "LINE": "LINE", + "STACKED_COLUMN": "STACKED_COLUMN", + "TABLE": "TABLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckNameAvailabilityReason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckNameAvailabilityRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CheckNameAvailabilityResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name_available": { + "default": "none", + "param_type": "keyword_only" + }, + "reason": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name_available": { + "attr_type": "name_available" + }, + "reason": { + "attr_type": "reason" + }, + "message": { + "attr_type": "message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CommonExportProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delivery_info": { + "default": null, + "param_type": "keyword_only" + }, + "definition": { + "default": null, + "param_type": "keyword_only" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "run_history": { + "default": "none", + "param_type": "keyword_only" + }, + "partition_data": { + "default": "none", + "param_type": "keyword_only" + }, + "data_overwrite_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "compression_mode": { + "default": "none", + "param_type": "keyword_only" + }, + "export_description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "format": { + "attr_type": "format" + }, + "delivery_info": { + "attr_type": "delivery_info" + }, + "definition": { + "attr_type": "definition" + }, + "run_history": { + "attr_type": "run_history" + }, + "partition_data": { + "attr_type": "partition_data" + }, + "data_overwrite_behavior": { + "attr_type": "data_overwrite_behavior" + }, + "compression_mode": { + "attr_type": "compression_mode" + }, + "export_description": { + "attr_type": "export_description" + }, + "next_run_time_estimate": { + "attr_type": null + }, + "system_suspension_context": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CompressionModeType": { + "type": "Enum", + "methods": {}, + "properties": { + "GZIP": "GZIP", + "NONE": "NONE", + "SNAPPY": "SNAPPY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostAllocationPolicyType": { + "type": "Enum", + "methods": {}, + "properties": { + "FIXED_PROPORTION": "FIXED_PROPORTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostAllocationProportion": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "percentage": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "percentage": { + "attr_type": "percentage" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostAllocationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": "resource_type" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostAllocationResourceType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIMENSION": "DIMENSION", + "TAG": "TAG", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostAllocationRuleCheckNameAvailabilityRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostAllocationRuleCheckNameAvailabilityResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name_available": { + "default": "none", + "param_type": "keyword_only" + }, + "reason": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name_available": { + "attr_type": "name_available" + }, + "reason": { + "attr_type": "reason" + }, + "message": { + "attr_type": "message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostAllocationRuleDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostAllocationRuleDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "source_resources": { + "default": "none", + "param_type": "keyword_only" + }, + "target_resources": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "source_resources": { + "attr_type": "source_resources" + }, + "target_resources": { + "attr_type": "target_resources" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostAllocationRuleList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostAllocationRuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "details": { + "default": null, + "param_type": "keyword_only" + }, + "status": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "details": { + "attr_type": "details" + }, + "status": { + "attr_type": "status" + }, + "created_date": { + "attr_type": null + }, + "updated_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostDetailsDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "CSV_COST_DETAILS_DATA_FORMAT": "CSV_COST_DETAILS_DATA_FORMAT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostDetailsMetricType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST_COST_DETAILS_METRIC_TYPE": "ACTUAL_COST_COST_DETAILS_METRIC_TYPE", + "AMORTIZED_COST_COST_DETAILS_METRIC_TYPE": "AMORTIZED_COST_COST_DETAILS_METRIC_TYPE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostDetailsOperationResults": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "valid_till": { + "default": "none", + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "manifest_version": { + "default": "none", + "param_type": "keyword_only" + }, + "data_format": { + "default": "none", + "param_type": "keyword_only" + }, + "byte_count": { + "default": "none", + "param_type": "keyword_only" + }, + "blob_count": { + "default": "none", + "param_type": "keyword_only" + }, + "compress_data": { + "default": "none", + "param_type": "keyword_only" + }, + "blobs": { + "default": "none", + "param_type": "keyword_only" + }, + "request_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "request_body": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "status": { + "attr_type": "status" + }, + "valid_till": { + "attr_type": "valid_till" + }, + "error": { + "attr_type": "error" + }, + "manifest_version": { + "attr_type": "manifest_version" + }, + "data_format": { + "attr_type": "data_format" + }, + "byte_count": { + "attr_type": "byte_count" + }, + "blob_count": { + "attr_type": "blob_count" + }, + "compress_data": { + "attr_type": "compress_data" + }, + "blobs": { + "attr_type": "blobs" + }, + "request_scope": { + "attr_type": "request_scope" + }, + "request_body": { + "attr_type": "request_body" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostDetailsStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED_COST_DETAILS_STATUS_TYPE": "COMPLETED_COST_DETAILS_STATUS_TYPE", + "FAILED_COST_DETAILS_STATUS_TYPE": "FAILED_COST_DETAILS_STATUS_TYPE", + "NO_DATA_FOUND_COST_DETAILS_STATUS_TYPE": "NO_DATA_FOUND_COST_DETAILS_STATUS_TYPE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostDetailsTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start": { + "default": null, + "param_type": "keyword_only" + }, + "end": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "start": { + "attr_type": "start" + }, + "end": { + "attr_type": "end" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostManagementOperation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "is_data_action": { + "attr_type": null + }, + "display": { + "attr_type": "display" + }, + "origin": { + "attr_type": null + }, + "action_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostManagementProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "e_tag": { + "attr_type": "e_tag" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CostManagementResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "location": { + "attr_type": null + }, + "sku": { + "attr_type": null + }, + "e_tag": { + "attr_type": null + }, + "tags": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CultureCode": { + "type": "Enum", + "methods": {}, + "properties": { + "CS_CZ": "CS_CZ", + "DA_DK": "DA_DK", + "DE_DE": "DE_DE", + "EN_GB": "EN_GB", + "EN_US": "EN_US", + "ES_ES": "ES_ES", + "FR_FR": "FR_FR", + "HU_HU": "HU_HU", + "IT_IT": "IT_IT", + "JA_JP": "JA_JP", + "KO_KR": "KO_KR", + "NB_NO": "NB_NO", + "NL_NL": "NL_NL", + "PL_PL": "PL_PL", + "PT_BR": "PT_BR", + "PT_PT": "PT_PT", + "RU_RU": "RU_RU", + "SV_SE": "SV_SE", + "TR_TR": "TR_TR", + "ZH_CN": "ZH_CN", + "ZH_TW": "ZH_TW", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CurrentSpend": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "amount": { + "attr_type": null + }, + "unit": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataOverwriteBehaviorType": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATE_NEW_REPORT": "CREATE_NEW_REPORT", + "OVERWRITE_PREVIOUS_REPORT": "OVERWRITE_PREVIOUS_REPORT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DaysOfWeek": { + "type": "Enum", + "methods": {}, + "properties": { + "FRIDAY": "FRIDAY", + "MONDAY": "MONDAY", + "SATURDAY": "SATURDAY", + "SUNDAY": "SUNDAY", + "THURSDAY": "THURSDAY", + "TUESDAY": "TUESDAY", + "WEDNESDAY": "WEDNESDAY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DestinationType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_BLOB": "AZURE_BLOB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Dimension": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": null + }, + "filter_enabled": { + "attr_type": null + }, + "grouping_enabled": { + "attr_type": null + }, + "data": { + "attr_type": "data" + }, + "total": { + "attr_type": null + }, + "category": { + "attr_type": null + }, + "usage_start": { + "attr_type": null + }, + "usage_end": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "location": { + "attr_type": null + }, + "sku": { + "attr_type": null + }, + "e_tag": { + "attr_type": null + }, + "tags": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DimensionsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DismissAlertPayload": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "definition": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "source": { + "default": "none", + "param_type": "keyword_only" + }, + "details": { + "default": "none", + "param_type": "keyword_only" + }, + "cost_entity_id": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "creation_time": { + "default": "none", + "param_type": "keyword_only" + }, + "close_time": { + "default": "none", + "param_type": "keyword_only" + }, + "modification_time": { + "default": "none", + "param_type": "keyword_only" + }, + "status_modification_user_name": { + "default": "none", + "param_type": "keyword_only" + }, + "status_modification_time": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "definition": { + "attr_type": "definition" + }, + "description": { + "attr_type": "description" + }, + "source": { + "attr_type": "source" + }, + "details": { + "attr_type": "details" + }, + "cost_entity_id": { + "attr_type": "cost_entity_id" + }, + "status": { + "attr_type": "status" + }, + "creation_time": { + "attr_type": "creation_time" + }, + "close_time": { + "attr_type": "close_time" + }, + "modification_time": { + "attr_type": "modification_time" + }, + "status_modification_user_name": { + "attr_type": "status_modification_user_name" + }, + "status_modification_time": { + "attr_type": "status_modification_time" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DownloadURL": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "valid_till": { + "default": "none", + "param_type": "keyword_only" + }, + "download_url": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "expiry_time": { + "attr_type": null + }, + "valid_till": { + "attr_type": "valid_till" + }, + "download_url": { + "attr_type": "download_url" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EAPriceSheetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "enrollment_number": { + "attr_type": null + }, + "service_family": { + "attr_type": null + }, + "product": { + "attr_type": null + }, + "product_id": { + "attr_type": null + }, + "sku_id": { + "attr_type": null + }, + "unit_of_measure": { + "attr_type": null + }, + "meter_id": { + "attr_type": null + }, + "meter_name": { + "attr_type": null + }, + "meter_type": { + "attr_type": null + }, + "offer_id": { + "attr_type": null + }, + "meter_category": { + "attr_type": null + }, + "meter_sub_category": { + "attr_type": null + }, + "meter_region": { + "attr_type": null + }, + "effective_start_date": { + "attr_type": null + }, + "effective_end_date": { + "attr_type": null + }, + "unit_price": { + "attr_type": null + }, + "base_price": { + "attr_type": null + }, + "market_price": { + "attr_type": null + }, + "included_quantity": { + "attr_type": null + }, + "currency_code": { + "attr_type": null + }, + "term": { + "attr_type": null + }, + "price_type": { + "attr_type": null + }, + "part_number": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "target": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "additional_info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetailAutoGenerated": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "target": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "additional_info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetailsWithNestedDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "details": { + "attr_type": null + }, + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponseAutoGenerated": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponseAutoGenerated2": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponseWithNestedDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExecutionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "DATA_NOT_AVAILABLE": "DATA_NOT_AVAILABLE", + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "NEW_DATA_NOT_AVAILABLE": "NEW_DATA_NOT_AVAILABLE", + "QUEUED": "QUEUED", + "TIMEOUT": "TIMEOUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExecutionType": { + "type": "Enum", + "methods": {}, + "properties": { + "ON_DEMAND": "ON_DEMAND", + "SCHEDULED": "SCHEDULED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Export": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "delivery_info": { + "default": "none", + "param_type": "keyword_only" + }, + "definition": { + "default": "none", + "param_type": "keyword_only" + }, + "run_history": { + "default": "none", + "param_type": "keyword_only" + }, + "partition_data": { + "default": "none", + "param_type": "keyword_only" + }, + "data_overwrite_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "compression_mode": { + "default": "none", + "param_type": "keyword_only" + }, + "export_description": { + "default": "none", + "param_type": "keyword_only" + }, + "schedule": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "identity": { + "attr_type": "identity" + }, + "location": { + "attr_type": "location" + }, + "format": { + "attr_type": "format" + }, + "delivery_info": { + "attr_type": "delivery_info" + }, + "definition": { + "attr_type": "definition" + }, + "run_history": { + "attr_type": "run_history" + }, + "partition_data": { + "attr_type": "partition_data" + }, + "data_overwrite_behavior": { + "attr_type": "data_overwrite_behavior" + }, + "compression_mode": { + "attr_type": "compression_mode" + }, + "export_description": { + "attr_type": "export_description" + }, + "next_run_time_estimate": { + "attr_type": null + }, + "system_suspension_context": { + "attr_type": null + }, + "schedule": { + "attr_type": "schedule" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "e_tag": { + "attr_type": "e_tag" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "granularity": { + "attr_type": "granularity" + }, + "configuration": { + "attr_type": "configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "default": "none", + "param_type": "keyword_only" + }, + "data_version": { + "default": "none", + "param_type": "keyword_only" + }, + "filters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "columns": { + "attr_type": "columns" + }, + "data_version": { + "attr_type": "data_version" + }, + "filters": { + "attr_type": "filters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "timeframe": { + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "data_set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "timeframe": { + "attr_type": "timeframe" + }, + "time_period": { + "attr_type": "time_period" + }, + "data_set": { + "attr_type": "data_set" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportDeliveryDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "root_folder_path": { + "default": "none", + "param_type": "keyword_only" + }, + "sas_token": { + "default": "none", + "param_type": "keyword_only" + }, + "storage_account": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "resource_id": { + "attr_type": "resource_id" + }, + "container": { + "attr_type": "container" + }, + "root_folder_path": { + "attr_type": "root_folder_path" + }, + "sas_token": { + "attr_type": "sas_token" + }, + "storage_account": { + "attr_type": "storage_account" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportDeliveryInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "destination": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "destination": { + "attr_type": "destination" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportExecutionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delivery_info": { + "default": null, + "param_type": "keyword_only" + }, + "definition": { + "default": null, + "param_type": "keyword_only" + }, + "format": { + "default": "none", + "param_type": "keyword_only" + }, + "run_history": { + "default": "none", + "param_type": "keyword_only" + }, + "partition_data": { + "default": "none", + "param_type": "keyword_only" + }, + "data_overwrite_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "compression_mode": { + "default": "none", + "param_type": "keyword_only" + }, + "export_description": { + "default": "none", + "param_type": "keyword_only" + }, + "schedule": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "schedule": { + "attr_type": "schedule" + }, + "format": { + "attr_type": "format" + }, + "delivery_info": { + "attr_type": "delivery_info" + }, + "definition": { + "attr_type": "definition" + }, + "run_history": { + "attr_type": "run_history" + }, + "partition_data": { + "attr_type": "partition_data" + }, + "data_overwrite_behavior": { + "attr_type": "data_overwrite_behavior" + }, + "compression_mode": { + "attr_type": "compression_mode" + }, + "export_description": { + "attr_type": "export_description" + }, + "next_run_time_estimate": { + "attr_type": null + }, + "system_suspension_context": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportRecurrencePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "default": null, + "param_type": "keyword_only" + }, + "to": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "from_property": { + "attr_type": "from_property" + }, + "to": { + "attr_type": "to" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportRun": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "default": "none", + "param_type": "keyword_only" + }, + "execution_type": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "submitted_by": { + "default": "none", + "param_type": "keyword_only" + }, + "submitted_time": { + "default": "none", + "param_type": "keyword_only" + }, + "processing_start_time": { + "default": "none", + "param_type": "keyword_only" + }, + "processing_end_time": { + "default": "none", + "param_type": "keyword_only" + }, + "start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "end_date": { + "default": "none", + "param_type": "keyword_only" + }, + "file_name": { + "default": "none", + "param_type": "keyword_only" + }, + "manifest_file": { + "default": "none", + "param_type": "keyword_only" + }, + "run_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "execution_type": { + "attr_type": "execution_type" + }, + "status": { + "attr_type": "status" + }, + "submitted_by": { + "attr_type": "submitted_by" + }, + "submitted_time": { + "attr_type": "submitted_time" + }, + "processing_start_time": { + "attr_type": "processing_start_time" + }, + "processing_end_time": { + "attr_type": "processing_end_time" + }, + "start_date": { + "attr_type": "start_date" + }, + "end_date": { + "attr_type": "end_date" + }, + "file_name": { + "attr_type": "file_name" + }, + "manifest_file": { + "attr_type": "manifest_file" + }, + "run_settings": { + "attr_type": "run_settings" + }, + "error": { + "attr_type": "error" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "e_tag": { + "attr_type": "e_tag" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportRunRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "time_period": { + "attr_type": "time_period" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportSchedule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "recurrence": { + "default": "none", + "param_type": "keyword_only" + }, + "recurrence_period": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "recurrence": { + "attr_type": "recurrence" + }, + "recurrence_period": { + "attr_type": "recurrence_period" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportSuspensionContext": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "suspension_code": { + "default": "none", + "param_type": "keyword_only" + }, + "suspension_reason": { + "default": "none", + "param_type": "keyword_only" + }, + "suspension_time": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "suspension_code": { + "attr_type": "suspension_code" + }, + "suspension_reason": { + "attr_type": "suspension_reason" + }, + "suspension_time": { + "attr_type": "suspension_time" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "default": null, + "param_type": "keyword_only" + }, + "to": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "from_property": { + "attr_type": "from_property" + }, + "to": { + "attr_type": "to" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AMORTIZED_COST": "AMORTIZED_COST", + "FOCUS_COST": "FOCUS_COST", + "PRICE_SHEET": "PRICE_SHEET", + "RESERVATION_DETAILS": "RESERVATION_DETAILS", + "RESERVATION_RECOMMENDATIONS": "RESERVATION_RECOMMENDATIONS", + "RESERVATION_TRANSACTIONS": "RESERVATION_TRANSACTIONS", + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExternalCloudProviderType": { + "type": "Enum", + "methods": {}, + "properties": { + "EXTERNAL_BILLING_ACCOUNTS": "EXTERNAL_BILLING_ACCOUNTS", + "EXTERNAL_SUBSCRIPTIONS": "EXTERNAL_SUBSCRIPTIONS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FileDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "file_formats": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "file_formats": { + "attr_type": "file_formats" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FileFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "CSV": "CSV", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FilterItemNames": { + "type": "Enum", + "methods": {}, + "properties": { + "LOOK_BACK_PERIOD": "LOOK_BACK_PERIOD", + "RESERVATION_SCOPE": "RESERVATION_SCOPE", + "RESOURCE_TYPE": "RESOURCE_TYPE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FilterItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastAggregation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "function": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "function": { + "attr_type": "function" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastColumn": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "values": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "operator": { + "attr_type": "operator" + }, + "values": { + "attr_type": "values" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "aggregation": { + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "granularity": { + "attr_type": "granularity" + }, + "configuration": { + "attr_type": "configuration" + }, + "aggregation": { + "attr_type": "aggregation" + }, + "filter": { + "attr_type": "filter" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "columns": { + "attr_type": "columns" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "timeframe": { + "default": null, + "param_type": "keyword_only" + }, + "dataset": { + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "include_actual_cost": { + "default": "none", + "param_type": "keyword_only" + }, + "include_fresh_partial_cost": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "timeframe": { + "attr_type": "timeframe" + }, + "time_period": { + "attr_type": "time_period" + }, + "dataset": { + "attr_type": "dataset" + }, + "include_actual_cost": { + "attr_type": "include_actual_cost" + }, + "include_fresh_partial_cost": { + "attr_type": "include_fresh_partial_cost" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "default": "none", + "param_type": "keyword_only" + }, + "or_property": { + "default": "none", + "param_type": "keyword_only" + }, + "dimensions": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "and_property": { + "attr_type": "and_property" + }, + "or_property": { + "attr_type": "or_property" + }, + "dimensions": { + "attr_type": "dimensions" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ForecastResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "columns": { + "default": "none", + "param_type": "keyword_only" + }, + "rows": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "next_link": { + "attr_type": "next_link" + }, + "columns": { + "attr_type": "columns" + }, + "rows": { + "attr_type": "rows" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "location": { + "attr_type": null + }, + "sku": { + "attr_type": null + }, + "e_tag": { + "attr_type": null + }, + "tags": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastSpend": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "amount": { + "attr_type": null + }, + "unit": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "default": null, + "param_type": "keyword_only" + }, + "to": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "from_property": { + "attr_type": "from_property" + }, + "to": { + "attr_type": "to" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForecastTimeframe": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM": "CUSTOM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ForecastType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AMORTIZED_COST": "AMORTIZED_COST", + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FormatType": { + "type": "Enum", + "methods": {}, + "properties": { + "CSV": "CSV", + "PARQUET": "PARQUET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Frequency": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "WEEKLY": "WEEKLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FunctionName": { + "type": "Enum", + "methods": {}, + "properties": { + "COST": "COST", + "COST_USD": "COST_USD", + "PRE_TAX_COST": "PRE_TAX_COST", + "PRE_TAX_COST_USD": "PRE_TAX_COST_USD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FunctionType": { + "type": "Enum", + "methods": {}, + "properties": { + "SUM": "SUM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GenerateCostDetailsReportErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GenerateCostDetailsReportRequestDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "default": "none", + "param_type": "keyword_only" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "billing_period": { + "default": "none", + "param_type": "keyword_only" + }, + "invoice_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "metric": { + "attr_type": "metric" + }, + "time_period": { + "attr_type": "time_period" + }, + "billing_period": { + "attr_type": "billing_period" + }, + "invoice_id": { + "attr_type": "invoice_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GenerateDetailedCostReportDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "default": "none", + "param_type": "keyword_only" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "billing_period": { + "default": "none", + "param_type": "keyword_only" + }, + "invoice_id": { + "default": "none", + "param_type": "keyword_only" + }, + "customer_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "metric": { + "attr_type": "metric" + }, + "time_period": { + "attr_type": "time_period" + }, + "billing_period": { + "attr_type": "billing_period" + }, + "invoice_id": { + "attr_type": "invoice_id" + }, + "customer_id": { + "attr_type": "customer_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GenerateDetailedCostReportErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GenerateDetailedCostReportMetricType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AMORTIZED_COST": "AMORTIZED_COST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GenerateDetailedCostReportOperationResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "valid_till": { + "default": "none", + "param_type": "keyword_only" + }, + "download_url": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "expiry_time": { + "attr_type": null + }, + "valid_till": { + "attr_type": "valid_till" + }, + "download_url": { + "attr_type": "download_url" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GenerateDetailedCostReportOperationStatuses": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "start_time": { + "default": "none", + "param_type": "keyword_only" + }, + "end_time": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "valid_till": { + "default": "none", + "param_type": "keyword_only" + }, + "download_url": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "status": { + "attr_type": "status" + }, + "start_time": { + "attr_type": "start_time" + }, + "end_time": { + "attr_type": "end_time" + }, + "type": { + "attr_type": "type" + }, + "error": { + "attr_type": "error" + }, + "expiry_time": { + "attr_type": null + }, + "valid_till": { + "attr_type": "valid_till" + }, + "download_url": { + "attr_type": "download_url" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GenerateDetailedCostReportTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start": { + "default": null, + "param_type": "keyword_only" + }, + "end": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "start": { + "attr_type": "start" + }, + "end": { + "attr_type": "end" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Grain": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "HOURLY": "HOURLY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GrainParameter": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "HOURLY": "HOURLY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GranularityType": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IncludedQuantityUtilizationSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "arm_sku_name": { + "attr_type": null + }, + "benefit_id": { + "attr_type": null + }, + "benefit_order_id": { + "attr_type": null + }, + "benefit_type": { + "attr_type": "benefit_type" + }, + "usage_date": { + "attr_type": null + }, + "utilization_percentage": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IncludedQuantityUtilizationSummaryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "utilization_percentage": { + "attr_type": null + }, + "arm_sku_name": { + "attr_type": null + }, + "benefit_id": { + "attr_type": null + }, + "benefit_order_id": { + "attr_type": null + }, + "benefit_type": { + "attr_type": "benefit_type" + }, + "usage_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KpiProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "id": { + "attr_type": "id" + }, + "enabled": { + "attr_type": "enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KpiType": { + "type": "Enum", + "methods": {}, + "properties": { + "BUDGET": "BUDGET", + "FORECAST": "FORECAST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LookBackPeriod": { + "type": "Enum", + "methods": {}, + "properties": { + "LAST30_DAYS": "LAST30_DAYS", + "LAST60_DAYS": "LAST60_DAYS", + "LAST7_DAYS": "LAST7_DAYS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MCAPriceSheetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "billing_account_id": { + "attr_type": null + }, + "billing_account_name": { + "attr_type": null + }, + "billing_profile_id": { + "attr_type": null + }, + "billing_profile_name": { + "attr_type": null + }, + "product_order_name": { + "attr_type": null + }, + "service_family": { + "attr_type": null + }, + "product": { + "attr_type": null + }, + "product_id": { + "attr_type": null + }, + "sku_id": { + "attr_type": null + }, + "unit_of_measure": { + "attr_type": null + }, + "meter_id": { + "attr_type": null + }, + "meter_name": { + "attr_type": null + }, + "meter_type": { + "attr_type": null + }, + "meter_category": { + "attr_type": null + }, + "meter_sub_category": { + "attr_type": null + }, + "meter_region": { + "attr_type": null + }, + "tier_minimum_units": { + "attr_type": null + }, + "effective_start_date": { + "attr_type": null + }, + "effective_end_date": { + "attr_type": null + }, + "unit_price": { + "attr_type": null + }, + "base_price": { + "attr_type": null + }, + "market_price": { + "attr_type": null + }, + "currency": { + "attr_type": null + }, + "billing_currency": { + "attr_type": null + }, + "term": { + "attr_type": null + }, + "price_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MetricType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AHUB": "AHUB", + "AMORTIZED_COST": "AMORTIZED_COST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Notification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "threshold": { + "default": null, + "param_type": "keyword_only" + }, + "contact_emails": { + "default": null, + "param_type": "keyword_only" + }, + "frequency": { + "default": "none", + "param_type": "keyword_only" + }, + "contact_roles": { + "default": "none", + "param_type": "keyword_only" + }, + "contact_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "threshold_type": { + "default": "str", + "param_type": "keyword_only" + }, + "locale": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "enabled": { + "attr_type": "enabled" + }, + "operator": { + "attr_type": "operator" + }, + "threshold": { + "attr_type": "threshold" + }, + "frequency": { + "attr_type": "frequency" + }, + "contact_emails": { + "attr_type": "contact_emails" + }, + "contact_roles": { + "attr_type": "contact_roles" + }, + "contact_groups": { + "attr_type": "contact_groups" + }, + "threshold_type": { + "attr_type": "threshold_type" + }, + "locale": { + "attr_type": "locale" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NotificationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "to": { + "default": null, + "param_type": "keyword_only" + }, + "subject": { + "default": null, + "param_type": "keyword_only" + }, + "language": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "regional_format": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "to": { + "attr_type": "to" + }, + "language": { + "attr_type": "language" + }, + "message": { + "attr_type": "message" + }, + "regional_format": { + "attr_type": "regional_format" + }, + "subject": { + "attr_type": "subject" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "is_data_action": { + "attr_type": null + }, + "display": { + "attr_type": "display" + }, + "origin": { + "attr_type": null + }, + "action_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provider": { + "attr_type": null + }, + "resource": { + "attr_type": null + }, + "operation": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "report_url": { + "default": "none", + "param_type": "keyword_only" + }, + "valid_until": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "report_url": { + "attr_type": "report_url" + }, + "valid_until": { + "attr_type": "valid_until" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationStatusAutoGenerated": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "download_file_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "download_url": { + "attr_type": null + }, + "valid_till": { + "attr_type": null + }, + "download_file_properties": { + "attr_type": "download_file_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETE": "COMPLETE", + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "RUNNING": "RUNNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTAINS": "CONTAINS", + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Origin": { + "type": "Enum", + "methods": {}, + "properties": { + "SYSTEM": "SYSTEM", + "USER": "USER", + "USER_SYSTEM": "USER_SYSTEM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PivotProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PivotType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIMENSION": "DIMENSION", + "TAG_KEY": "TAG_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PricesheetDownloadProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "download_url": { + "default": "none", + "param_type": "keyword_only" + }, + "download_file_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "expiry_time": { + "attr_type": null + }, + "download_url": { + "attr_type": "download_url" + }, + "download_file_properties": { + "attr_type": "download_file_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryAggregation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "function": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "function": { + "attr_type": "function" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryColumn": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryColumnType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIMENSION": "DIMENSION", + "TAG_KEY": "TAG_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "values": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "operator": { + "attr_type": "operator" + }, + "values": { + "attr_type": "values" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "aggregation": { + "default": "none", + "param_type": "keyword_only" + }, + "grouping": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "granularity": { + "attr_type": "granularity" + }, + "configuration": { + "attr_type": "configuration" + }, + "aggregation": { + "attr_type": "aggregation" + }, + "grouping": { + "attr_type": "grouping" + }, + "filter": { + "attr_type": "filter" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "columns": { + "attr_type": "columns" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "timeframe": { + "default": null, + "param_type": "keyword_only" + }, + "dataset": { + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "timeframe": { + "attr_type": "timeframe" + }, + "time_period": { + "attr_type": "time_period" + }, + "dataset": { + "attr_type": "dataset" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "default": "none", + "param_type": "keyword_only" + }, + "or_property": { + "default": "none", + "param_type": "keyword_only" + }, + "dimensions": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "and_property": { + "attr_type": "and_property" + }, + "or_property": { + "attr_type": "or_property" + }, + "dimensions": { + "attr_type": "dimensions" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryGrouping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "columns": { + "default": "none", + "param_type": "keyword_only" + }, + "rows": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "next_link": { + "attr_type": "next_link" + }, + "columns": { + "attr_type": "columns" + }, + "rows": { + "attr_type": "rows" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "location": { + "attr_type": null + }, + "sku": { + "attr_type": null + }, + "e_tag": { + "attr_type": null + }, + "tags": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "default": null, + "param_type": "keyword_only" + }, + "to": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "from_property": { + "attr_type": "from_property" + }, + "to": { + "attr_type": "to" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Reason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "VALID": "VALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RecommendationUsageDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "usage_grain": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "usage_grain": { + "attr_type": "usage_grain" + }, + "charges": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RecurrenceType": { + "type": "Enum", + "methods": {}, + "properties": { + "ANNUALLY": "ANNUALLY", + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "WEEKLY": "WEEKLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportConfigAggregation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "function": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "function": { + "attr_type": "function" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportConfigComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "values": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "operator": { + "attr_type": "operator" + }, + "values": { + "attr_type": "values" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportConfigDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "aggregation": { + "default": "none", + "param_type": "keyword_only" + }, + "grouping": { + "default": "none", + "param_type": "keyword_only" + }, + "sorting": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "granularity": { + "attr_type": "granularity" + }, + "configuration": { + "attr_type": "configuration" + }, + "aggregation": { + "attr_type": "aggregation" + }, + "grouping": { + "attr_type": "grouping" + }, + "sorting": { + "attr_type": "sorting" + }, + "filter": { + "attr_type": "filter" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportConfigDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "columns": { + "attr_type": "columns" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportConfigFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "default": "none", + "param_type": "keyword_only" + }, + "or_property": { + "default": "none", + "param_type": "keyword_only" + }, + "dimensions": { + "default": "none", + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "and_property": { + "attr_type": "and_property" + }, + "or_property": { + "attr_type": "or_property" + }, + "dimensions": { + "attr_type": "dimensions" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportConfigGrouping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportConfigSorting": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "direction": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "direction": { + "attr_type": "direction" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportConfigSortingType": { + "type": "Enum", + "methods": {}, + "properties": { + "ASCENDING": "ASCENDING", + "DESCENDING": "DESCENDING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportConfigTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "default": null, + "param_type": "keyword_only" + }, + "to": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "from_property": { + "attr_type": "from_property" + }, + "to": { + "attr_type": "to" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReportGranularityType": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportOperationStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "NO_DATA_FOUND": "NO_DATA_FOUND", + "QUEUED": "QUEUED", + "READY_TO_DOWNLOAD": "READY_TO_DOWNLOAD", + "TIMED_OUT": "TIMED_OUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportTimeframeType": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM": "CUSTOM", + "MONTH_TO_DATE": "MONTH_TO_DATE", + "WEEK_TO_DATE": "WEEK_TO_DATE", + "YEAR_TO_DATE": "YEAR_TO_DATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportType": { + "type": "Enum", + "methods": {}, + "properties": { + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReservationReportSchema": { + "type": "Enum", + "methods": {}, + "properties": { + "INSTANCE_FLEXIBILITY_GROUP": "INSTANCE_FLEXIBILITY_GROUP", + "INSTANCE_FLEXIBILITY_RATIO": "INSTANCE_FLEXIBILITY_RATIO", + "INSTANCE_ID": "INSTANCE_ID", + "KIND": "KIND", + "RESERVATION_ID": "RESERVATION_ID", + "RESERVATION_ORDER_ID": "RESERVATION_ORDER_ID", + "RESERVED_HOURS": "RESERVED_HOURS", + "SKU_NAME": "SKU_NAME", + "TOTAL_RESERVED_QUANTITY": "TOTAL_RESERVED_QUANTITY", + "USAGE_DATE": "USAGE_DATE", + "USED_HOURS": "USED_HOURS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "NOT_ACTIVE": "NOT_ACTIVE", + "PROCESSING": "PROCESSING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SavingsPlanUtilizationSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "arm_sku_name": { + "attr_type": null + }, + "benefit_id": { + "attr_type": null + }, + "benefit_order_id": { + "attr_type": null + }, + "benefit_type": { + "attr_type": "benefit_type" + }, + "usage_date": { + "attr_type": null + }, + "avg_utilization_percentage": { + "attr_type": null + }, + "min_utilization_percentage": { + "attr_type": null + }, + "max_utilization_percentage": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SavingsPlanUtilizationSummaryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "avg_utilization_percentage": { + "attr_type": null + }, + "min_utilization_percentage": { + "attr_type": null + }, + "max_utilization_percentage": { + "attr_type": null + }, + "arm_sku_name": { + "attr_type": null + }, + "benefit_id": { + "attr_type": null + }, + "benefit_order_id": { + "attr_type": null + }, + "benefit_type": { + "attr_type": "benefit_type" + }, + "usage_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScheduleFrequency": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "WEEKLY": "WEEKLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScheduleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "frequency": { + "default": null, + "param_type": "keyword_only" + }, + "start_date": { + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "default": null, + "param_type": "keyword_only" + }, + "hour_of_day": { + "default": "none", + "param_type": "keyword_only" + }, + "days_of_week": { + "default": "none", + "param_type": "keyword_only" + }, + "weeks_of_month": { + "default": "none", + "param_type": "keyword_only" + }, + "day_of_month": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "frequency": { + "attr_type": "frequency" + }, + "hour_of_day": { + "attr_type": "hour_of_day" + }, + "days_of_week": { + "attr_type": "days_of_week" + }, + "weeks_of_month": { + "attr_type": "weeks_of_month" + }, + "day_of_month": { + "attr_type": "day_of_month" + }, + "start_date": { + "attr_type": "start_date" + }, + "end_date": { + "attr_type": "end_date" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScheduledAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "file_destination": { + "default": "none", + "param_type": "keyword_only" + }, + "notification": { + "default": "none", + "param_type": "keyword_only" + }, + "notification_email": { + "default": "none", + "param_type": "keyword_only" + }, + "schedule": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "view_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "file_destination": { + "attr_type": "file_destination" + }, + "notification": { + "attr_type": "notification" + }, + "notification_email": { + "attr_type": "notification_email" + }, + "schedule": { + "attr_type": "schedule" + }, + "scope": { + "attr_type": "scope" + }, + "status": { + "attr_type": "status" + }, + "view_id": { + "attr_type": "view_id" + }, + "e_tag": { + "attr_type": null + }, + "kind": { + "attr_type": "kind" + }, + "system_data": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScheduledActionKind": { + "type": "Enum", + "methods": {}, + "properties": { + "EMAIL": "EMAIL", + "INSIGHT_ALERT": "INSIGHT_ALERT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScheduledActionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScheduledActionProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "e_tag": { + "attr_type": null + }, + "kind": { + "attr_type": "kind" + }, + "system_data": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScheduledActionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "EXPIRED": "EXPIRED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Scope": { + "type": "Enum", + "methods": {}, + "properties": { + "SHARED": "SHARED", + "SINGLE": "SINGLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Setting": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SettingType": { + "type": "Enum", + "methods": {}, + "properties": { + "TAGINHERITANCE": "TAGINHERITANCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SettingsKind": { + "type": "Enum", + "methods": {}, + "properties": { + "TAGINHERITANCE": "TAGINHERITANCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SettingsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SharedScopeBenefitRecommendationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "look_back_period": { + "default": "none", + "param_type": "keyword_only" + }, + "usage": { + "default": "none", + "param_type": "keyword_only" + }, + "term": { + "default": "none", + "param_type": "keyword_only" + }, + "commitment_granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "recommendation_details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "scope": { + "attr_type": null + }, + "first_consumption_date": { + "attr_type": null + }, + "last_consumption_date": { + "attr_type": null + }, + "look_back_period": { + "attr_type": "look_back_period" + }, + "total_hours": { + "attr_type": null + }, + "usage": { + "attr_type": "usage" + }, + "arm_sku_name": { + "attr_type": null + }, + "term": { + "attr_type": "term" + }, + "commitment_granularity": { + "attr_type": "commitment_granularity" + }, + "currency_code": { + "attr_type": null + }, + "cost_without_benefit": { + "attr_type": null + }, + "recommendation_details": { + "attr_type": "recommendation_details" + }, + "all_recommendation_details": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SingleScopeBenefitRecommendationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "look_back_period": { + "default": "none", + "param_type": "keyword_only" + }, + "usage": { + "default": "none", + "param_type": "keyword_only" + }, + "term": { + "default": "none", + "param_type": "keyword_only" + }, + "commitment_granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "recommendation_details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "scope": { + "attr_type": null + }, + "subscription_id": { + "attr_type": null + }, + "resource_group": { + "attr_type": null + }, + "first_consumption_date": { + "attr_type": null + }, + "last_consumption_date": { + "attr_type": null + }, + "look_back_period": { + "attr_type": "look_back_period" + }, + "total_hours": { + "attr_type": null + }, + "usage": { + "attr_type": "usage" + }, + "arm_sku_name": { + "attr_type": null + }, + "term": { + "attr_type": "term" + }, + "commitment_granularity": { + "attr_type": "commitment_granularity" + }, + "currency_code": { + "attr_type": null + }, + "cost_without_benefit": { + "attr_type": null + }, + "recommendation_details": { + "attr_type": "recommendation_details" + }, + "all_recommendation_details": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SourceCostAllocationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "values": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "values": { + "attr_type": "values" + }, + "resource_type": { + "attr_type": "resource_type" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Status": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "StatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "INACTIVE": "INACTIVE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SystemAssignedServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "tenant_id": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SystemAssignedServiceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "default": "none", + "param_type": "keyword_only" + }, + "created_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "created_at": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_at": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "created_by": { + "attr_type": "created_by" + }, + "created_by_type": { + "attr_type": "created_by_type" + }, + "created_at": { + "attr_type": "created_at" + }, + "last_modified_by": { + "attr_type": "last_modified_by" + }, + "last_modified_by_type": { + "attr_type": "last_modified_by_type" + }, + "last_modified_at": { + "attr_type": "last_modified_at" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagInheritanceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "prefer_container_tags": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "prefer_container_tags": { + "attr_type": "prefer_container_tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagInheritanceSetting": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "properties": { + "attr_type": "properties" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TargetCostAllocationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "values": { + "default": null, + "param_type": "keyword_only" + }, + "policy_type": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "values": { + "attr_type": "values" + }, + "policy_type": { + "attr_type": "policy_type" + }, + "resource_type": { + "attr_type": "resource_type" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Term": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_Y": "P1_Y", + "P3_Y": "P3_Y", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ThresholdType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL": "ACTUAL", + "FORECASTED": "FORECASTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TimeGrainType": { + "type": "Enum", + "methods": {}, + "properties": { + "ANNUALLY": "ANNUALLY", + "BILLING_ANNUAL": "BILLING_ANNUAL", + "BILLING_MONTH": "BILLING_MONTH", + "BILLING_QUARTER": "BILLING_QUARTER", + "LAST30_DAYS": "LAST30_DAYS", + "LAST7_DAYS": "LAST7_DAYS", + "MONTHLY": "MONTHLY", + "QUARTERLY": "QUARTERLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TimeframeType": { + "type": "Enum", + "methods": {}, + "properties": { + "BILLING_MONTH_TO_DATE": "BILLING_MONTH_TO_DATE", + "CUSTOM": "CUSTOM", + "MONTH_TO_DATE": "MONTH_TO_DATE", + "THE_CURRENT_MONTH": "THE_CURRENT_MONTH", + "THE_LAST_BILLING_MONTH": "THE_LAST_BILLING_MONTH", + "THE_LAST_MONTH": "THE_LAST_MONTH", + "WEEK_TO_DATE": "WEEK_TO_DATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "View": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "modified_on": { + "default": "none", + "param_type": "keyword_only" + }, + "date_range": { + "default": "none", + "param_type": "keyword_only" + }, + "chart": { + "default": "none", + "param_type": "keyword_only" + }, + "accumulated": { + "default": "none", + "param_type": "keyword_only" + }, + "metric": { + "default": "none", + "param_type": "keyword_only" + }, + "kpis": { + "default": "none", + "param_type": "keyword_only" + }, + "pivots": { + "default": "none", + "param_type": "keyword_only" + }, + "type_properties_query_type": { + "default": "none", + "param_type": "keyword_only" + }, + "timeframe": { + "default": "none", + "param_type": "keyword_only" + }, + "time_period": { + "default": "none", + "param_type": "keyword_only" + }, + "data_set": { + "default": "none", + "param_type": "keyword_only" + }, + "include_monetary_commitment": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "display_name": { + "attr_type": "display_name" + }, + "scope": { + "attr_type": "scope" + }, + "created_on": { + "attr_type": null + }, + "modified_on": { + "attr_type": "modified_on" + }, + "date_range": { + "attr_type": "date_range" + }, + "currency": { + "attr_type": null + }, + "chart": { + "attr_type": "chart" + }, + "accumulated": { + "attr_type": "accumulated" + }, + "metric": { + "attr_type": "metric" + }, + "kpis": { + "attr_type": "kpis" + }, + "pivots": { + "attr_type": "pivots" + }, + "type_properties_query_type": { + "attr_type": "type_properties_query_type" + }, + "timeframe": { + "attr_type": "timeframe" + }, + "time_period": { + "attr_type": "time_period" + }, + "data_set": { + "attr_type": "data_set" + }, + "include_monetary_commitment": { + "attr_type": "include_monetary_commitment" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "e_tag": { + "attr_type": "e_tag" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ViewListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WeeksOfMonth": { + "type": "Enum", + "methods": {}, + "properties": { + "FIRST": "FIRST", + "FOURTH": "FOURTH", + "LAST": "LAST", + "SECOND": "SECOND", + "THIRD": "THIRD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.operations": { + "class_nodes": { + "AlertsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "dismiss": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Alert", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DismissAlertPayload", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Alert" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Alert" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Alert", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AlertsResult", + "overloads": [] + }, + "list_external": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AlertsResult", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitRecommendationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "orderby": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitRecommendationModel]", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitUtilizationSummariesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_order": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + } + }, + "properties": {} + }, + "BudgetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Budget", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Budget", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Budget" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Budget" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Budget", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Budget]", + "overloads": [] + } + }, + "properties": {} + }, + "CostAllocationRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "CostAllocationRuleCheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "CostAllocationRuleDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CostAllocationRuleDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "DimensionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skiptoken": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Dimension]", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skiptoken": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Dimension]", + "overloads": [] + } + }, + "properties": {} + }, + "ExportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Export", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Export", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Export" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Export" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "execute": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ExportRunRequest]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Export", + "overloads": [] + }, + "get_execution_history": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ExportExecutionListResult", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ExportListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ForecastOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "external_cloud_provider_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ForecastResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ForecastResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ForecastResult" + } + ] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Optional[ForecastResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[ForecastResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[ForecastResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateBenefitUtilizationSummariesReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_generate_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + } + }, + "properties": {} + }, + "GenerateCostDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateCostDetailsReportRequestDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]" + } + ] + }, + "begin_get_operation_results": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "GenerateDetailedCostReportOperationStatuses", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateDetailedCostReportDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateReservationDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "end_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatus]", + "overloads": [] + }, + "begin_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "end_date": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatus]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CostManagementOperation]", + "overloads": [] + } + }, + "properties": {} + }, + "PriceSheetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_download_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_period_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusAutoGenerated]", + "overloads": [] + }, + "begin_download_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[PricesheetDownloadProperties]", + "overloads": [] + }, + "begin_download_by_invoice": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "invoice_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DownloadURL]", + "overloads": [] + } + }, + "properties": {} + }, + "QueryOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Optional[QueryResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[QueryResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[QueryResult]" + } + ] + }, + "usage_by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "QueryResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "QueryResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "QueryResult" + } + ] + } + }, + "properties": {} + }, + "ScheduledActionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "check_name_availability_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "run": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "run_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "SettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Setting", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "Setting", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Setting" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Setting" + } + ] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Setting", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SettingsListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ViewsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.View]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.View]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py index 92332e0a8bf2..612c58597644 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BenefitRecommendationsByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitRecommendationsByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_account.py new file mode 100644 index 000000000000..94edb7624a58 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_account.py @@ -0,0 +1,47 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python generate_benefit_utilization_summaries_report_by_billing_account.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.generate_benefit_utilization_summaries_report.begin_generate_by_billing_account( + billing_account_id="8099099", + benefit_utilization_summaries_request={ + "endDate": "2022-08-31T00:00:00Z", + "grain": "Daily", + "kind": "Reservation", + "startDate": "2022-06-01T00:00:00Z", + }, + ).result() + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_profile.py new file mode 100644 index 000000000000..035478b68725 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_profile.py @@ -0,0 +1,48 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python generate_benefit_utilization_summaries_report_by_billing_profile.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.generate_benefit_utilization_summaries_report.begin_generate_by_billing_profile( + billing_account_id="00000000-0000-0000-0000-000000000000", + billing_profile_id="CZSFR-SDFXC-DSDF", + benefit_utilization_summaries_request={ + "endDate": "2022-08-31T00:00:00Z", + "grain": "Daily", + "kind": "Reservation", + "startDate": "2022-06-01T00:00:00Z", + }, + ).result() + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation.py new file mode 100644 index 000000000000..2425fed0405d --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation.py @@ -0,0 +1,47 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python generate_benefit_utilization_summaries_report_by_reservation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.generate_benefit_utilization_summaries_report.begin_generate_by_reservation_id( + reservation_order_id="00000000-0000-0000-0000-000000000000", + reservation_id="00000000-0000-0000-0000-000000000000", + benefit_utilization_summaries_request={ + "endDate": "2022-08-31T00:00:00Z", + "grain": "Daily", + "startDate": "2022-06-01T00:00:00Z", + }, + ).result() + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation_order.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation_order.py new file mode 100644 index 000000000000..e265eb0c2c9c --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation_order.py @@ -0,0 +1,46 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python generate_benefit_utilization_summaries_report_by_reservation_order.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.generate_benefit_utilization_summaries_report.begin_generate_by_reservation_order_id( + reservation_order_id="00000000-0000-0000-0000-000000000000", + benefit_utilization_summaries_request={ + "endDate": "2022-08-31T00:00:00Z", + "grain": "Daily", + "startDate": "2022-06-01T00:00:00Z", + }, + ).result() + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan.py new file mode 100644 index 000000000000..96b19aba4c43 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan.py @@ -0,0 +1,47 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python generate_benefit_utilization_summaries_report_by_savings_plan.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.generate_benefit_utilization_summaries_report.begin_generate_by_savings_plan_id( + savings_plan_order_id="00000000-0000-0000-0000-000000000000", + savings_plan_id="00000000-0000-0000-0000-000000000000", + benefit_utilization_summaries_request={ + "endDate": "2022-08-31T00:00:00Z", + "grain": "Daily", + "startDate": "2022-06-01T00:00:00Z", + }, + ).result() + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan_order.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan_order.py new file mode 100644 index 000000000000..8e9bbd27cd72 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan_order.py @@ -0,0 +1,46 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python generate_benefit_utilization_summaries_report_by_savings_plan_order.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.generate_benefit_utilization_summaries_report.begin_generate_by_savings_plan_order_id( + savings_plan_order_id="00000000-0000-0000-0000-000000000000", + benefit_utilization_summaries_request={ + "endDate": "2022-08-31T00:00:00Z", + "grain": "Daily", + "startDate": "2022-06-01T00:00:00Z", + }, + ).result() + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_account.py index c09892637945..22cf51fd626c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_profile.py index 83fd2506ae40..9e58ad25bcb9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_profile.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -36,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_id_monthly.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_id_monthly.py index a3451662d9a5..b4e6133583a2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_id_monthly.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_id_monthly.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -36,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_order_id_daily.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_order_id_daily.py index 6aa7f30f86ef..04d9724be6cb 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_order_id_daily.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_order_id_daily.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py index b5bb07a53325..92e00f98c257 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingAccountAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py index f0e45e39ad6c..dfdb7469fb47 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingAccountDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py index 874fc420c63d..f44db2779e80 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingAccountDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py index 02bd4d716cc0..d632afe7fec3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingAccountDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py index 1b4628647f41..94870eeb8362 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -62,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingAccountForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py index a7cae2acc067..ebbf48683105 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingAccountQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py index 13b762d01fcf..a328d2ebf0f2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingAccountQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py index e3d0e291e3a4..7ebd258735c3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingProfileAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingProfileAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py index 887aafbcf15e..5ec003d550d8 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -62,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/BillingProfileForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingProfileForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/cost/create_or_update_cost_subscription_budget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/cost/create_or_update_cost_subscription_budget.py new file mode 100644 index 000000000000..17fca5a2d872 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/cost/create_or_update_cost_subscription_budget.py @@ -0,0 +1,81 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python create_or_update_cost_subscription_budget.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + budget_name="TestBudget", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "amount": 100.65, + "category": "Cost", + "filter": { + "and": [ + { + "dimensions": { + "name": "ResourceId", + "operator": "In", + "values": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1", + ], + } + }, + {"tags": {"name": "category", "operator": "In", "values": ["Dev", "Prod"]}}, + {"tags": {"name": "department", "operator": "In", "values": ["engineering", "sales"]}}, + ] + }, + "notifications": { + "Actual_GreaterThan_80_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "contactGroups": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup" + ], + "contactRoles": ["Contributor", "Reader"], + "enabled": True, + "locale": "en-us", + "operator": "GreaterThan", + "threshold": 80, + "thresholdType": "Actual", + } + }, + "timeGrain": "Monthly", + "timePeriod": {"endDate": "2024-10-31T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/Cost/CreateOrUpdate-Cost-Subscription-Budget.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule.py new file mode 100644 index 000000000000..c6b588264e14 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule.py @@ -0,0 +1,61 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_account_ea_alert_rule.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": {}, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Weekly", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last7Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reservation_id_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reservation_id_filter.py new file mode 100644 index 000000000000..3d5d7fe8adef --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reservation_id_filter.py @@ -0,0 +1,71 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_account_ea_alert_rule_reservation_id_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": { + "dimensions": { + "name": "ReservationId", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000", + "00000000-0000-0000-0000-000000000001", + "00000000-0000-0000-0000-000000000002", + ], + } + }, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Weekly", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last7Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservationIdFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reserved_resource_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reserved_resource_type_filter.py new file mode 100644 index 000000000000..6a816fb850a3 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reserved_resource_type_filter.py @@ -0,0 +1,67 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_account_ea_alert_rule_reserved_resource_type_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": { + "dimensions": { + "name": "ReservedResourceType", + "operator": "In", + "values": ["VirtualMachines", "SqlDatabases", "CosmosDb"], + } + }, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Weekly", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last7Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservedResourceTypeFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule.py new file mode 100644 index 000000000000..4267a32838c3 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule.py @@ -0,0 +1,61 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_profile_alert_rule.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": {}, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Daily", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last30Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reservation_id_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reservation_id_filter.py new file mode 100644 index 000000000000..4fb514bbe429 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reservation_id_filter.py @@ -0,0 +1,71 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_profile_alert_rule_reservation_id_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": { + "dimensions": { + "name": "ReservationId", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000", + "00000000-0000-0000-0000-000000000001", + "00000000-0000-0000-0000-000000000002", + ], + } + }, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Daily", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last30Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservationIdFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reserved_resource_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reserved_resource_type_filter.py new file mode 100644 index 000000000000..72021b8b67f6 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reserved_resource_type_filter.py @@ -0,0 +1,67 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_profile_alert_rule_reserved_resource_type_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": { + "dimensions": { + "name": "ReservedResourceType", + "operator": "In", + "values": ["VirtualMachines", "SqlDatabases", "CosmosDb"], + } + }, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Daily", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last30Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservedResourceTypeFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule.py new file mode 100644 index 000000000000..7da0b6b1af56 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule.py @@ -0,0 +1,61 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python customer_alert_rule.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": {}, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Daily", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last30Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reservation_id_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reservation_id_filter.py new file mode 100644 index 000000000000..ba8824d4649e --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reservation_id_filter.py @@ -0,0 +1,71 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python customer_alert_rule_reservation_id_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": { + "dimensions": { + "name": "ReservationId", + "operator": "In", + "values": [ + "00000000-0000-0000-0000-000000000000", + "00000000-0000-0000-0000-000000000001", + "00000000-0000-0000-0000-000000000002", + ], + } + }, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Daily", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last30Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservationIdFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reserved_resource_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reserved_resource_type_filter.py new file mode 100644 index 000000000000..ba957076b7d8 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reserved_resource_type_filter.py @@ -0,0 +1,67 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python customer_alert_rule_reserved_resource_type_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444", + budget_name="TestAlertRule", + parameters={ + "eTag": '"1d34d016a593709"', + "properties": { + "category": "ReservationUtilization", + "filter": { + "dimensions": { + "name": "ReservedResourceType", + "operator": "In", + "values": ["VirtualMachines", "SqlDatabases", "CosmosDb"], + } + }, + "notifications": { + "Actual_LessThan_99_Percent": { + "contactEmails": ["johndoe@contoso.com", "janesmith@contoso.com"], + "enabled": True, + "frequency": "Daily", + "locale": "en-us", + "operator": "LessThan", + "threshold": 99, + } + }, + "timeGrain": "Last30Days", + "timePeriod": {"endDate": "2025-04-01T00:00:00Z", "startDate": "2023-04-01T00:00:00Z"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservedResourceTypeFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/delete/delete_budget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/delete/delete_budget.py new file mode 100644 index 000000000000..99ad50c7c041 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/delete/delete_budget.py @@ -0,0 +1,41 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python delete_budget.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + client.budgets.delete( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + budget_name="TestBudget", + ) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/Delete/DeleteBudget.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/cost/get_cost_budget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/cost/get_cost_budget.py new file mode 100644 index 000000000000..b263f05e33ee --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/cost/get_cost_budget.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python get_cost_budget.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.get( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + budget_name="TestBudget", + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/Get/Cost/Get-Cost-Budget.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/reservation_utilization/get_reservation_utilization_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/reservation_utilization/get_reservation_utilization_alert_rule.py new file mode 100644 index 000000000000..3310bf763a21 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/reservation_utilization/get_reservation_utilization_alert_rule.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python get_reservation_utilization_alert_rule.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.get( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN", + budget_name="TestAlertRule", + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/Get/ReservationUtilization/Get-ReservationUtilization-AlertRule.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea.py new file mode 100644 index 000000000000..36c3983eb57e --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_account_budgets_list_ea.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/123456", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/BillingAccountBudgetsList-EA.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea_category_type_filter.py new file mode 100644 index 000000000000..e50a69dbf38a --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea_category_type_filter.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_account_budgets_list_ea_category_type_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/123456", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/BillingAccountBudgetsList-EA-CategoryTypeFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/department_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/department_budgets_list.py new file mode 100644 index 000000000000..81e270c06207 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/department_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python department_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/123456/departments/789101", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/DepartmentBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/enrollment_account_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/enrollment_account_budgets_list.py new file mode 100644 index 000000000000..7c3e70849652 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/enrollment_account_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python enrollment_account_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/123456/enrollmentAccounts/473845", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/EnrollmentAccountBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca.py new file mode 100644 index 000000000000..943f90f42551 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_account_budgets_list_mca.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingAccountBudgetsList-MCA.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca_category_type_filter.py new file mode 100644 index 000000000000..1f510a2998d4 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca_category_type_filter.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_account_budgets_list_mca_category_type_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingAccountBudgetsList-MCA-CategoryTypeFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list.py new file mode 100644 index 000000000000..9b9c56cc8e61 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_profile_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/MYDEVTESTBP", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingProfileBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list_category_type_filter.py new file mode 100644 index 000000000000..944a732cfd7f --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list_category_type_filter.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python billing_profile_budgets_list_category_type_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/MYDEVTESTBP", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingProfileBudgetsList-CategoryTypeFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list.py new file mode 100644 index 000000000000..169f0a04d416 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python customer_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/CustomerBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list_category_type_filter.py new file mode 100644 index 000000000000..8be52de4b3cf --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list_category_type_filter.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python customer_budgets_list_category_type_filter.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/CustomerBudgetsList-CategoryTypeFilter.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/invoice_section_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/invoice_section_budgets_list.py new file mode 100644 index 000000000000..b1f3de21555d --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/invoice_section_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python invoice_section_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/MYDEVTESTBP/invoiceSections/AAAA-BBBB-CCC-DDD", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/InvoiceSectionBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/management_group_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/management_group_budgets_list.py new file mode 100644 index 000000000000..ccfba3eb79ff --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/management_group_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python management_group_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="Microsoft.Management/managementGroups/MYDEVTESTMG", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/RBAC/ManagementGroupBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/resource_group_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/resource_group_budgets_list.py new file mode 100644 index 000000000000..ebf35c6ee4f0 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/resource_group_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python resource_group_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/RBAC/ResourceGroupBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/subscription_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/subscription_budgets_list.py new file mode 100644 index 000000000000..9f6e86a0ff9e --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/subscription_budgets_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python subscription_budgets_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.budgets.list( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/RBAC/SubscriptionBudgetsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py new file mode 100644 index 000000000000..4879496d5c2d --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py @@ -0,0 +1,45 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python cost_allocation_rule_check_name_availability.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.cost_allocation_rules.check_name_availability( + billing_account_id="100", + cost_allocation_rule_check_name_availability_request={ + "name": "testRule", + "type": "Microsoft.CostManagement/costAllocationRules", + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleCheckNameAvailability.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py new file mode 100644 index 000000000000..27b360f6258d --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py @@ -0,0 +1,64 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python cost_allocation_rule_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.cost_allocation_rules.create_or_update( + billing_account_id="100", + rule_name="testRule", + cost_allocation_rule={ + "properties": { + "description": "This is a testRule", + "details": { + "sourceResources": [ + {"name": "ResourceGroupName", "resourceType": "Dimension", "values": ["sampleRG", "secondRG"]} + ], + "targetResources": [ + { + "name": "ResourceGroupName", + "policyType": "FixedProportion", + "resourceType": "Dimension", + "values": [ + {"name": "destinationRG", "percentage": 45}, + {"name": "destinationRG2", "percentage": 54}, + ], + } + ], + }, + "status": "Active", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleCreate.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py new file mode 100644 index 000000000000..23fb9d8b51d6 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py @@ -0,0 +1,63 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python cost_allocation_rule_create_tag.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.cost_allocation_rules.create_or_update( + billing_account_id="100", + rule_name="testRule", + cost_allocation_rule={ + "properties": { + "description": "This is a testRule", + "details": { + "sourceResources": [{"name": "category", "resourceType": "Tag", "values": ["devops"]}], + "targetResources": [ + { + "name": "ResourceGroupName", + "policyType": "FixedProportion", + "resourceType": "Dimension", + "values": [ + {"name": "destinationRG", "percentage": 33.33}, + {"name": "destinationRG2", "percentage": 33.33}, + {"name": "destinationRG3", "percentage": 33.34}, + ], + } + ], + }, + "status": "Active", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleCreateTag.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py new file mode 100644 index 000000000000..ff697b5767f6 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py @@ -0,0 +1,41 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python cost_allocation_rule_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + client.cost_allocation_rules.delete( + billing_account_id="100", + rule_name="testRule", + ) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py new file mode 100644 index 000000000000..51a5f4678b1e --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python cost_allocation_rule_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.cost_allocation_rules.get( + billing_account_id="100", + rule_name="testRule", + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleGet.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py new file mode 100644 index 000000000000..b765a11f9225 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python cost_allocation_rules_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.cost_allocation_rules.list( + billing_account_id="100", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRulesList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py index 5c2a8daab65e..4669ccb5f418 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/CostDetailsOperationResultsBySubscriptionScope.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostDetailsOperationResultsBySubscriptionScope.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py index 88c238b30566..76b3f62e64c9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DepartmentAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py index a38421094702..75cbfcde9300 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DepartmentDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py index 48935633c8ac..315aafc5bc9c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DepartmentDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py index 23e65cb1cb0c..3a2042c8d8a8 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DepartmentDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py index 15b69c4b5200..727d73fdc9b7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -62,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DepartmentForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py index f31157b94afd..bc9a6b04d8c2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DepartmentQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py index 36c7d45875f4..8cca507f43f1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DepartmentQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py index face8893712c..380c097bd043 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -36,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DismissResourceGroupAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DismissResourceGroupAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py index 2da152c2d778..0af4d0bd5b18 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -36,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/DismissSubscriptionAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DismissSubscriptionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py new file mode 100644 index 000000000000..6f18ba780a20 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python ea_price_sheet_for_billing_period.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.price_sheet.begin_download_by_billing_account( + billing_account_id="0000000", + billing_period_name="202311", + ).result() + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EAPriceSheetForBillingPeriod.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py index 1e246acd55bb..d94acff72e24 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/EnrollmentAccountAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py index e58b8e1c6003..2c332c60f181 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/EnrollmentAccountDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py index d730beedb0a2..5e2ead1c842b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/EnrollmentAccountDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py index aa4098802237..8668f861415d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/EnrollmentAccountDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py index a418aca1b8b4..578b516ece2f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -62,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/EnrollmentAccountForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py index b62acd0963eb..8ffc049f028a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/EnrollmentAccountQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py index 4a49084d6642..e065739b7805 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/EnrollmentAccountQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py index 24a9fdabca78..2f299aa6b4fe 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -32,12 +34,13 @@ def main(): scope="providers/Microsoft.Billing/billingAccounts/123456", export_name="TestExport", parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", "definition": { - "dataSet": { - "configuration": {"columns": ["Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity"]}, - "granularity": "Daily", - }, + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, "timeframe": "MonthToDate", "type": "ActualCost", }, @@ -46,20 +49,23 @@ def main(): "container": "exports", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "rootFolderPath": "ad-hoc", + "type": "AzureBlob", } }, + "exportDescription": "This is a test export.", "format": "Csv", + "partitionData": True, "schedule": { - "recurrence": "Weekly", - "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-10-31T00:00:00Z"}, + "recurrence": "Daily", + "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-06-30T00:00:00Z"}, "status": "Active", }, - } + }, }, ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportCreateOrUpdateByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py new file mode 100644 index 000000000000..eed4d7cf4255 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py @@ -0,0 +1,68 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python export_create_or_update_by_billing_account_custom.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.exports.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + export_name="TestExport", + parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", + "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", + "definition": { + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, + "timePeriod": {"from": "2025-04-03T00:00:00.000Z", "to": "2025-04-03T00:00:00.000Z"}, + "timeframe": "Custom", + "type": "ActualCost", + }, + "deliveryInfo": { + "destination": { + "container": "exports", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "rootFolderPath": "ad-hoc", + "type": "AzureBlob", + } + }, + "exportDescription": "This is a test export.", + "format": "Csv", + "partitionData": True, + "schedule": {"status": "Inactive"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountCustom.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py new file mode 100644 index 000000000000..2ac8ee09d15d --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py @@ -0,0 +1,71 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python export_create_or_update_by_billing_account_monthly.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.exports.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + export_name="TestExport", + parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", + "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", + "definition": { + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, + "timeframe": "TheLastMonth", + "type": "ActualCost", + }, + "deliveryInfo": { + "destination": { + "container": "exports", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "rootFolderPath": "ad-hoc", + "type": "AzureBlob", + } + }, + "exportDescription": "This is a test export.", + "format": "Csv", + "partitionData": True, + "schedule": { + "recurrence": "Monthly", + "recurrencePeriod": {"from": "2020-06-05T00:00:00Z", "to": "2030-06-30T00:00:00Z"}, + "status": "Active", + }, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountMonthly.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py new file mode 100644 index 000000000000..615d883c59ea --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py @@ -0,0 +1,71 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python export_create_or_update_by_billing_account_pricesheet.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.exports.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + export_name="TestExport", + parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", + "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", + "definition": { + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, + "timeframe": "TheCurrentMonth", + "type": "PriceSheet", + }, + "deliveryInfo": { + "destination": { + "container": "exports", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "rootFolderPath": "ad-hoc", + "type": "AzureBlob", + } + }, + "exportDescription": "This is a test export.", + "format": "Csv", + "partitionData": True, + "schedule": { + "recurrence": "Daily", + "recurrencePeriod": {"from": "2023-06-01T00:00:00Z", "to": "2023-06-30T00:00:00Z"}, + "status": "Active", + }, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountPricesheet.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py new file mode 100644 index 000000000000..a0e46233e4a6 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py @@ -0,0 +1,71 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python export_create_or_update_by_billing_account_reservation_details.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.exports.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + export_name="TestExport", + parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", + "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", + "definition": { + "dataSet": {"configuration": {"dataVersion": "2023-03-01"}, "granularity": "Daily"}, + "timeframe": "MonthToDate", + "type": "ReservationDetails", + }, + "deliveryInfo": { + "destination": { + "container": "exports", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "rootFolderPath": "ad-hoc", + "type": "AzureBlob", + } + }, + "exportDescription": "This is a test export.", + "format": "Csv", + "partitionData": True, + "schedule": { + "recurrence": "Daily", + "recurrencePeriod": {"from": "2023-06-01T00:00:00Z", "to": "2023-06-30T00:00:00Z"}, + "status": "Active", + }, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountReservationDetails.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py new file mode 100644 index 000000000000..ae64f7b51155 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py @@ -0,0 +1,80 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python export_create_or_update_by_billing_account_reservation_recommendation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.exports.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + export_name="TestExport", + parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", + "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", + "definition": { + "dataSet": { + "configuration": { + "dataVersion": "2023-05-01", + "filters": [ + {"name": "ReservationScope", "value": "Single"}, + {"name": "ResourceType", "value": "VirtualMachines"}, + {"name": "LookBackPeriod", "value": "Last7Days"}, + ], + } + }, + "timeframe": "MonthToDate", + "type": "ReservationRecommendations", + }, + "deliveryInfo": { + "destination": { + "container": "exports", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "rootFolderPath": "ad-hoc", + "type": "AzureBlob", + } + }, + "exportDescription": "This is a test export.", + "format": "Csv", + "partitionData": True, + "schedule": { + "recurrence": "Daily", + "recurrencePeriod": {"from": "2023-06-01T00:00:00Z", "to": "2023-06-30T00:00:00Z"}, + "status": "Active", + }, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountReservationRecommendation.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py new file mode 100644 index 000000000000..eaf95b495723 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py @@ -0,0 +1,71 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python export_create_or_update_by_billing_account_reservation_transactions.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.exports.create_or_update( + scope="providers/Microsoft.Billing/billingAccounts/123456", + export_name="TestExport", + parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", + "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", + "definition": { + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}}, + "timeframe": "MonthToDate", + "type": "ReservationTransactions", + }, + "deliveryInfo": { + "destination": { + "container": "exports", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "rootFolderPath": "ad-hoc", + "type": "AzureBlob", + } + }, + "exportDescription": "This is a test export.", + "format": "Csv", + "partitionData": True, + "schedule": { + "recurrence": "Daily", + "recurrencePeriod": {"from": "2023-06-01T00:00:00Z", "to": "2023-06-30T00:00:00Z"}, + "status": "Active", + }, + }, + }, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountReservationTransactions.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py index ae5adf8565d1..82c7e9405fe6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -32,12 +34,13 @@ def main(): scope="providers/Microsoft.Billing/billingAccounts/12/departments/1234", export_name="TestExport", parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", "properties": { + "compressionMode": "snappy", + "dataOverwriteBehavior": "OverwritePreviousReport", "definition": { - "dataSet": { - "configuration": {"columns": ["Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity"]}, - "granularity": "Daily", - }, + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, "timeframe": "MonthToDate", "type": "ActualCost", }, @@ -46,20 +49,23 @@ def main(): "container": "exports", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "rootFolderPath": "ad-hoc", + "type": "AzureBlob", } }, - "format": "Csv", + "exportDescription": "This is a test export.", + "format": "Parquet", + "partitionData": True, "schedule": { - "recurrence": "Weekly", - "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-10-31T00:00:00Z"}, + "recurrence": "Daily", + "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-06-30T00:00:00Z"}, "status": "Active", }, - } + }, }, ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportCreateOrUpdateByDepartment.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py index 259dd8f62917..a08795a7c3d5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -32,12 +34,13 @@ def main(): scope="providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", export_name="TestExport", parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", "definition": { - "dataSet": { - "configuration": {"columns": ["Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity"]}, - "granularity": "Daily", - }, + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, "timeframe": "MonthToDate", "type": "ActualCost", }, @@ -46,20 +49,23 @@ def main(): "container": "exports", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "rootFolderPath": "ad-hoc", + "type": "AzureBlob", } }, + "exportDescription": "This is a test export.", "format": "Csv", + "partitionData": True, "schedule": { - "recurrence": "Weekly", - "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-10-31T00:00:00Z"}, + "recurrence": "Daily", + "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-06-30T00:00:00Z"}, "status": "Active", }, - } + }, }, ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportCreateOrUpdateByEnrollmentAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py index a69690f9e8c2..0b5b8d28856a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -32,12 +34,13 @@ def main(): scope="providers/Microsoft.Management/managementGroups/TestMG", export_name="TestExport", parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", "definition": { - "dataSet": { - "configuration": {"columns": ["Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity"]}, - "granularity": "Daily", - }, + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, "timeframe": "MonthToDate", "type": "ActualCost", }, @@ -46,20 +49,23 @@ def main(): "container": "exports", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "rootFolderPath": "ad-hoc", + "type": "AzureBlob", } }, + "exportDescription": "This is a test export.", "format": "Csv", + "partitionData": True, "schedule": { - "recurrence": "Weekly", - "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-10-31T00:00:00Z"}, + "recurrence": "Daily", + "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-06-30T00:00:00Z"}, "status": "Active", }, - } + }, }, ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportCreateOrUpdateByManagementGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py index c8fa59257795..635c5020c917 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -32,12 +34,13 @@ def main(): scope="subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", export_name="TestExport", parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", "definition": { - "dataSet": { - "configuration": {"columns": ["Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity"]}, - "granularity": "Daily", - }, + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, "timeframe": "MonthToDate", "type": "ActualCost", }, @@ -46,20 +49,23 @@ def main(): "container": "exports", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "rootFolderPath": "ad-hoc", + "type": "AzureBlob", } }, + "exportDescription": "This is a test export.", "format": "Csv", + "partitionData": True, "schedule": { - "recurrence": "Weekly", - "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-10-31T00:00:00Z"}, + "recurrence": "Daily", + "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-06-30T00:00:00Z"}, "status": "Active", }, - } + }, }, ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportCreateOrUpdateByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py index 997f926419db..133275a1f86b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -32,12 +34,13 @@ def main(): scope="subscriptions/00000000-0000-0000-0000-000000000000", export_name="TestExport", parameters={ + "identity": {"type": "SystemAssigned"}, + "location": "centralus", "properties": { + "compressionMode": "gzip", + "dataOverwriteBehavior": "OverwritePreviousReport", "definition": { - "dataSet": { - "configuration": {"columns": ["Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity"]}, - "granularity": "Daily", - }, + "dataSet": {"configuration": {"dataVersion": "2023-05-01"}, "granularity": "Daily"}, "timeframe": "MonthToDate", "type": "ActualCost", }, @@ -46,20 +49,23 @@ def main(): "container": "exports", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", "rootFolderPath": "ad-hoc", + "type": "AzureBlob", } }, + "exportDescription": "This is a test export.", "format": "Csv", + "partitionData": True, "schedule": { - "recurrence": "Weekly", - "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-10-31T00:00:00Z"}, + "recurrence": "Daily", + "recurrencePeriod": {"from": "2020-06-01T00:00:00Z", "to": "2020-06-30T00:00:00Z"}, "status": "Active", }, - } + }, }, ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportCreateOrUpdateBySubscription.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py index 05c045b790fa..5aedb7238e94 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportDeleteByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py index ae811025f0a9..6445e7244c40 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportDeleteByDepartment.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py index c108b4b337d1..bbf8d5a52014 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportDeleteByEnrollmentAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py index 4bf2f36a8622..0932634a8d25 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportDeleteByManagementGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py index 82229e9bba7c..55443708a31c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportDeleteByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py index 427f2a9f9138..7e3e39575b3e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportDeleteBySubscription.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py index 8266b9a594d2..cd1287c4afa5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportGetByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py index e6aa15d5361c..aeb0275b9460 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportGetByDepartment.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py index 4960c604686d..7d3e38b32485 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportGetByEnrollmentAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py index ac2e541426fc..030da76f263f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportGetByManagementGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py index 307fb98bd806..27d9d4a19bf5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportGetByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py index efbd1e8048b7..39e5563e0bd7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportGetBySubscription.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py index 97740984b3de..c6ab7ba80538 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py new file mode 100644 index 000000000000..a117490546aa --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py @@ -0,0 +1,41 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python export_run_by_billing_account_with_optional_request_body.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + client.exports.execute( + scope="providers/Microsoft.Billing/billingAccounts/123456", + export_name="TestExport", + ) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByBillingAccountWithOptionalRequestBody.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py index 64f869360de1..d1f07ccb7868 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunByDepartment.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py index 6e94d8ada049..96e33eb59171 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunByEnrollmentAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py index 8b0d53edc4d5..bb72980febad 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunByManagementGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py index ab862471e963..53c58e2a59c7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py index 4e61a79b18ac..3b219b7ad500 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunBySubscription.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py index 199740876c6b..ac87b998995f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunHistoryGetByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py index 380019a2e8e1..1e422b7f8408 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunHistoryGetByDepartment.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py index 79922afbc76d..1a2910a082c4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunHistoryGetByEnrollmentAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py index 37d279c1cd97..ed86fe0b2925 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunHistoryGetByManagementGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py index 494201812bf2..4e9a999a78d8 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunHistoryGetByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py index 4565b72e9911..0713fb814637 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportRunHistoryGetBySubscription.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py index 6562d9dddf91..f4227157199c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportsGetByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py index e5f7c4444277..c782bad0d9ef 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportsGetByDepartment.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py index de0b8d7490a8..675d16f86d4b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportsGetByEnrollmentAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py index 8b78725d765d..aa523a521eb5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportsGetByManagementGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py index b9662dd0ff45..e5b7b23857d2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportsGetByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py index 37fcdbd45b49..7fbe424a7df6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExportsGetBySubscription.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py index 779eb2320f80..9afca71e3a4a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalBillingAccountAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py index dc1bb420b118..a07b0214a796 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -61,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalBillingAccountForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py index b764fdd3c0ed..745a444219e1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -36,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalBillingAccountsDimensions.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountsDimensions.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py index 69b7503274a8..e47dcc6b22b6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -59,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalBillingAccountsQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountsQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py index 24103f6c6562..b2175a812e57 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalSubscriptionAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py index 39a6ed464e0f..8afadf89ae41 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -61,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalSubscriptionForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py index ff8ef5e75164..55539a132ed3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -36,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalSubscriptionsDimensions.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionsDimensions.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py index 5879a5230481..1cd67c934740 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -59,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ExternalSubscriptionsQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionsQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py index 8fc7ecb2911b..9459fe36420b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py index 3cc8d1ae18e2..e66acff6f176 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py index 7e38e26e351f..7df5a04a709d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py index 1d9fb4013da7..bd923b0d0552 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateCostDetailsReportByCustomerAndTimePeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByCustomerAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py index b7fd59c2d6f0..6ee2c89bed2c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py index 05857cda0b19..3a83d55907ac 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py index fa959fac4317..d39af3c271b3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py index 6c9aba183fb6..dd73f92a5c52 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py index 171adc5bea17..765b4f5a07c2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py index 66e8751344e3..6810fc22a909 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py index 6b4c1c570c67..bc6dfa654c34 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateDetailedCostReportByCustomerAndTimePeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByCustomerAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py index 002c901d4c44..71351d46dc2e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py index ad52d818c68e..8e6fc54eff83 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py index faf3c338f455..ac6b691ba5bb 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py index 5cbf1f685c89..85a21f8e4225 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -36,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateReservationDetailsReportByBillingAccount.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateReservationDetailsReportByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py index 29acfba80850..98d5297fa9d6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -37,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/GenerateReservationDetailsReportByBillingProfile.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateReservationDetailsReportByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py index 24be92520b5e..953e4f91450f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/InvoiceSectionAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/InvoiceSectionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py index 5ca0635445f2..c85ae203b4d0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -62,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/InvoiceSectionForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/InvoiceSectionForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py index a57a6252f33b..e09214247b69 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ManagementGroupDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py index fd618f059528..ce5239794200 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ManagementGroupDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py index d6624fb9d858..b39181f1db5b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ManagementGroupDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py index 259ead41ae0e..7ebf43cb9d30 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ManagementGroupQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py index fda6bddcc595..e6f136f2c7c5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ManagementGroupQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py index 9f7cba047e65..9c1c003082da 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingAccountDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py index 659323eb7296..b2d44c880793 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingAccountDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py index 0f16db5f30bb..54659ebc559d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingAccountDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py index 7c8456bba766..b0298ae579f7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingAccountQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py index 3e3dffe50f13..f85c7ebf2ab2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingAccountQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py index f4b4e44b51d1..e463bab5dd8f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingProfileDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py index 801c2ef43317..524aff62c500 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingProfileDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py index ed2286ccfe72..dbd445ac1179 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingProfileDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py index bd56472dcdbb..48a0246ad38b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingProfileQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py index cacb2c21e4d5..db5546e85639 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCABillingProfileQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py index 16ca7b1798a2..42f6d787dd6d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCACustomerDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py index b941fb680e48..d20f915cc794 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCACustomerDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py index 498fb66387df..1a9e79382e27 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCACustomerDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py index 4dcb6efde3d4..c422e8584df9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCACustomerQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py index c4c0ff727c0a..5412f6ce9683 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCACustomerQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py index 11b68a17f4d4..dab7839695d8 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCAInvoiceSectionDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py index e449f04d320c..47bc4b10b679 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py index 14b352dfb098..e84873cd461b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCAInvoiceSectionDimensionsListWithFilter.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py index 7a472df6af05..ca424d04324c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCAInvoiceSectionQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py index 2030ca2f13a1..52ba155efcd9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/MCAInvoiceSectionQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py index 6c325487a5b9..891c15a9bd74 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -33,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/OperationList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/OperationList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py index 2450cd629150..1a34a96818ef 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -28,7 +30,7 @@ def main(): credential=DefaultAzureCredential(), ) - response = client.price_sheet.begin_download( + response = client.price_sheet.begin_download_by_invoice( billing_account_name="7c05a543-80ff-571e-9f98-1063b3b53cf2:99ad03ad-2d1b-4889-a452-090ad407d25f_2019-05-31", billing_profile_name="2USN-TPCD-BG7-TGB", invoice_name="T000940677", @@ -36,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/PricesheetDownload.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PricesheetDownload.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py index e6a64be2fa83..3b0e15d521b9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/PricesheetDownloadByBillingProfile.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PricesheetDownloadByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py index 506133cc0ef2..9672406831d5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/PrivateView.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateView.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py index 5b4bfb8a3143..4f0b165354b7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -66,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/PrivateViewCreateOrUpdate.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateViewCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py index cc5ae3b919e1..5712d18e0f8b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -33,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/PrivateViewDelete.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateViewDelete.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py index ff5ce767ac30..0b10793e9291 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -33,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/PrivateViewList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateViewList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py index 4d2c8998f9a0..76ead9159e9d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ResourceGroupAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py index d8c4c9543dc6..4c32f737c9b0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ResourceGroupDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py index 4c7ea0276418..ce8b3e3143f0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -62,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ResourceGroupForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py index e4556d516b5f..b77e257fb3b3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ResourceGroupQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py index 1d63d0bafb57..4a849390a54f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ResourceGroupQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilityprivatescheduled_action.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilityprivatescheduled_action.py index 3fe817df9a29..55573870a52f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilityprivatescheduled_action.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilityprivatescheduled_action.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/checkNameAvailability-private-scheduledAction.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/checkNameAvailability-private-scheduledAction.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilitysharedscheduled_action.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilitysharedscheduled_action.py index 3527687cfd09..2cba534dd18a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilitysharedscheduled_action.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilitysharedscheduled_action.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/checkNameAvailability-shared-scheduledAction.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/checkNameAvailability-shared-scheduledAction.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateprivate.py index eccd776b189f..d3bb5b00bd52 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateprivate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -51,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateshared.py index 957b8e9f1f5d..6c8a7c28d650 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateshared.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -53,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteprivate.py index 9f37bab8ab05..c6ce3688f44e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteprivate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -33,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-delete-private.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-delete-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteshared.py index b13e2b926cb2..fbf453691dc6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteshared.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-delete-shared.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-delete-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetprivate.py index baf04b00199f..73a9d476dc72 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetprivate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-get-private.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-get-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetshared.py index b21a8394b3cf..a5d2b12fd70a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetshared.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-get-shared.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-get-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioninsight_alertcreate_or_updateshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioninsight_alertcreate_or_updateshared.py index fa047b3903d5..09efab59a275 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioninsight_alertcreate_or_updateshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioninsight_alertcreate_or_updateshared.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -52,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowprivate.py index 602e727e9ef5..b6111c765747 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowprivate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -33,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-sendNow-private.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-sendNow-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowshared.py index 72401f901922..4153a4fb1cbf 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowshared.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-sendNow-shared.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-sendNow-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filterprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filterprivate.py index 229644b5997f..8ff22dab0b8d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filterprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filterprivate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -33,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledActions-listWithFilter-private.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-listWithFilter-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filtershared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filtershared.py index 9815805b19a2..373d4ed622d3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filtershared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filtershared.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledActions-listWithFilter-shared.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-listWithFilter-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistprivate.py index 7e1bb07a89f8..073a871e1635 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistprivate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -33,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledActions-list-private.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-list-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistshared.py index 1ce7057cf63c..af54313ef407 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistshared.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledActions-list-shared.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-list-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py new file mode 100644 index 000000000000..42aef7af432b --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py @@ -0,0 +1,41 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python settingdelete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + client.settings.delete_by_scope( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + type="taginheritance", + ) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/setting-delete.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py new file mode 100644 index 000000000000..7bb4df45adb0 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python settingget.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.settings.get_by_scope( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + type="taginheritance", + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/setting-get.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py new file mode 100644 index 000000000000..9103b8270c4d --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py @@ -0,0 +1,41 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python settings_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.settings.list( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/settingsList.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py new file mode 100644 index 000000000000..2b143f9c7fed --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py @@ -0,0 +1,43 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.costmanagement import CostManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-costmanagement +# USAGE + python settingscreate_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CostManagementClient( + credential=DefaultAzureCredential(), + ) + + response = client.settings.create_or_update_by_scope( + scope="subscriptions/00000000-0000-0000-0000-000000000000", + type="taginheritance", + setting={"kind": "taginheritance", "properties": {"preferContainerTags": False}}, + ) + print(response) + + +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/settings-createOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py index 9d9f5742c791..3347192fc6d1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/SingleResourceGroupAlert.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SingleResourceGroupAlert.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py index 3a504fe6fdb2..554674fa9fc9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/SingleSubscriptionAlert.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SingleSubscriptionAlert.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py index 3402e29b0f72..5fa74358490b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/SubscriptionAlerts.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py index 7c82f57ea2ff..b6ed50dece32 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/SubscriptionDimensionsList.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py index 63c6ba54de7c..43492864c30f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -62,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/SubscriptionForecast.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py index a80a9cb721c8..e332ab4c55aa 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -58,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/SubscriptionQuery.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py index 90f56b4f701e..88061351299c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -43,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/SubscriptionQueryGrouping.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py index 8ebf3ed7deec..623956ffc0b5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ViewByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py index 0c0f6a148b5b..e6b8e7474a97 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -67,6 +69,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ViewCreateOrUpdateByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewCreateOrUpdateByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py index 351d43f8c2f8..6443a534a816 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -34,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ViewDeleteByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewDeleteByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py index 13608bc5eb00..5fc394880d9d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.costmanagement import CostManagementClient """ @@ -35,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/ViewListByResourceGroup.json +# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py new file mode 100644 index 000000000000..2c1c2a183ef0 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + costmanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + costmanagement_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + costmanagement_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + costmanagement_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=costmanagement_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=costmanagement_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=costmanagement_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=costmanagement_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py new file mode 100644 index 000000000000..a64cd8d406a2 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementAlertsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alerts_list(self, resource_group): + response = self.client.alerts.list( + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alerts_get(self, resource_group): + response = self.client.alerts.get( + scope="str", + alert_id="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alerts_dismiss(self, resource_group): + response = self.client.alerts.dismiss( + scope="str", + alert_id="str", + parameters={ + "closeTime": "str", + "costEntityId": "str", + "creationTime": "str", + "definition": {"category": "str", "criteria": "str", "type": "str"}, + "description": "str", + "details": { + "amount": 0.0, + "companyName": "str", + "contactEmails": ["str"], + "contactGroups": ["str"], + "contactRoles": ["str"], + "currentSpend": 0.0, + "departmentName": "str", + "enrollmentEndDate": "str", + "enrollmentNumber": "str", + "enrollmentStartDate": "str", + "invoicingThreshold": 0.0, + "meterFilter": [{}], + "operator": "str", + "overridingAlert": "str", + "periodStartDate": "str", + "resourceFilter": [{}], + "resourceGroupFilter": [{}], + "tagFilter": {}, + "threshold": 0.0, + "timeGrainType": "str", + "triggeredBy": "str", + "unit": "str", + }, + "modificationTime": "str", + "source": "str", + "status": "str", + "statusModificationTime": "str", + "statusModificationUserName": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alerts_list_external(self, resource_group): + response = self.client.alerts.list_external( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py new file mode 100644 index 000000000000..29ae48233d26 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementAlertsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alerts_list(self, resource_group): + response = await self.client.alerts.list( + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alerts_get(self, resource_group): + response = await self.client.alerts.get( + scope="str", + alert_id="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alerts_dismiss(self, resource_group): + response = await self.client.alerts.dismiss( + scope="str", + alert_id="str", + parameters={ + "closeTime": "str", + "costEntityId": "str", + "creationTime": "str", + "definition": {"category": "str", "criteria": "str", "type": "str"}, + "description": "str", + "details": { + "amount": 0.0, + "companyName": "str", + "contactEmails": ["str"], + "contactGroups": ["str"], + "contactRoles": ["str"], + "currentSpend": 0.0, + "departmentName": "str", + "enrollmentEndDate": "str", + "enrollmentNumber": "str", + "enrollmentStartDate": "str", + "invoicingThreshold": 0.0, + "meterFilter": [{}], + "operator": "str", + "overridingAlert": "str", + "periodStartDate": "str", + "resourceFilter": [{}], + "resourceGroupFilter": [{}], + "tagFilter": {}, + "threshold": 0.0, + "timeGrainType": "str", + "triggeredBy": "str", + "unit": "str", + }, + "modificationTime": "str", + "source": "str", + "status": "str", + "statusModificationTime": "str", + "statusModificationUserName": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alerts_list_external(self, resource_group): + response = await self.client.alerts.list_external( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py new file mode 100644 index 000000000000..3e9eb702e3c5 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementBenefitRecommendationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_benefit_recommendations_list(self, resource_group): + response = self.client.benefit_recommendations.list( + billing_scope="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py new file mode 100644 index 000000000000..f217374a011c --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementBenefitRecommendationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_benefit_recommendations_list(self, resource_group): + response = self.client.benefit_recommendations.list( + billing_scope="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py new file mode 100644 index 000000000000..38d53ef6ed4e --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementBenefitUtilizationSummariesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_benefit_utilization_summaries_list_by_billing_account_id(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_billing_account_id( + billing_account_id="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_benefit_utilization_summaries_list_by_billing_profile_id(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_billing_profile_id( + billing_account_id="str", + billing_profile_id="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_benefit_utilization_summaries_list_by_savings_plan_order(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_savings_plan_order( + savings_plan_order_id="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_benefit_utilization_summaries_list_by_savings_plan_id(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_savings_plan_id( + savings_plan_order_id="str", + savings_plan_id="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py new file mode 100644 index 000000000000..80c112de8c0b --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementBenefitUtilizationSummariesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_benefit_utilization_summaries_list_by_billing_account_id(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_billing_account_id( + billing_account_id="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_benefit_utilization_summaries_list_by_billing_profile_id(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_billing_profile_id( + billing_account_id="str", + billing_profile_id="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_benefit_utilization_summaries_list_by_savings_plan_order(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_savings_plan_order( + savings_plan_order_id="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_benefit_utilization_summaries_list_by_savings_plan_id(self, resource_group): + response = self.client.benefit_utilization_summaries.list_by_savings_plan_id( + savings_plan_order_id="str", + savings_plan_id="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py new file mode 100644 index 000000000000..a79b86cf9aba --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementBudgetsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_budgets_list(self, resource_group): + response = self.client.budgets.list( + scope="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_budgets_get(self, resource_group): + response = self.client.budgets.get( + scope="str", + budget_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_budgets_create_or_update(self, resource_group): + response = self.client.budgets.create_or_update( + scope="str", + budget_name="str", + parameters={ + "amount": 0.0, + "category": "str", + "currentSpend": {"amount": 0.0, "unit": "str"}, + "eTag": "str", + "filter": { + "and": [ + { + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + } + ], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "forecastSpend": {"amount": 0.0, "unit": "str"}, + "id": "str", + "name": "str", + "notifications": { + "str": { + "contactEmails": ["str"], + "enabled": bool, + "operator": "str", + "threshold": 0.0, + "contactGroups": ["str"], + "contactRoles": ["str"], + "frequency": "str", + "locale": "str", + "thresholdType": "Actual", + } + }, + "timeGrain": "str", + "timePeriod": {"startDate": "2020-02-20 00:00:00", "endDate": "2020-02-20 00:00:00"}, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_budgets_delete(self, resource_group): + response = self.client.budgets.delete( + scope="str", + budget_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py new file mode 100644 index 000000000000..87032c317642 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementBudgetsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_budgets_list(self, resource_group): + response = self.client.budgets.list( + scope="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_budgets_get(self, resource_group): + response = await self.client.budgets.get( + scope="str", + budget_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_budgets_create_or_update(self, resource_group): + response = await self.client.budgets.create_or_update( + scope="str", + budget_name="str", + parameters={ + "amount": 0.0, + "category": "str", + "currentSpend": {"amount": 0.0, "unit": "str"}, + "eTag": "str", + "filter": { + "and": [ + { + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + } + ], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "forecastSpend": {"amount": 0.0, "unit": "str"}, + "id": "str", + "name": "str", + "notifications": { + "str": { + "contactEmails": ["str"], + "enabled": bool, + "operator": "str", + "threshold": 0.0, + "contactGroups": ["str"], + "contactRoles": ["str"], + "frequency": "str", + "locale": "str", + "thresholdType": "Actual", + } + }, + "timeGrain": "str", + "timePeriod": {"startDate": "2020-02-20 00:00:00", "endDate": "2020-02-20 00:00:00"}, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_budgets_delete(self, resource_group): + response = await self.client.budgets.delete( + scope="str", + budget_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py new file mode 100644 index 000000000000..e3ef9498db0a --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementCostAllocationRulesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cost_allocation_rules_list(self, resource_group): + response = self.client.cost_allocation_rules.list( + billing_account_id="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cost_allocation_rules_check_name_availability(self, resource_group): + response = self.client.cost_allocation_rules.check_name_availability( + billing_account_id="str", + cost_allocation_rule_check_name_availability_request={"name": "str", "type": "str"}, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cost_allocation_rules_get(self, resource_group): + response = self.client.cost_allocation_rules.get( + billing_account_id="str", + rule_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cost_allocation_rules_create_or_update(self, resource_group): + response = self.client.cost_allocation_rules.create_or_update( + billing_account_id="str", + rule_name="str", + cost_allocation_rule={ + "id": "str", + "name": "str", + "properties": { + "details": { + "sourceResources": [{"name": "str", "resourceType": "str", "values": ["str"]}], + "targetResources": [ + { + "name": "str", + "policyType": "str", + "resourceType": "str", + "values": [{"name": "str", "percentage": 0.0}], + } + ], + }, + "status": "str", + "createdDate": "2020-02-20 00:00:00", + "description": "str", + "updatedDate": "2020-02-20 00:00:00", + }, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cost_allocation_rules_delete(self, resource_group): + response = self.client.cost_allocation_rules.delete( + billing_account_id="str", + rule_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py new file mode 100644 index 000000000000..5f71ccf25b7a --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementCostAllocationRulesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cost_allocation_rules_list(self, resource_group): + response = self.client.cost_allocation_rules.list( + billing_account_id="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cost_allocation_rules_check_name_availability(self, resource_group): + response = await self.client.cost_allocation_rules.check_name_availability( + billing_account_id="str", + cost_allocation_rule_check_name_availability_request={"name": "str", "type": "str"}, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cost_allocation_rules_get(self, resource_group): + response = await self.client.cost_allocation_rules.get( + billing_account_id="str", + rule_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cost_allocation_rules_create_or_update(self, resource_group): + response = await self.client.cost_allocation_rules.create_or_update( + billing_account_id="str", + rule_name="str", + cost_allocation_rule={ + "id": "str", + "name": "str", + "properties": { + "details": { + "sourceResources": [{"name": "str", "resourceType": "str", "values": ["str"]}], + "targetResources": [ + { + "name": "str", + "policyType": "str", + "resourceType": "str", + "values": [{"name": "str", "percentage": 0.0}], + } + ], + }, + "status": "str", + "createdDate": "2020-02-20 00:00:00", + "description": "str", + "updatedDate": "2020-02-20 00:00:00", + }, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cost_allocation_rules_delete(self, resource_group): + response = await self.client.cost_allocation_rules.delete( + billing_account_id="str", + rule_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py new file mode 100644 index 000000000000..c2ab92061b8c --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementDimensionsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_dimensions_list(self, resource_group): + response = self.client.dimensions.list( + scope="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_dimensions_by_external_cloud_provider_type(self, resource_group): + response = self.client.dimensions.by_external_cloud_provider_type( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py new file mode 100644 index 000000000000..900c5b7c1bfe --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementDimensionsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_dimensions_list(self, resource_group): + response = self.client.dimensions.list( + scope="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_dimensions_by_external_cloud_provider_type(self, resource_group): + response = self.client.dimensions.by_external_cloud_provider_type( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py new file mode 100644 index 000000000000..0ff2f55fc9cc --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py @@ -0,0 +1,195 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementExportsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_exports_list(self, resource_group): + response = self.client.exports.list( + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_exports_get(self, resource_group): + response = self.client.exports.get( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_exports_create_or_update(self, resource_group): + response = self.client.exports.create_or_update( + scope="str", + export_name="str", + parameters={ + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], + }, + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", + "type": "str", + } + }, + "eTag": "str", + "exportDescription": "str", + "format": "str", + "id": "str", + "identity": {"type": "str", "principalId": "str", "tenantId": "str"}, + "location": "str", + "name": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": { + "value": [ + { + "eTag": "str", + "endDate": "2020-02-20 00:00:00", + "error": {"code": "str", "message": "str"}, + "executionType": "str", + "fileName": "str", + "id": "str", + "manifestFile": "str", + "name": "str", + "processingEndTime": "2020-02-20 00:00:00", + "processingStartTime": "2020-02-20 00:00:00", + "runSettings": { + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], + }, + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", + "type": "str", + } + }, + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "exportDescription": "str", + "format": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": ..., + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, + }, + "startDate": "2020-02-20 00:00:00", + "status": "str", + "submittedBy": "str", + "submittedTime": "2020-02-20 00:00:00", + "type": "str", + } + ] + }, + "schedule": { + "recurrence": "str", + "recurrencePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "status": "str", + }, + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_exports_delete(self, resource_group): + response = self.client.exports.delete( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_exports_execute(self, resource_group): + response = self.client.exports.execute( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_exports_get_execution_history(self, resource_group): + response = self.client.exports.get_execution_history( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py new file mode 100644 index 000000000000..7463fe375704 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py @@ -0,0 +1,196 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementExportsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_exports_list(self, resource_group): + response = await self.client.exports.list( + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_exports_get(self, resource_group): + response = await self.client.exports.get( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_exports_create_or_update(self, resource_group): + response = await self.client.exports.create_or_update( + scope="str", + export_name="str", + parameters={ + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], + }, + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", + "type": "str", + } + }, + "eTag": "str", + "exportDescription": "str", + "format": "str", + "id": "str", + "identity": {"type": "str", "principalId": "str", "tenantId": "str"}, + "location": "str", + "name": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": { + "value": [ + { + "eTag": "str", + "endDate": "2020-02-20 00:00:00", + "error": {"code": "str", "message": "str"}, + "executionType": "str", + "fileName": "str", + "id": "str", + "manifestFile": "str", + "name": "str", + "processingEndTime": "2020-02-20 00:00:00", + "processingStartTime": "2020-02-20 00:00:00", + "runSettings": { + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], + }, + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", + "type": "str", + } + }, + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "exportDescription": "str", + "format": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": ..., + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, + }, + "startDate": "2020-02-20 00:00:00", + "status": "str", + "submittedBy": "str", + "submittedTime": "2020-02-20 00:00:00", + "type": "str", + } + ] + }, + "schedule": { + "recurrence": "str", + "recurrencePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "status": "str", + }, + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_exports_delete(self, resource_group): + response = await self.client.exports.delete( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_exports_execute(self, resource_group): + response = await self.client.exports.execute( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_exports_get_execution_history(self, resource_group): + response = await self.client.exports.get_execution_history( + scope="str", + export_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py new file mode 100644 index 000000000000..ab491fdf9d0c --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementForecastOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_forecast_usage(self, resource_group): + response = self.client.forecast.usage( + scope="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + }, + "timeframe": "str", + "type": "str", + "includeActualCost": bool, + "includeFreshPartialCost": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_forecast_external_cloud_provider_usage(self, resource_group): + response = self.client.forecast.external_cloud_provider_usage( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + }, + "timeframe": "str", + "type": "str", + "includeActualCost": bool, + "includeFreshPartialCost": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py new file mode 100644 index 000000000000..499757ca3c14 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementForecastOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_forecast_usage(self, resource_group): + response = await self.client.forecast.usage( + scope="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + }, + "timeframe": "str", + "type": "str", + "includeActualCost": bool, + "includeFreshPartialCost": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_forecast_external_cloud_provider_usage(self, resource_group): + response = await self.client.forecast.external_cloud_provider_usage( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + }, + "timeframe": "str", + "type": "str", + "includeActualCost": bool, + "includeFreshPartialCost": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py new file mode 100644 index 000000000000..08729137fe9c --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py @@ -0,0 +1,150 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateBenefitUtilizationSummariesReportOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_benefit_utilization_summaries_report_begin_generate_by_billing_account(self, resource_group): + response = self.client.generate_benefit_utilization_summaries_report.begin_generate_by_billing_account( + billing_account_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_benefit_utilization_summaries_report_begin_generate_by_billing_profile(self, resource_group): + response = self.client.generate_benefit_utilization_summaries_report.begin_generate_by_billing_profile( + billing_account_id="str", + billing_profile_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_benefit_utilization_summaries_report_begin_generate_by_reservation_order_id(self, resource_group): + response = self.client.generate_benefit_utilization_summaries_report.begin_generate_by_reservation_order_id( + reservation_order_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_benefit_utilization_summaries_report_begin_generate_by_reservation_id(self, resource_group): + response = self.client.generate_benefit_utilization_summaries_report.begin_generate_by_reservation_id( + reservation_order_id="str", + reservation_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_benefit_utilization_summaries_report_begin_generate_by_savings_plan_order_id( + self, resource_group + ): + response = self.client.generate_benefit_utilization_summaries_report.begin_generate_by_savings_plan_order_id( + savings_plan_order_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_benefit_utilization_summaries_report_begin_generate_by_savings_plan_id(self, resource_group): + response = self.client.generate_benefit_utilization_summaries_report.begin_generate_by_savings_plan_id( + savings_plan_order_id="str", + savings_plan_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py new file mode 100644 index 000000000000..cbfb48e50721 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py @@ -0,0 +1,171 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateBenefitUtilizationSummariesReportOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_benefit_utilization_summaries_report_begin_generate_by_billing_account( + self, resource_group + ): + response = await ( + await self.client.generate_benefit_utilization_summaries_report.begin_generate_by_billing_account( + billing_account_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_benefit_utilization_summaries_report_begin_generate_by_billing_profile( + self, resource_group + ): + response = await ( + await self.client.generate_benefit_utilization_summaries_report.begin_generate_by_billing_profile( + billing_account_id="str", + billing_profile_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_benefit_utilization_summaries_report_begin_generate_by_reservation_order_id( + self, resource_group + ): + response = await ( + await self.client.generate_benefit_utilization_summaries_report.begin_generate_by_reservation_order_id( + reservation_order_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_benefit_utilization_summaries_report_begin_generate_by_reservation_id(self, resource_group): + response = await ( + await self.client.generate_benefit_utilization_summaries_report.begin_generate_by_reservation_id( + reservation_order_id="str", + reservation_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_benefit_utilization_summaries_report_begin_generate_by_savings_plan_order_id( + self, resource_group + ): + response = await ( + await self.client.generate_benefit_utilization_summaries_report.begin_generate_by_savings_plan_order_id( + savings_plan_order_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_benefit_utilization_summaries_report_begin_generate_by_savings_plan_id( + self, resource_group + ): + response = await ( + await self.client.generate_benefit_utilization_summaries_report.begin_generate_by_savings_plan_id( + savings_plan_order_id="str", + savings_plan_id="str", + benefit_utilization_summaries_request={ + "endDate": "2020-02-20 00:00:00", + "grain": "str", + "startDate": "2020-02-20 00:00:00", + "benefitId": "str", + "benefitOrderId": "str", + "billingAccountId": "str", + "billingProfileId": "str", + "kind": "str", + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py new file mode 100644 index 000000000000..b88cb1d4b646 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateCostDetailsReportOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_cost_details_report_begin_create_operation(self, resource_group): + response = self.client.generate_cost_details_report.begin_create_operation( + scope="str", + parameters={ + "billingPeriod": "str", + "invoiceId": "str", + "metric": "str", + "timePeriod": {"end": "str", "start": "str"}, + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_cost_details_report_begin_get_operation_results(self, resource_group): + response = self.client.generate_cost_details_report.begin_get_operation_results( + scope="str", + operation_id="str", + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py new file mode 100644 index 000000000000..3384534c4b49 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateCostDetailsReportOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_cost_details_report_begin_create_operation(self, resource_group): + response = await ( + await self.client.generate_cost_details_report.begin_create_operation( + scope="str", + parameters={ + "billingPeriod": "str", + "invoiceId": "str", + "metric": "str", + "timePeriod": {"end": "str", "start": "str"}, + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_cost_details_report_begin_get_operation_results(self, resource_group): + response = await ( + await self.client.generate_cost_details_report.begin_get_operation_results( + scope="str", + operation_id="str", + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py new file mode 100644 index 000000000000..b73b183006a1 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateDetailedCostReportOperationResultsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_detailed_cost_report_operation_results_begin_get(self, resource_group): + response = self.client.generate_detailed_cost_report_operation_results.begin_get( + operation_id="str", + scope="str", + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py new file mode 100644 index 000000000000..f0da10ed3c4a --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateDetailedCostReportOperationResultsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_detailed_cost_report_operation_results_begin_get(self, resource_group): + response = await ( + await self.client.generate_detailed_cost_report_operation_results.begin_get( + operation_id="str", + scope="str", + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py new file mode 100644 index 000000000000..c03bfd09eb56 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateDetailedCostReportOperationStatusOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_detailed_cost_report_operation_status_get(self, resource_group): + response = self.client.generate_detailed_cost_report_operation_status.get( + operation_id="str", + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py new file mode 100644 index 000000000000..2916a88a8d69 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateDetailedCostReportOperationStatusOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_detailed_cost_report_operation_status_get(self, resource_group): + response = await self.client.generate_detailed_cost_report_operation_status.get( + operation_id="str", + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py new file mode 100644 index 000000000000..b07e20892fa8 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateDetailedCostReportOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_detailed_cost_report_begin_create_operation(self, resource_group): + response = self.client.generate_detailed_cost_report.begin_create_operation( + scope="str", + parameters={ + "billingPeriod": "str", + "customerId": "str", + "invoiceId": "str", + "metric": "str", + "timePeriod": {"end": "str", "start": "str"}, + }, + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py new file mode 100644 index 000000000000..bc8f3f45925a --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateDetailedCostReportOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_detailed_cost_report_begin_create_operation(self, resource_group): + response = await ( + await self.client.generate_detailed_cost_report.begin_create_operation( + scope="str", + parameters={ + "billingPeriod": "str", + "customerId": "str", + "invoiceId": "str", + "metric": "str", + "timePeriod": {"end": "str", "start": "str"}, + }, + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py new file mode 100644 index 000000000000..2afdb3b724ff --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateReservationDetailsReportOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_reservation_details_report_begin_by_billing_account_id(self, resource_group): + response = self.client.generate_reservation_details_report.begin_by_billing_account_id( + billing_account_id="str", + start_date="str", + end_date="str", + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_reservation_details_report_begin_by_billing_profile_id(self, resource_group): + response = self.client.generate_reservation_details_report.begin_by_billing_profile_id( + billing_account_id="str", + billing_profile_id="str", + start_date="str", + end_date="str", + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py new file mode 100644 index 000000000000..78e55e8d7e68 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementGenerateReservationDetailsReportOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_reservation_details_report_begin_by_billing_account_id(self, resource_group): + response = await ( + await self.client.generate_reservation_details_report.begin_by_billing_account_id( + billing_account_id="str", + start_date="str", + end_date="str", + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_reservation_details_report_begin_by_billing_profile_id(self, resource_group): + response = await ( + await self.client.generate_reservation_details_report.begin_by_billing_profile_id( + billing_account_id="str", + billing_profile_id="str", + start_date="str", + end_date="str", + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py new file mode 100644 index 000000000000..432fbc920016 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_list(self, resource_group): + response = self.client.operations.list( + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py new file mode 100644 index 000000000000..e25b38cebefd --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operations_list(self, resource_group): + response = self.client.operations.list( + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py new file mode 100644 index 000000000000..5a79057b26bc --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementPriceSheetOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_price_sheet_begin_download_by_invoice(self, resource_group): + response = self.client.price_sheet.begin_download_by_invoice( + billing_account_name="str", + billing_profile_name="str", + invoice_name="str", + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_price_sheet_begin_download_by_billing_profile(self, resource_group): + response = self.client.price_sheet.begin_download_by_billing_profile( + billing_account_name="str", + billing_profile_name="str", + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_price_sheet_begin_download_by_billing_account(self, resource_group): + response = self.client.price_sheet.begin_download_by_billing_account( + billing_account_id="str", + billing_period_name="str", + api_version="2025-03-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py new file mode 100644 index 000000000000..9a565538e55d --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementPriceSheetOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_price_sheet_begin_download_by_invoice(self, resource_group): + response = await ( + await self.client.price_sheet.begin_download_by_invoice( + billing_account_name="str", + billing_profile_name="str", + invoice_name="str", + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_price_sheet_begin_download_by_billing_profile(self, resource_group): + response = await ( + await self.client.price_sheet.begin_download_by_billing_profile( + billing_account_name="str", + billing_profile_name="str", + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_price_sheet_begin_download_by_billing_account(self, resource_group): + response = await ( + await self.client.price_sheet.begin_download_by_billing_account( + billing_account_id="str", + billing_period_name="str", + api_version="2025-03-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py new file mode 100644 index 000000000000..a862de2b6829 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementQueryOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_query_usage(self, resource_group): + response = self.client.query.usage( + scope="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + }, + "timeframe": "str", + "type": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_query_usage_by_external_cloud_provider_type(self, resource_group): + response = self.client.query.usage_by_external_cloud_provider_type( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + }, + "timeframe": "str", + "type": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py new file mode 100644 index 000000000000..ab6ff14ba6fa --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementQueryOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_query_usage(self, resource_group): + response = await self.client.query.usage( + scope="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + }, + "timeframe": "str", + "type": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_query_usage_by_external_cloud_provider_type(self, resource_group): + response = await self.client.query.usage_by_external_cloud_provider_type( + external_cloud_provider_type="str", + external_cloud_provider_id="str", + parameters={ + "dataset": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + }, + "timeframe": "str", + "type": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py new file mode 100644 index 000000000000..619ca700b2b5 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py @@ -0,0 +1,229 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementScheduledActionsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_list(self, resource_group): + response = self.client.scheduled_actions.list( + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_list_by_scope(self, resource_group): + response = self.client.scheduled_actions.list_by_scope( + scope="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_create_or_update(self, resource_group): + response = self.client.scheduled_actions.create_or_update( + name="str", + scheduled_action={ + "displayName": "str", + "eTag": "str", + "fileDestination": {"fileFormats": ["str"]}, + "id": "str", + "kind": "str", + "name": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "notificationEmail": "str", + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "scope": "str", + "status": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "viewId": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_get(self, resource_group): + response = self.client.scheduled_actions.get( + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_delete(self, resource_group): + response = self.client.scheduled_actions.delete( + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_create_or_update_by_scope(self, resource_group): + response = self.client.scheduled_actions.create_or_update_by_scope( + scope="str", + name="str", + scheduled_action={ + "displayName": "str", + "eTag": "str", + "fileDestination": {"fileFormats": ["str"]}, + "id": "str", + "kind": "str", + "name": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "notificationEmail": "str", + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "scope": "str", + "status": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "viewId": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_get_by_scope(self, resource_group): + response = self.client.scheduled_actions.get_by_scope( + scope="str", + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_delete_by_scope(self, resource_group): + response = self.client.scheduled_actions.delete_by_scope( + scope="str", + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_run(self, resource_group): + response = self.client.scheduled_actions.run( + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_run_by_scope(self, resource_group): + response = self.client.scheduled_actions.run_by_scope( + scope="str", + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_check_name_availability(self, resource_group): + response = self.client.scheduled_actions.check_name_availability( + check_name_availability_request={"name": "str", "type": "str"}, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_check_name_availability_by_scope(self, resource_group): + response = self.client.scheduled_actions.check_name_availability_by_scope( + scope="str", + check_name_availability_request={"name": "str", "type": "str"}, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py new file mode 100644 index 000000000000..91697fff70a8 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py @@ -0,0 +1,230 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementScheduledActionsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_list(self, resource_group): + response = self.client.scheduled_actions.list( + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_list_by_scope(self, resource_group): + response = self.client.scheduled_actions.list_by_scope( + scope="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_create_or_update(self, resource_group): + response = await self.client.scheduled_actions.create_or_update( + name="str", + scheduled_action={ + "displayName": "str", + "eTag": "str", + "fileDestination": {"fileFormats": ["str"]}, + "id": "str", + "kind": "str", + "name": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "notificationEmail": "str", + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "scope": "str", + "status": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "viewId": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_get(self, resource_group): + response = await self.client.scheduled_actions.get( + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_delete(self, resource_group): + response = await self.client.scheduled_actions.delete( + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_create_or_update_by_scope(self, resource_group): + response = await self.client.scheduled_actions.create_or_update_by_scope( + scope="str", + name="str", + scheduled_action={ + "displayName": "str", + "eTag": "str", + "fileDestination": {"fileFormats": ["str"]}, + "id": "str", + "kind": "str", + "name": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "notificationEmail": "str", + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "scope": "str", + "status": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "viewId": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_get_by_scope(self, resource_group): + response = await self.client.scheduled_actions.get_by_scope( + scope="str", + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_delete_by_scope(self, resource_group): + response = await self.client.scheduled_actions.delete_by_scope( + scope="str", + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_run(self, resource_group): + response = await self.client.scheduled_actions.run( + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_run_by_scope(self, resource_group): + response = await self.client.scheduled_actions.run_by_scope( + scope="str", + name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_check_name_availability(self, resource_group): + response = await self.client.scheduled_actions.check_name_availability( + check_name_availability_request={"name": "str", "type": "str"}, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_check_name_availability_by_scope(self, resource_group): + response = await self.client.scheduled_actions.check_name_availability_by_scope( + scope="str", + check_name_availability_request={"name": "str", "type": "str"}, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py new file mode 100644 index 000000000000..637dc5f9caf0 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementSettingsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_settings_list(self, resource_group): + response = self.client.settings.list( + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_settings_create_or_update_by_scope(self, resource_group): + response = self.client.settings.create_or_update_by_scope( + scope="str", + type="str", + setting={ + "kind": "taginheritance", + "id": "str", + "name": "str", + "properties": {"preferContainerTags": bool}, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_settings_get_by_scope(self, resource_group): + response = self.client.settings.get_by_scope( + scope="str", + type="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_settings_delete_by_scope(self, resource_group): + response = self.client.settings.delete_by_scope( + scope="str", + type="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py new file mode 100644 index 000000000000..913586d98497 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementSettingsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_settings_list(self, resource_group): + response = await self.client.settings.list( + scope="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_settings_create_or_update_by_scope(self, resource_group): + response = await self.client.settings.create_or_update_by_scope( + scope="str", + type="str", + setting={ + "kind": "taginheritance", + "id": "str", + "name": "str", + "properties": {"preferContainerTags": bool}, + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_settings_get_by_scope(self, resource_group): + response = await self.client.settings.get_by_scope( + scope="str", + type="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_settings_delete_by_scope(self, resource_group): + response = await self.client.settings.delete_by_scope( + scope="str", + type="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py new file mode 100644 index 000000000000..9783935e971b --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementViewsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_list(self, resource_group): + response = self.client.views.list( + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_list_by_scope(self, resource_group): + response = self.client.views.list_by_scope( + scope="str", + api_version="2025-03-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_get(self, resource_group): + response = self.client.views.get( + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_create_or_update(self, resource_group): + response = self.client.views.create_or_update( + view_name="str", + parameters={ + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "dateRange": "str", + "displayName": "str", + "eTag": "str", + "id": "str", + "includeMonetaryCommitment": bool, + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "name": "str", + "pivots": [{"name": "str", "type": "str"}], + "scope": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "timeframe": "str", + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_delete(self, resource_group): + response = self.client.views.delete( + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_get_by_scope(self, resource_group): + response = self.client.views.get_by_scope( + scope="str", + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_create_or_update_by_scope(self, resource_group): + response = self.client.views.create_or_update_by_scope( + scope="str", + view_name="str", + parameters={ + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "dateRange": "str", + "displayName": "str", + "eTag": "str", + "id": "str", + "includeMonetaryCommitment": bool, + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "name": "str", + "pivots": [{"name": "str", "type": "str"}], + "scope": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "timeframe": "str", + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_delete_by_scope(self, resource_group): + response = self.client.views.delete_by_scope( + scope="str", + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py new file mode 100644 index 000000000000..81be82c607dc --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.costmanagement.aio import CostManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCostManagementViewsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CostManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_list(self, resource_group): + response = self.client.views.list( + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_list_by_scope(self, resource_group): + response = self.client.views.list_by_scope( + scope="str", + api_version="2025-03-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_get(self, resource_group): + response = await self.client.views.get( + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_create_or_update(self, resource_group): + response = await self.client.views.create_or_update( + view_name="str", + parameters={ + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "dateRange": "str", + "displayName": "str", + "eTag": "str", + "id": "str", + "includeMonetaryCommitment": bool, + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "name": "str", + "pivots": [{"name": "str", "type": "str"}], + "scope": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "timeframe": "str", + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_delete(self, resource_group): + response = await self.client.views.delete( + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_get_by_scope(self, resource_group): + response = await self.client.views.get_by_scope( + scope="str", + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_create_or_update_by_scope(self, resource_group): + response = await self.client.views.create_or_update_by_scope( + scope="str", + view_name="str", + parameters={ + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "dateRange": "str", + "displayName": "str", + "eTag": "str", + "id": "str", + "includeMonetaryCommitment": bool, + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "name": "str", + "pivots": [{"name": "str", "type": "str"}], + "scope": "str", + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "timeframe": "str", + "type": "str", + }, + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_delete_by_scope(self, resource_group): + response = await self.client.views.delete_by_scope( + scope="str", + view_name="str", + api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml b/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml index 540da07d41af..c5098ca61f99 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml +++ b/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml @@ -1,6 +1,89 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-costmanagement" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Costmanagement Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.costmanagement._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-costmanagement" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Cost Management" +package_doc_id = "" +is_stable = true +is_arm = true +title = "CostManagementClient" +no_sub = true +need_msrestazure = false +need_azuremgmtcore = true +sample_link = "" +exclude_folders = "" diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/sdk_packaging.toml b/sdk/costmanagement/azure-mgmt-costmanagement/sdk_packaging.toml deleted file mode 100644 index 0b4a31f4196f..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/sdk_packaging.toml +++ /dev/null @@ -1,9 +0,0 @@ -[packaging] -package_name = "azure-mgmt-costmanagement" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "Cost Management" -package_doc_id = "" -is_stable = true -is_arm = true -title = "CostManagementClient" -no_sub = true diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/setup.py b/sdk/costmanagement/azure-mgmt-costmanagement/setup.py deleted file mode 100644 index bdcf90a92b53..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-costmanagement" -PACKAGE_PPRINT_NAME = "Cost Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate<1.0.0,>=0.6.1", - "azure-common~=1.1", - "azure-mgmt-core>=1.3.2,<2.0.0", - "typing-extensions>=4.3.0; python_version<'3.8.0'", - ], - python_requires=">=3.7", -) From 9205a1b175eccaa6cca9d561bdaceb3521b8f89d Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 25 May 2026 16:08:33 +0800 Subject: [PATCH 2/5] generated from typespec:7089f3d2a4ed7e765d66f5f5e3be0b8b1eed6c1a --- .../azure-mgmt-costmanagement/_metadata.json | 15 +- .../apiview-properties.json | 721 +- .../azure/mgmt/costmanagement/__init__.py | 4 +- ...{_cost_management_client.py => _client.py} | 121 +- .../mgmt/costmanagement/_configuration.py | 18 +- .../azure/mgmt/costmanagement/_patch.py | 13 +- .../mgmt/costmanagement/_utils/__init__.py | 2 +- .../mgmt/costmanagement/_utils/model_base.py | 1755 + .../costmanagement/_utils/serialization.py | 31 +- .../azure/mgmt/costmanagement/_utils/utils.py | 40 + .../azure/mgmt/costmanagement/_version.py | 3 +- .../azure/mgmt/costmanagement/aio/__init__.py | 4 +- ...{_cost_management_client.py => _client.py} | 121 +- .../mgmt/costmanagement/aio/_configuration.py | 18 +- .../azure/mgmt/costmanagement/aio/_patch.py | 13 +- .../costmanagement/aio/operations/__init__.py | 59 +- .../aio/operations/_alerts_operations.py | 452 - .../_benefit_recommendations_operations.py | 169 - ...enefit_utilization_summaries_operations.py | 464 - .../aio/operations/_budgets_operations.py | 707 - .../_cost_allocation_rules_operations.py | 525 - .../aio/operations/_dimensions_operations.py | 301 - .../aio/operations/_exports_operations.py | 737 - .../aio/operations/_forecast_operations.py | 424 - ...utilization_summaries_report_operations.py | 1344 - ...generate_cost_details_report_operations.py | 413 - ...ost_report_operation_results_operations.py | 172 - ...cost_report_operation_status_operations.py | 114 - ...enerate_detailed_cost_report_operations.py | 270 - ...e_reservation_details_report_operations.py | 323 - .../aio/operations/_operations.py | 9375 ++- .../costmanagement/aio/operations/_patch.py | 13 +- .../aio/operations/_price_sheet_operations.py | 460 - .../aio/operations/_query_operations.py | 375 - .../_scheduled_actions_operations.py | 1245 - .../aio/operations/_settings_operations.py | 386 - .../aio/operations/_views_operations.py | 814 - .../mgmt/costmanagement/models/__init__.py | 70 +- ...t_management_client_enums.py => _enums.py} | 290 +- .../mgmt/costmanagement/models/_models.py | 7521 ++ .../mgmt/costmanagement/models/_models_py3.py | 7961 -- .../mgmt/costmanagement/models/_patch.py | 13 +- .../costmanagement/operations/__init__.py | 59 +- .../operations/_alerts_operations.py | 560 - .../_benefit_recommendations_operations.py | 208 - ...enefit_utilization_summaries_operations.py | 614 - .../operations/_budgets_operations.py | 815 - .../_cost_allocation_rules_operations.py | 667 - .../operations/_dimensions_operations.py | 390 - .../operations/_exports_operations.py | 891 - .../operations/_forecast_operations.py | 496 - ...utilization_summaries_report_operations.py | 1534 - ...generate_cost_details_report_operations.py | 464 - ...ost_report_operation_results_operations.py | 199 - ...cost_report_operation_status_operations.py | 139 - ...enerate_detailed_cost_report_operations.py | 299 - ...e_reservation_details_report_operations.py | 385 - .../costmanagement/operations/_operations.py | 11317 ++- .../mgmt/costmanagement/operations/_patch.py | 13 +- .../operations/_price_sheet_operations.py | 563 - .../operations/_query_operations.py | 441 - .../_scheduled_actions_operations.py | 1541 - .../operations/_settings_operations.py | 489 - .../operations/_views_operations.py | 1005 - .../code_report_typespec.json | 60191 ++++++++++++++++ ...efit_recommendations_by_billing_account.py | 5 +- .../billing_account_alerts.py | 7 +- .../billing_account_budgets_list_ea.py | 5 +- ...nt_budgets_list_ea_category_type_filter.py | 5 +- .../billing_account_budgets_list_mca.py | 4 +- ...t_budgets_list_mca_category_type_filter.py | 4 +- .../billing_account_dimensions_list.py | 5 +- ..._account_dimensions_list_expand_and_top.py | 5 +- ...ing_account_dimensions_list_with_filter.py | 5 +- .../ea => }/billing_account_ea_alert_rule.py | 5 +- ...unt_ea_alert_rule_reservation_id_filter.py | 4 +- ...lert_rule_reserved_resource_type_filter.py | 4 +- .../billing_account_forecast.py | 5 +- .../billing_account_query.py | 5 +- .../billing_account_query_grouping.py | 5 +- .../mca => }/billing_profile_alert_rule.py | 4 +- ...rofile_alert_rule_reservation_id_filter.py | 4 +- ...lert_rule_reserved_resource_type_filter.py | 4 +- .../billing_profile_alerts.py | 7 +- .../mca => }/billing_profile_budgets_list.py | 4 +- ...ofile_budgets_list_category_type_filter.py | 4 +- .../billing_profile_forecast.py | 5 +- ...ame_availabilityprivatescheduled_action.py | 5 +- ...name_availabilitysharedscheduled_action.py | 5 +- ...allocation_rule_check_name_availability.py | 5 +- .../cost_allocation_rule_create.py | 5 +- .../cost_allocation_rule_create_tag.py | 5 +- .../cost_allocation_rule_delete.py | 5 +- .../cost_allocation_rule_get.py | 5 +- .../cost_allocation_rules_list.py | 5 +- ...operation_results_by_subscription_scope.py | 5 +- ...eate_or_update_cost_subscription_budget.py | 4 +- .../mca => }/customer_alert_rule.py | 4 +- ...stomer_alert_rule_reservation_id_filter.py | 4 +- ...lert_rule_reserved_resource_type_filter.py | 4 +- .../list/mca => }/customer_budgets_list.py | 4 +- ...tomer_budgets_list_category_type_filter.py | 4 +- .../{budgets/delete => }/delete_budget.py | 5 +- .../generated_samples/department_alerts.py | 5 +- .../list/ea => }/department_budgets_list.py | 5 +- .../department_dimensions_list.py | 5 +- ...partment_dimensions_list_expand_and_top.py | 5 +- .../department_dimensions_list_with_filter.py | 5 +- .../generated_samples/department_forecast.py | 5 +- .../generated_samples/department_query.py | 5 +- .../department_query_grouping.py | 5 +- .../dismiss_resource_group_alerts.py | 5 +- .../dismiss_subscription_alerts.py | 5 +- .../ea_price_sheet_for_billing_period.py | 5 +- .../enrollment_account_alerts.py | 5 +- .../enrollment_account_budgets_list.py | 5 +- .../enrollment_account_dimensions_list.py | 5 +- ..._account_dimensions_list_expand_and_top.py | 5 +- ...ent_account_dimensions_list_with_filter.py | 5 +- .../enrollment_account_forecast.py | 5 +- .../enrollment_account_query.py | 5 +- .../enrollment_account_query_grouping.py | 5 +- ...ort_create_or_update_by_billing_account.py | 4 +- ...ate_or_update_by_billing_account_custom.py | 4 +- ...te_or_update_by_billing_account_monthly.py | 4 +- ...or_update_by_billing_account_pricesheet.py | 4 +- ..._by_billing_account_reservation_details.py | 4 +- ...ling_account_reservation_recommendation.py | 4 +- ...illing_account_reservation_transactions.py | 4 +- .../export_create_or_update_by_department.py | 4 +- ..._create_or_update_by_enrollment_account.py | 4 +- ...rt_create_or_update_by_management_group.py | 4 +- ...port_create_or_update_by_resource_group.py | 4 +- ...export_create_or_update_by_subscription.py | 4 +- .../export_delete_by_billing_account.py | 5 +- .../export_delete_by_department.py | 5 +- .../export_delete_by_enrollment_account.py | 5 +- .../export_delete_by_management_group.py | 5 +- .../export_delete_by_resource_group.py | 5 +- .../export_delete_by_subscription.py | 5 +- .../export_get_by_billing_account.py | 5 +- .../export_get_by_department.py | 5 +- .../export_get_by_enrollment_account.py | 5 +- .../export_get_by_management_group.py | 5 +- .../export_get_by_resource_group.py | 5 +- .../export_get_by_subscription.py | 5 +- .../export_run_by_billing_account.py | 5 +- ...ling_account_with_optional_request_body.py | 5 +- .../export_run_by_department.py | 5 +- .../export_run_by_enrollment_account.py | 5 +- .../export_run_by_management_group.py | 5 +- .../export_run_by_resource_group.py | 5 +- .../export_run_by_subscription.py | 5 +- ...port_run_history_get_by_billing_account.py | 5 +- .../export_run_history_get_by_department.py | 5 +- ...t_run_history_get_by_enrollment_account.py | 5 +- ...ort_run_history_get_by_management_group.py | 5 +- ...xport_run_history_get_by_resource_group.py | 5 +- .../export_run_history_get_by_subscription.py | 5 +- .../exports_get_by_billing_account.py | 5 +- .../exports_get_by_department.py | 5 +- .../exports_get_by_enrollment_account.py | 5 +- .../exports_get_by_management_group.py | 5 +- .../exports_get_by_resource_group.py | 5 +- .../exports_get_by_subscription.py | 5 +- .../external_billing_account_alerts.py | 5 +- .../external_billing_account_forecast.py | 5 +- .../external_billing_accounts_dimensions.py | 5 +- .../external_billing_accounts_query.py | 5 +- .../external_subscription_alerts.py | 5 +- .../external_subscription_forecast.py | 5 +- .../external_subscriptions_dimensions.py | 5 +- .../external_subscriptions_query.py | 5 +- ...ion_summaries_report_by_billing_account.py | 4 +- ...ion_summaries_report_by_billing_profile.py | 4 +- ...ization_summaries_report_by_reservation.py | 4 +- ...n_summaries_report_by_reservation_order.py | 4 +- ...zation_summaries_report_by_savings_plan.py | 4 +- ..._summaries_report_by_savings_plan_order.py | 4 +- ...e_agreement_customer_and_billing_period.py | 4 +- ...eport_by_billing_profile_and_invoice_id.py | 5 +- ..._profile_and_invoice_id_and_customer_id.py | 5 +- ...ails_report_by_customer_and_time_period.py | 5 +- ...s_report_by_departments_and_time_period.py | 5 +- ..._by_enrollment_accounts_and_time_period.py | 5 +- ..._report_by_subscription_and_time_period.py | 5 +- ...lling_account_legacy_and_billing_period.py | 5 +- ...eport_by_billing_profile_and_invoice_id.py | 5 +- ..._profile_and_invoice_id_and_customer_id.py | 5 +- ...cost_report_by_customer_and_time_period.py | 5 +- ..._report_by_subscription_and_time_period.py | 5 +- ...operation_results_by_subscription_scope.py | 5 +- ..._operation_status_by_subscription_scope.py | 5 +- ...ation_details_report_by_billing_account.py | 5 +- ...ation_details_report_by_billing_profile.py | 5 +- .../{budgets/get/cost => }/get_cost_budget.py | 5 +- .../get_reservation_utilization_alert_rule.py | 4 +- .../invoice_section_alerts.py | 5 +- .../mca => }/invoice_section_budgets_list.py | 4 +- .../invoice_section_forecast.py | 5 +- .../management_group_budgets_list.py | 5 +- .../management_group_dimensions_list.py | 5 +- ...nt_group_dimensions_list_expand_and_top.py | 5 +- ...ement_group_dimensions_list_with_filter.py | 5 +- .../management_group_query.py | 5 +- .../management_group_query_grouping.py | 5 +- .../mca_billing_account_dimensions_list.py | 5 +- ..._account_dimensions_list_expand_and_top.py | 5 +- ...ing_account_dimensions_list_with_filter.py | 5 +- .../mca_billing_account_query.py | 5 +- .../mca_billing_account_query_grouping.py | 5 +- .../mca_billing_profile_dimensions_list.py | 5 +- ..._profile_dimensions_list_expand_and_top.py | 5 +- ...ing_profile_dimensions_list_with_filter.py | 5 +- .../mca_billing_profile_query.py | 5 +- .../mca_billing_profile_query_grouping.py | 5 +- .../mca_customer_dimensions_list.py | 5 +- ...customer_dimensions_list_expand_and_top.py | 5 +- ...ca_customer_dimensions_list_with_filter.py | 5 +- .../generated_samples/mca_customer_query.py | 5 +- .../mca_customer_query_grouping.py | 5 +- .../mca_invoice_section_dimensions_list.py | 5 +- ..._section_dimensions_list_expand_and_top.py | 5 +- ...ice_section_dimensions_list_with_filter.py | 5 +- .../mca_invoice_section_query.py | 5 +- .../mca_invoice_section_query_grouping.py | 5 +- .../generated_samples/operation_list.py | 5 +- .../generated_samples/pricesheet_download.py | 5 +- .../pricesheet_download_by_billing_profile.py | 5 +- .../generated_samples/private_view.py | 5 +- .../private_view_create_or_update.py | 4 +- .../generated_samples/private_view_delete.py | 5 +- .../generated_samples/private_view_list.py | 5 +- .../resource_group_alerts.py | 5 +- .../rbac => }/resource_group_budgets_list.py | 5 +- .../resource_group_dimensions_list.py | 5 +- .../resource_group_forecast.py | 5 +- .../generated_samples/resource_group_query.py | 5 +- .../resource_group_query_grouping.py | 5 +- .../savings_plan_billing_account.py | 5 +- .../savings_plan_billing_profile.py | 5 +- .../savings_plan_savings_plan_id_monthly.py | 5 +- ...avings_plan_savings_plan_order_id_daily.py | 5 +- ...scheduled_actioncreate_or_updateprivate.py | 5 +- .../scheduled_actioncreate_or_updateshared.py | 5 +- .../scheduled_actiondeleteprivate.py | 5 +- .../scheduled_actiondeleteshared.py | 5 +- .../scheduled_actiongetprivate.py | 5 +- .../scheduled_actiongetshared.py | 5 +- ...tioninsight_alertcreate_or_updateshared.py | 5 +- .../scheduled_actionsend_nowprivate.py | 5 +- .../scheduled_actionsend_nowshared.py | 5 +- ...cheduled_actionslist_with_filterprivate.py | 5 +- ...scheduled_actionslist_with_filtershared.py | 5 +- .../scheduled_actionslistprivate.py | 5 +- .../scheduled_actionslistshared.py | 5 +- .../generated_samples/settingdelete.py | 5 +- .../generated_samples/settingget.py | 5 +- .../generated_samples/settings_list.py | 5 +- .../settingscreate_or_update.py | 5 +- .../single_resource_group_alert.py | 5 +- .../single_subscription_alert.py | 5 +- .../generated_samples/subscription_alerts.py | 5 +- .../rbac => }/subscription_budgets_list.py | 5 +- .../subscription_dimensions_list.py | 5 +- .../subscription_forecast.py | 5 +- .../generated_samples/subscription_query.py | 5 +- .../subscription_query_grouping.py | 5 +- .../view_by_resource_group.py | 5 +- ...view_create_or_update_by_resource_group.py | 4 +- .../view_delete_by_resource_group.py | 5 +- .../view_list_by_resource_group.py | 5 +- .../generated_tests/conftest.py | 2 +- .../test_cost_management_alerts_operations.py | 94 +- ...cost_management_alerts_operations_async.py | 94 +- ...ment_benefit_recommendations_operations.py | 3 +- ...enefit_recommendations_operations_async.py | 3 +- ...enefit_utilization_summaries_operations.py | 6 +- ..._utilization_summaries_operations_async.py | 6 +- ...test_cost_management_budgets_operations.py | 92 +- ...ost_management_budgets_operations_async.py | 92 +- ...gement_cost_allocation_rules_operations.py | 57 +- ..._cost_allocation_rules_operations_async.py | 57 +- ...t_cost_management_dimensions_operations.py | 4 +- ..._management_dimensions_operations_async.py | 4 +- ...test_cost_management_exports_operations.py | 224 +- ...ost_management_exports_operations_async.py | 224 +- ...est_cost_management_forecast_operations.py | 4 +- ...st_management_forecast_operations_async.py | 4 +- ...utilization_summaries_report_operations.py | 8 +- ...ation_summaries_report_operations_async.py | 8 +- ...generate_cost_details_report_operations.py | 26 +- ...te_cost_details_report_operations_async.py | 26 +- ...ost_report_operation_results_operations.py | 3 +- ...port_operation_results_operations_async.py | 3 +- ...cost_report_operation_status_operations.py | 3 +- ...eport_operation_status_operations_async.py | 3 +- ...enerate_detailed_cost_report_operations.py | 3 +- ...e_detailed_cost_report_operations_async.py | 3 +- ...e_reservation_details_report_operations.py | 4 +- ...rvation_details_report_operations_async.py | 4 +- .../test_cost_management_operations.py | 6 +- .../test_cost_management_operations_async.py | 6 +- ..._cost_management_price_sheet_operations.py | 5 +- ...management_price_sheet_operations_async.py | 5 +- .../test_cost_management_query_operations.py | 4 +- ..._cost_management_query_operations_async.py | 4 +- ...management_scheduled_actions_operations.py | 163 +- ...ment_scheduled_actions_operations_async.py | 163 +- ...est_cost_management_settings_operations.py | 28 +- ...st_management_settings_operations_async.py | 28 +- .../test_cost_management_views_operations.py | 181 +- ..._cost_management_views_operations_async.py | 181 +- .../azure-mgmt-costmanagement/pyproject.toml | 3 +- .../tsp-location.yaml | 4 + 315 files changed, 92383 insertions(+), 31619 deletions(-) rename sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/{_cost_management_client.py => _client.py} (89%) create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/model_base.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/utils.py rename sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/{_cost_management_client.py => _client.py} (90%) delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py rename sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/{_cost_management_client_enums.py => _enums.py} (77%) create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py delete mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/code_report_typespec.json rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/ea => }/billing_account_budgets_list_ea.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/ea => }/billing_account_budgets_list_ea_category_type_filter.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/mca => }/billing_account_budgets_list_mca.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/mca => }/billing_account_budgets_list_mca_category_type_filter.py (84%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/ea => }/billing_account_ea_alert_rule.py (86%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/ea => }/billing_account_ea_alert_rule_reservation_id_filter.py (89%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/ea => }/billing_account_ea_alert_rule_reserved_resource_type_filter.py (89%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/mca => }/billing_profile_alert_rule.py (89%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/mca => }/billing_profile_alert_rule_reservation_id_filter.py (90%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/mca => }/billing_profile_alert_rule_reserved_resource_type_filter.py (89%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/mca => }/billing_profile_budgets_list.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/mca => }/billing_profile_budgets_list_category_type_filter.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/check_name_availabilityprivatescheduled_action.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/check_name_availabilitysharedscheduled_action.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/cost => }/create_or_update_cost_subscription_budget.py (92%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/mca => }/customer_alert_rule.py (89%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/mca => }/customer_alert_rule_reservation_id_filter.py (90%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/create_or_update/reservation_utilization/mca => }/customer_alert_rule_reserved_resource_type_filter.py (89%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/mca => }/customer_budgets_list.py (86%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/mca => }/customer_budgets_list_category_type_filter.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/delete => }/delete_budget.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/ea => }/department_budgets_list.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/ea => }/enrollment_account_budgets_list.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries/async => }/generate_benefit_utilization_summaries_report_by_billing_account.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries/async => }/generate_benefit_utilization_summaries_report_by_billing_profile.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries/async => }/generate_benefit_utilization_summaries_report_by_reservation.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries/async => }/generate_benefit_utilization_summaries_report_by_reservation_order.py (84%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries/async => }/generate_benefit_utilization_summaries_report_by_savings_plan.py (85%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries/async => }/generate_benefit_utilization_summaries_report_by_savings_plan_order.py (84%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/get/cost => }/get_cost_budget.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/get/reservation_utilization => }/get_reservation_utilization_alert_rule.py (84%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/mca => }/invoice_section_budgets_list.py (86%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/rbac => }/management_group_budgets_list.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/rbac => }/resource_group_budgets_list.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries => }/savings_plan_billing_account.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries => }/savings_plan_billing_profile.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries => }/savings_plan_savings_plan_id_monthly.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{benefit_utilization_summaries => }/savings_plan_savings_plan_order_id_daily.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actioncreate_or_updateprivate.py (87%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actioncreate_or_updateshared.py (87%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actiondeleteprivate.py (80%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actiondeleteshared.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actiongetprivate.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actiongetshared.py (82%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actioninsight_alertcreate_or_updateshared.py (86%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actionsend_nowprivate.py (80%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actionsend_nowshared.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actionslist_with_filterprivate.py (80%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actionslist_with_filtershared.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actionslistprivate.py (80%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{scheduled_actions => }/scheduled_actionslistshared.py (81%) rename sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/{budgets/list/rbac => }/subscription_budgets_list.py (81%) create mode 100644 sdk/costmanagement/azure-mgmt-costmanagement/tsp-location.yaml diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json b/sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json index 55726a3f53d8..fa27e9426667 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json +++ b/sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json @@ -1,11 +1,10 @@ { - "commit": "79839e98308d5f290b34d60dc54fb7b11bd54377", + "apiVersion": "2025-03-01", + "apiVersions": { + "Microsoft.CostManagement": "2025-03-01" + }, + "commit": "7089f3d2a4ed7e765d66f5f5e3be0b8b1eed6c1a", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.50.0", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-costmanagement\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/readme.md" + "typespec_src": "specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement", + "emitterVersion": "0.62.1" } \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json b/sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json index 4ca91888eaef..cb2900d603e6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json +++ b/sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json @@ -1,363 +1,364 @@ { - "CrossLanguagePackageId": null, + "CrossLanguagePackageId": "Microsoft.CostManagement", "CrossLanguageDefinitionId": { - "azure.mgmt.costmanagement.models.CostManagementProxyResource": null, - "azure.mgmt.costmanagement.models.Alert": null, - "azure.mgmt.costmanagement.models.AlertPropertiesDefinition": null, - "azure.mgmt.costmanagement.models.AlertPropertiesDetails": null, - "azure.mgmt.costmanagement.models.AlertsResult": null, - "azure.mgmt.costmanagement.models.AllSavingsBenefitDetails": null, - "azure.mgmt.costmanagement.models.AllSavingsList": null, - "azure.mgmt.costmanagement.models.AsyncOperationStatusProperties": null, - "azure.mgmt.costmanagement.models.Resource": null, - "azure.mgmt.costmanagement.models.BenefitResource": null, - "azure.mgmt.costmanagement.models.BenefitRecommendationModel": null, - "azure.mgmt.costmanagement.models.BenefitRecommendationProperties": null, - "azure.mgmt.costmanagement.models.BenefitRecommendationsListResult": null, - "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesListResult": null, - "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus": null, - "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest": null, - "azure.mgmt.costmanagement.models.BenefitUtilizationSummary": null, - "azure.mgmt.costmanagement.models.BenefitUtilizationSummaryProperties": null, - "azure.mgmt.costmanagement.models.BlobInfo": null, - "azure.mgmt.costmanagement.models.Budget": null, - "azure.mgmt.costmanagement.models.BudgetComparisonExpression": null, - "azure.mgmt.costmanagement.models.BudgetFilter": null, - "azure.mgmt.costmanagement.models.BudgetFilterProperties": null, - "azure.mgmt.costmanagement.models.BudgetsListResult": null, - "azure.mgmt.costmanagement.models.BudgetTimePeriod": null, - "azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest": null, - "azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse": null, - "azure.mgmt.costmanagement.models.CommonExportProperties": null, - "azure.mgmt.costmanagement.models.CostAllocationProportion": null, - "azure.mgmt.costmanagement.models.CostAllocationResource": null, - "azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest": null, - "azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse": null, - "azure.mgmt.costmanagement.models.CostAllocationRuleDefinition": null, - "azure.mgmt.costmanagement.models.CostAllocationRuleDetails": null, - "azure.mgmt.costmanagement.models.CostAllocationRuleList": null, - "azure.mgmt.costmanagement.models.CostAllocationRuleProperties": null, - "azure.mgmt.costmanagement.models.CostDetailsOperationResults": null, - "azure.mgmt.costmanagement.models.CostDetailsTimePeriod": null, - "azure.mgmt.costmanagement.models.Operation": null, - "azure.mgmt.costmanagement.models.CostManagementOperation": null, - "azure.mgmt.costmanagement.models.CostManagementResource": null, - "azure.mgmt.costmanagement.models.CurrentSpend": null, - "azure.mgmt.costmanagement.models.Dimension": null, - "azure.mgmt.costmanagement.models.DimensionsListResult": null, - "azure.mgmt.costmanagement.models.DismissAlertPayload": null, - "azure.mgmt.costmanagement.models.DownloadURL": null, - "azure.mgmt.costmanagement.models.EAPriceSheetProperties": null, - "azure.mgmt.costmanagement.models.ErrorAdditionalInfo": null, - "azure.mgmt.costmanagement.models.ErrorDetail": null, - "azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated": null, - "azure.mgmt.costmanagement.models.ErrorDetails": null, - "azure.mgmt.costmanagement.models.ErrorDetailsWithNestedDetails": null, - "azure.mgmt.costmanagement.models.ErrorResponse": null, - "azure.mgmt.costmanagement.models.ErrorResponseAutoGenerated": null, - "azure.mgmt.costmanagement.models.ErrorResponseAutoGenerated2": null, - "azure.mgmt.costmanagement.models.ErrorResponseWithNestedDetails": null, - "azure.mgmt.costmanagement.models.Export": null, - "azure.mgmt.costmanagement.models.ExportDataset": null, - "azure.mgmt.costmanagement.models.ExportDatasetConfiguration": null, - "azure.mgmt.costmanagement.models.ExportDefinition": null, - "azure.mgmt.costmanagement.models.ExportDeliveryDestination": null, - "azure.mgmt.costmanagement.models.ExportDeliveryInfo": null, - "azure.mgmt.costmanagement.models.ExportExecutionListResult": null, - "azure.mgmt.costmanagement.models.ExportListResult": null, - "azure.mgmt.costmanagement.models.ExportProperties": null, - "azure.mgmt.costmanagement.models.ExportRecurrencePeriod": null, - "azure.mgmt.costmanagement.models.ExportRun": null, - "azure.mgmt.costmanagement.models.ExportRunRequest": null, - "azure.mgmt.costmanagement.models.ExportSchedule": null, - "azure.mgmt.costmanagement.models.ExportSuspensionContext": null, - "azure.mgmt.costmanagement.models.ExportTimePeriod": null, - "azure.mgmt.costmanagement.models.FileDestination": null, - "azure.mgmt.costmanagement.models.FilterItems": null, - "azure.mgmt.costmanagement.models.ForecastAggregation": null, - "azure.mgmt.costmanagement.models.ForecastColumn": null, - "azure.mgmt.costmanagement.models.ForecastComparisonExpression": null, - "azure.mgmt.costmanagement.models.ForecastDataset": null, - "azure.mgmt.costmanagement.models.ForecastDatasetConfiguration": null, - "azure.mgmt.costmanagement.models.ForecastDefinition": null, - "azure.mgmt.costmanagement.models.ForecastFilter": null, - "azure.mgmt.costmanagement.models.ForecastResult": null, - "azure.mgmt.costmanagement.models.ForecastSpend": null, - "azure.mgmt.costmanagement.models.ForecastTimePeriod": null, - "azure.mgmt.costmanagement.models.GenerateCostDetailsReportErrorResponse": null, - "azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition": null, - "azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition": null, - "azure.mgmt.costmanagement.models.GenerateDetailedCostReportErrorResponse": null, - "azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult": null, - "azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses": null, - "azure.mgmt.costmanagement.models.GenerateDetailedCostReportTimePeriod": null, - "azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummary": null, - "azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummaryProperties": null, - "azure.mgmt.costmanagement.models.KpiProperties": null, - "azure.mgmt.costmanagement.models.MCAPriceSheetProperties": null, - "azure.mgmt.costmanagement.models.Notification": null, - "azure.mgmt.costmanagement.models.NotificationProperties": null, - "azure.mgmt.costmanagement.models.OperationDisplay": null, - "azure.mgmt.costmanagement.models.OperationListResult": null, - "azure.mgmt.costmanagement.models.OperationStatus": null, - "azure.mgmt.costmanagement.models.OperationStatusAutoGenerated": null, - "azure.mgmt.costmanagement.models.PivotProperties": null, - "azure.mgmt.costmanagement.models.PricesheetDownloadProperties": null, - "azure.mgmt.costmanagement.models.ProxyResource": null, - "azure.mgmt.costmanagement.models.QueryAggregation": null, - "azure.mgmt.costmanagement.models.QueryColumn": null, - "azure.mgmt.costmanagement.models.QueryComparisonExpression": null, - "azure.mgmt.costmanagement.models.QueryDataset": null, - "azure.mgmt.costmanagement.models.QueryDatasetConfiguration": null, - "azure.mgmt.costmanagement.models.QueryDefinition": null, - "azure.mgmt.costmanagement.models.QueryFilter": null, - "azure.mgmt.costmanagement.models.QueryGrouping": null, - "azure.mgmt.costmanagement.models.QueryResult": null, - "azure.mgmt.costmanagement.models.QueryTimePeriod": null, - "azure.mgmt.costmanagement.models.RecommendationUsageDetails": null, - "azure.mgmt.costmanagement.models.ReportConfigAggregation": null, - "azure.mgmt.costmanagement.models.ReportConfigComparisonExpression": null, - "azure.mgmt.costmanagement.models.ReportConfigDataset": null, - "azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration": null, - "azure.mgmt.costmanagement.models.ReportConfigFilter": null, - "azure.mgmt.costmanagement.models.ReportConfigGrouping": null, - "azure.mgmt.costmanagement.models.ReportConfigSorting": null, - "azure.mgmt.costmanagement.models.ReportConfigTimePeriod": null, - "azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummary": null, - "azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummaryProperties": null, - "azure.mgmt.costmanagement.models.ScheduledActionProxyResource": null, - "azure.mgmt.costmanagement.models.ScheduledAction": null, - "azure.mgmt.costmanagement.models.ScheduledActionListResult": null, - "azure.mgmt.costmanagement.models.ScheduleProperties": null, - "azure.mgmt.costmanagement.models.Setting": null, - "azure.mgmt.costmanagement.models.SettingsListResult": null, - "azure.mgmt.costmanagement.models.SharedScopeBenefitRecommendationProperties": null, - "azure.mgmt.costmanagement.models.SingleScopeBenefitRecommendationProperties": null, - "azure.mgmt.costmanagement.models.SourceCostAllocationResource": null, - "azure.mgmt.costmanagement.models.Status": null, - "azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity": null, - "azure.mgmt.costmanagement.models.SystemData": null, - "azure.mgmt.costmanagement.models.TagInheritanceProperties": null, - "azure.mgmt.costmanagement.models.TagInheritanceSetting": null, - "azure.mgmt.costmanagement.models.TargetCostAllocationResource": null, - "azure.mgmt.costmanagement.models.View": null, - "azure.mgmt.costmanagement.models.ViewListResult": null, - "azure.mgmt.costmanagement.models.Origin": null, - "azure.mgmt.costmanagement.models.ActionType": null, - "azure.mgmt.costmanagement.models.CostAllocationResourceType": null, - "azure.mgmt.costmanagement.models.CostAllocationPolicyType": null, - "azure.mgmt.costmanagement.models.RuleStatus": null, - "azure.mgmt.costmanagement.models.BenefitKind": null, - "azure.mgmt.costmanagement.models.LookBackPeriod": null, - "azure.mgmt.costmanagement.models.Grain": null, - "azure.mgmt.costmanagement.models.Term": null, - "azure.mgmt.costmanagement.models.Scope": null, - "azure.mgmt.costmanagement.models.BudgetOperatorType": null, - "azure.mgmt.costmanagement.models.CategoryType": null, - "azure.mgmt.costmanagement.models.TimeGrainType": null, - "azure.mgmt.costmanagement.models.BudgetNotificationOperatorType": null, - "azure.mgmt.costmanagement.models.Frequency": null, - "azure.mgmt.costmanagement.models.ThresholdType": null, - "azure.mgmt.costmanagement.models.CultureCode": null, - "azure.mgmt.costmanagement.models.FilterItemNames": null, - "azure.mgmt.costmanagement.models.ExecutionType": null, - "azure.mgmt.costmanagement.models.ExecutionStatus": null, - "azure.mgmt.costmanagement.models.FormatType": null, - "azure.mgmt.costmanagement.models.DestinationType": null, - "azure.mgmt.costmanagement.models.ExportType": null, - "azure.mgmt.costmanagement.models.TimeframeType": null, - "azure.mgmt.costmanagement.models.GranularityType": null, - "azure.mgmt.costmanagement.models.DataOverwriteBehaviorType": null, - "azure.mgmt.costmanagement.models.CompressionModeType": null, - "azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType": null, - "azure.mgmt.costmanagement.models.StatusType": null, - "azure.mgmt.costmanagement.models.RecurrenceType": null, - "azure.mgmt.costmanagement.models.QueryColumnType": null, - "azure.mgmt.costmanagement.models.ReportConfigSortingType": null, - "azure.mgmt.costmanagement.models.OperatorType": null, - "azure.mgmt.costmanagement.models.KpiType": null, - "azure.mgmt.costmanagement.models.PivotType": null, - "azure.mgmt.costmanagement.models.ChartType": null, - "azure.mgmt.costmanagement.models.AccumulatedType": null, - "azure.mgmt.costmanagement.models.MetricType": null, - "azure.mgmt.costmanagement.models.ReportType": null, - "azure.mgmt.costmanagement.models.ReportTimeframeType": null, - "azure.mgmt.costmanagement.models.ReportGranularityType": null, - "azure.mgmt.costmanagement.models.FunctionType": null, - "azure.mgmt.costmanagement.models.AlertType": null, - "azure.mgmt.costmanagement.models.AlertCategory": null, - "azure.mgmt.costmanagement.models.AlertCriteria": null, - "azure.mgmt.costmanagement.models.AlertSource": null, - "azure.mgmt.costmanagement.models.AlertTimeGrainType": null, - "azure.mgmt.costmanagement.models.AlertOperator": null, - "azure.mgmt.costmanagement.models.AlertStatus": null, - "azure.mgmt.costmanagement.models.ForecastOperatorType": null, - "azure.mgmt.costmanagement.models.QueryOperatorType": null, - "azure.mgmt.costmanagement.models.FileFormat": null, - "azure.mgmt.costmanagement.models.DaysOfWeek": null, - "azure.mgmt.costmanagement.models.WeeksOfMonth": null, - "azure.mgmt.costmanagement.models.ScheduledActionKind": null, - "azure.mgmt.costmanagement.models.CreatedByType": null, - "azure.mgmt.costmanagement.models.ScheduleFrequency": null, - "azure.mgmt.costmanagement.models.ScheduledActionStatus": null, - "azure.mgmt.costmanagement.models.SettingsKind": null, - "azure.mgmt.costmanagement.models.Reason": null, - "azure.mgmt.costmanagement.models.GrainParameter": null, - "azure.mgmt.costmanagement.models.OperationStatusType": null, - "azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema": null, - "azure.mgmt.costmanagement.models.CostDetailsMetricType": null, - "azure.mgmt.costmanagement.models.CostDetailsStatusType": null, - "azure.mgmt.costmanagement.models.CostDetailsDataFormat": null, - "azure.mgmt.costmanagement.models.GenerateDetailedCostReportMetricType": null, - "azure.mgmt.costmanagement.models.ReportOperationStatusType": null, - "azure.mgmt.costmanagement.models.ExternalCloudProviderType": null, - "azure.mgmt.costmanagement.models.ForecastType": null, - "azure.mgmt.costmanagement.models.ForecastTimeframe": null, - "azure.mgmt.costmanagement.models.FunctionName": null, - "azure.mgmt.costmanagement.models.ReservationReportSchema": null, - "azure.mgmt.costmanagement.models.CheckNameAvailabilityReason": null, - "azure.mgmt.costmanagement.models.SettingType": null, - "azure.mgmt.costmanagement.operations.Operations.list": null, - "azure.mgmt.costmanagement.aio.operations.Operations.list": null, - "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.list": null, - "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.check_name_availability": null, - "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.check_name_availability": null, - "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.get": null, - "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.get": null, - "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.create_or_update": null, - "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.create_or_update": null, - "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.delete": null, - "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.delete": null, - "azure.mgmt.costmanagement.operations.BenefitRecommendationsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.BenefitRecommendationsOperations.list": null, - "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_billing_account_id": null, - "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_billing_account_id": null, - "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_billing_profile_id": null, - "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_billing_profile_id": null, - "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_order": null, - "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_order": null, - "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_id": null, - "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_id": null, - "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account": null, - "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account": null, - "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile": null, - "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile": null, - "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id": null, - "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id": null, - "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id": null, - "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id": null, - "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id": null, - "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id": null, - "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id": null, - "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id": null, - "azure.mgmt.costmanagement.operations.BudgetsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.list": null, - "azure.mgmt.costmanagement.operations.BudgetsOperations.get": null, - "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.get": null, - "azure.mgmt.costmanagement.operations.BudgetsOperations.create_or_update": null, - "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.create_or_update": null, - "azure.mgmt.costmanagement.operations.BudgetsOperations.delete": null, - "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.delete": null, - "azure.mgmt.costmanagement.operations.ExportsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.ExportsOperations.list": null, - "azure.mgmt.costmanagement.operations.ExportsOperations.get": null, - "azure.mgmt.costmanagement.aio.operations.ExportsOperations.get": null, - "azure.mgmt.costmanagement.operations.ExportsOperations.create_or_update": null, - "azure.mgmt.costmanagement.aio.operations.ExportsOperations.create_or_update": null, - "azure.mgmt.costmanagement.operations.ExportsOperations.delete": null, - "azure.mgmt.costmanagement.aio.operations.ExportsOperations.delete": null, - "azure.mgmt.costmanagement.operations.ExportsOperations.execute": null, - "azure.mgmt.costmanagement.aio.operations.ExportsOperations.execute": null, - "azure.mgmt.costmanagement.operations.ExportsOperations.get_execution_history": null, - "azure.mgmt.costmanagement.aio.operations.ExportsOperations.get_execution_history": null, - "azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations.begin_create_operation": null, - "azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations.begin_create_operation": null, - "azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations.begin_get_operation_results": null, - "azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations.begin_get_operation_results": null, - "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperations.begin_create_operation": null, - "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperations.begin_create_operation": null, - "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationResultsOperations.begin_get": null, - "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationResultsOperations.begin_get": null, - "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationStatusOperations.get": null, - "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationStatusOperations.get": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.list": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.list_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.list_by_scope": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.get": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.get": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.create_or_update": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.create_or_update": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.delete": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.delete": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.get_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.get_by_scope": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.create_or_update_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.create_or_update_by_scope": null, - "azure.mgmt.costmanagement.operations.ViewsOperations.delete_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ViewsOperations.delete_by_scope": null, - "azure.mgmt.costmanagement.operations.AlertsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.AlertsOperations.list": null, - "azure.mgmt.costmanagement.operations.AlertsOperations.get": null, - "azure.mgmt.costmanagement.aio.operations.AlertsOperations.get": null, - "azure.mgmt.costmanagement.operations.AlertsOperations.dismiss": null, - "azure.mgmt.costmanagement.aio.operations.AlertsOperations.dismiss": null, - "azure.mgmt.costmanagement.operations.AlertsOperations.list_external": null, - "azure.mgmt.costmanagement.aio.operations.AlertsOperations.list_external": null, - "azure.mgmt.costmanagement.operations.ForecastOperations.usage": null, - "azure.mgmt.costmanagement.aio.operations.ForecastOperations.usage": null, - "azure.mgmt.costmanagement.operations.ForecastOperations.external_cloud_provider_usage": null, - "azure.mgmt.costmanagement.aio.operations.ForecastOperations.external_cloud_provider_usage": null, - "azure.mgmt.costmanagement.operations.DimensionsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.DimensionsOperations.list": null, - "azure.mgmt.costmanagement.operations.DimensionsOperations.by_external_cloud_provider_type": null, - "azure.mgmt.costmanagement.aio.operations.DimensionsOperations.by_external_cloud_provider_type": null, - "azure.mgmt.costmanagement.operations.QueryOperations.usage": null, - "azure.mgmt.costmanagement.aio.operations.QueryOperations.usage": null, - "azure.mgmt.costmanagement.operations.QueryOperations.usage_by_external_cloud_provider_type": null, - "azure.mgmt.costmanagement.aio.operations.QueryOperations.usage_by_external_cloud_provider_type": null, - "azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations.begin_by_billing_account_id": null, - "azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations.begin_by_billing_account_id": null, - "azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations.begin_by_billing_profile_id": null, - "azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations.begin_by_billing_profile_id": null, - "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_invoice": null, - "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_invoice": null, - "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_billing_profile": null, - "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_billing_profile": null, - "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_billing_account": null, - "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_billing_account": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.list": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.list_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.list_by_scope": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.create_or_update": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.create_or_update": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.get": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.get": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.delete": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.delete": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.create_or_update_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.create_or_update_by_scope": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.get_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.get_by_scope": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.delete_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.delete_by_scope": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.run": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.run": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.run_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.run_by_scope": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.check_name_availability": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.check_name_availability": null, - "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.check_name_availability_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.check_name_availability_by_scope": null, - "azure.mgmt.costmanagement.operations.SettingsOperations.list": null, - "azure.mgmt.costmanagement.aio.operations.SettingsOperations.list": null, - "azure.mgmt.costmanagement.operations.SettingsOperations.create_or_update_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.SettingsOperations.create_or_update_by_scope": null, - "azure.mgmt.costmanagement.operations.SettingsOperations.get_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.SettingsOperations.get_by_scope": null, - "azure.mgmt.costmanagement.operations.SettingsOperations.delete_by_scope": null, - "azure.mgmt.costmanagement.aio.operations.SettingsOperations.delete_by_scope": null - } + "azure.mgmt.costmanagement.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.costmanagement.models.ExtensionResource": "Azure.ResourceManager.CommonTypes.ExtensionResource", + "azure.mgmt.costmanagement.models.Alert": "Microsoft.CostManagement.Alert", + "azure.mgmt.costmanagement.models.AlertProperties": "Microsoft.CostManagement.AlertProperties", + "azure.mgmt.costmanagement.models.AlertPropertiesDefinition": "Microsoft.CostManagement.AlertPropertiesDefinition", + "azure.mgmt.costmanagement.models.AlertPropertiesDetails": "Microsoft.CostManagement.AlertPropertiesDetails", + "azure.mgmt.costmanagement.models.AlertsResult": "Microsoft.CostManagement.AlertsResult", + "azure.mgmt.costmanagement.models.AllSavingsBenefitDetails": "Microsoft.CostManagement.AllSavingsBenefitDetails", + "azure.mgmt.costmanagement.models.AllSavingsList": "Microsoft.CostManagement.AllSavingsList", + "azure.mgmt.costmanagement.models.ArmErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.costmanagement.models.AsyncOperationStatusProperties": "Microsoft.CostManagement.AsyncOperationStatusProperties", + "azure.mgmt.costmanagement.models.BenefitResource": "Microsoft.CostManagement.BenefitResource", + "azure.mgmt.costmanagement.models.BenefitRecommendationModel": "Microsoft.CostManagement.BenefitRecommendationModel", + "azure.mgmt.costmanagement.models.BenefitRecommendationProperties": "Microsoft.CostManagement.BenefitRecommendationProperties", + "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationStatus", + "azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest": "Microsoft.CostManagement.BenefitUtilizationSummariesRequest", + "azure.mgmt.costmanagement.models.BenefitUtilizationSummary": "Microsoft.CostManagement.BenefitUtilizationSummary", + "azure.mgmt.costmanagement.models.BenefitUtilizationSummaryProperties": "Microsoft.CostManagement.BenefitUtilizationSummaryProperties", + "azure.mgmt.costmanagement.models.BlobInfo": "Microsoft.CostManagement.BlobInfo", + "azure.mgmt.costmanagement.models.Budget": "Microsoft.CostManagement.Budget", + "azure.mgmt.costmanagement.models.BudgetComparisonExpression": "Microsoft.CostManagement.BudgetComparisonExpression", + "azure.mgmt.costmanagement.models.BudgetFilter": "Microsoft.CostManagement.BudgetFilter", + "azure.mgmt.costmanagement.models.BudgetFilterProperties": "Microsoft.CostManagement.BudgetFilterProperties", + "azure.mgmt.costmanagement.models.BudgetProperties": "Microsoft.CostManagement.BudgetProperties", + "azure.mgmt.costmanagement.models.BudgetTimePeriod": "Microsoft.CostManagement.BudgetTimePeriod", + "azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest", + "azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse", + "azure.mgmt.costmanagement.models.CommonExportProperties": "Microsoft.CostManagement.CommonExportProperties", + "azure.mgmt.costmanagement.models.CostAllocationProportion": "Microsoft.CostManagement.CostAllocationProportion", + "azure.mgmt.costmanagement.models.CostAllocationResource": "Microsoft.CostManagement.CostAllocationResource", + "azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest": "Microsoft.CostManagement.CostAllocationRuleCheckNameAvailabilityRequest", + "azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse": "Microsoft.CostManagement.CostAllocationRuleCheckNameAvailabilityResponse", + "azure.mgmt.costmanagement.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.costmanagement.models.CostAllocationRuleDefinition": "Microsoft.CostManagement.CostAllocationRuleDefinition", + "azure.mgmt.costmanagement.models.CostAllocationRuleDetails": "Microsoft.CostManagement.CostAllocationRuleDetails", + "azure.mgmt.costmanagement.models.CostAllocationRuleProperties": "Microsoft.CostManagement.CostAllocationRuleProperties", + "azure.mgmt.costmanagement.models.CostDetailsOperationResults": "Microsoft.CostManagement.CostDetailsOperationResults", + "azure.mgmt.costmanagement.models.CostDetailsTimePeriod": "Microsoft.CostManagement.CostDetailsTimePeriod", + "azure.mgmt.costmanagement.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", + "azure.mgmt.costmanagement.models.CostManagementOperation": "Microsoft.CostManagement.CostManagementOperation", + "azure.mgmt.costmanagement.models.CostManagementProxyResource": "Microsoft.CostManagement.CostManagementProxyResource", + "azure.mgmt.costmanagement.models.CostManagementResource": "Microsoft.CostManagement.CostManagementResource", + "azure.mgmt.costmanagement.models.CurrentSpend": "Microsoft.CostManagement.CurrentSpend", + "azure.mgmt.costmanagement.models.Dimension": "Microsoft.CostManagement.Dimension", + "azure.mgmt.costmanagement.models.DimensionProperties": "Microsoft.CostManagement.DimensionProperties", + "azure.mgmt.costmanagement.models.DismissAlertPayload": "Microsoft.CostManagement.DismissAlertPayload", + "azure.mgmt.costmanagement.models.DownloadURL": "Microsoft.CostManagement.DownloadURL", + "azure.mgmt.costmanagement.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.costmanagement.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.costmanagement.models.ErrorDetails": "Microsoft.CostManagement.ErrorDetails", + "azure.mgmt.costmanagement.models.ErrorDetailsWithNestedDetails": "Microsoft.CostManagement.ErrorDetailsWithNestedDetails", + "azure.mgmt.costmanagement.models.ErrorResponse": "Microsoft.CostManagement.ErrorResponse", + "azure.mgmt.costmanagement.models.ErrorResponseWithNestedDetails": "Microsoft.CostManagement.ErrorResponseWithNestedDetails", + "azure.mgmt.costmanagement.models.Export": "Microsoft.CostManagement.Export", + "azure.mgmt.costmanagement.models.ExportDataset": "Microsoft.CostManagement.ExportDataset", + "azure.mgmt.costmanagement.models.ExportDatasetConfiguration": "Microsoft.CostManagement.ExportDatasetConfiguration", + "azure.mgmt.costmanagement.models.ExportDefinition": "Microsoft.CostManagement.ExportDefinition", + "azure.mgmt.costmanagement.models.ExportDeliveryDestination": "Microsoft.CostManagement.ExportDeliveryDestination", + "azure.mgmt.costmanagement.models.ExportDeliveryInfo": "Microsoft.CostManagement.ExportDeliveryInfo", + "azure.mgmt.costmanagement.models.ExportExecutionListResult": "Microsoft.CostManagement.ExportExecutionListResult", + "azure.mgmt.costmanagement.models.ExportListResult": "Microsoft.CostManagement.ExportListResult", + "azure.mgmt.costmanagement.models.ExportProperties": "Microsoft.CostManagement.ExportProperties", + "azure.mgmt.costmanagement.models.ExportRecurrencePeriod": "Microsoft.CostManagement.ExportRecurrencePeriod", + "azure.mgmt.costmanagement.models.ExportRun": "Microsoft.CostManagement.ExportRun", + "azure.mgmt.costmanagement.models.ExportRunProperties": "Microsoft.CostManagement.ExportRunProperties", + "azure.mgmt.costmanagement.models.ExportRunRequest": "Microsoft.CostManagement.ExportRunRequest", + "azure.mgmt.costmanagement.models.ExportSchedule": "Microsoft.CostManagement.ExportSchedule", + "azure.mgmt.costmanagement.models.ExportSuspensionContext": "Microsoft.CostManagement.ExportSuspensionContext", + "azure.mgmt.costmanagement.models.ExportTimePeriod": "Microsoft.CostManagement.ExportTimePeriod", + "azure.mgmt.costmanagement.models.FileDestination": "Microsoft.CostManagement.FileDestination", + "azure.mgmt.costmanagement.models.FilterItems": "Microsoft.CostManagement.FilterItems", + "azure.mgmt.costmanagement.models.ForecastAggregation": "Microsoft.CostManagement.ForecastAggregation", + "azure.mgmt.costmanagement.models.ForecastColumn": "Microsoft.CostManagement.ForecastColumn", + "azure.mgmt.costmanagement.models.ForecastComparisonExpression": "Microsoft.CostManagement.ForecastComparisonExpression", + "azure.mgmt.costmanagement.models.ForecastDataset": "Microsoft.CostManagement.ForecastDataset", + "azure.mgmt.costmanagement.models.ForecastDatasetConfiguration": "Microsoft.CostManagement.ForecastDatasetConfiguration", + "azure.mgmt.costmanagement.models.ForecastDefinition": "Microsoft.CostManagement.ForecastDefinition", + "azure.mgmt.costmanagement.models.ForecastFilter": "Microsoft.CostManagement.ForecastFilter", + "azure.mgmt.costmanagement.models.ForecastProperties": "Microsoft.CostManagement.ForecastProperties", + "azure.mgmt.costmanagement.models.ForecastResult": "Microsoft.CostManagement.ForecastResult", + "azure.mgmt.costmanagement.models.ForecastSpend": "Microsoft.CostManagement.ForecastSpend", + "azure.mgmt.costmanagement.models.ForecastTimePeriod": "Microsoft.CostManagement.ForecastTimePeriod", + "azure.mgmt.costmanagement.models.GenerateCostDetailsReportErrorResponse": "Microsoft.CostManagement.GenerateCostDetailsReportErrorResponse", + "azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition": "Microsoft.CostManagement.GenerateCostDetailsReportRequestDefinition", + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition": "Microsoft.CostManagement.GenerateDetailedCostReportDefinition", + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportErrorResponse": "Microsoft.CostManagement.GenerateDetailedCostReportErrorResponse", + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult": "Microsoft.CostManagement.GenerateDetailedCostReportOperationResult", + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses": "Microsoft.CostManagement.GenerateDetailedCostReportOperationStatuses", + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportTimePeriod": "Microsoft.CostManagement.GenerateDetailedCostReportTimePeriod", + "azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummary": "Microsoft.CostManagement.IncludedQuantityUtilizationSummary", + "azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummaryProperties": "Microsoft.CostManagement.IncludedQuantityUtilizationSummaryProperties", + "azure.mgmt.costmanagement.models.KpiProperties": "Microsoft.CostManagement.KpiProperties", + "azure.mgmt.costmanagement.models.MCAPriceSheetProperties": "Microsoft.CostManagement.MCAPriceSheetProperties", + "azure.mgmt.costmanagement.models.Notification": "Microsoft.CostManagement.Notification", + "azure.mgmt.costmanagement.models.NotificationProperties": "Microsoft.CostManagement.NotificationProperties", + "azure.mgmt.costmanagement.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.costmanagement.models.OperationStatus": "Microsoft.CostManagement.OperationStatus", + "azure.mgmt.costmanagement.models.PivotProperties": "Microsoft.CostManagement.PivotProperties", + "azure.mgmt.costmanagement.models.PricesheetDownloadProperties": "Microsoft.CostManagement.PricesheetDownloadProperties", + "azure.mgmt.costmanagement.models.QueryAggregation": "Microsoft.CostManagement.QueryAggregation", + "azure.mgmt.costmanagement.models.QueryColumn": "Microsoft.CostManagement.QueryColumn", + "azure.mgmt.costmanagement.models.QueryComparisonExpression": "Microsoft.CostManagement.QueryComparisonExpression", + "azure.mgmt.costmanagement.models.QueryDataset": "Microsoft.CostManagement.QueryDataset", + "azure.mgmt.costmanagement.models.QueryDatasetConfiguration": "Microsoft.CostManagement.QueryDatasetConfiguration", + "azure.mgmt.costmanagement.models.QueryDefinition": "Microsoft.CostManagement.QueryDefinition", + "azure.mgmt.costmanagement.models.QueryFilter": "Microsoft.CostManagement.QueryFilter", + "azure.mgmt.costmanagement.models.QueryGrouping": "Microsoft.CostManagement.QueryGrouping", + "azure.mgmt.costmanagement.models.QueryProperties": "Microsoft.CostManagement.QueryProperties", + "azure.mgmt.costmanagement.models.QueryResult": "Microsoft.CostManagement.QueryResult", + "azure.mgmt.costmanagement.models.QueryTimePeriod": "Microsoft.CostManagement.QueryTimePeriod", + "azure.mgmt.costmanagement.models.RecommendationUsageDetails": "Microsoft.CostManagement.RecommendationUsageDetails", + "azure.mgmt.costmanagement.models.ReportConfigAggregation": "Microsoft.CostManagement.ReportConfigAggregation", + "azure.mgmt.costmanagement.models.ReportConfigComparisonExpression": "Microsoft.CostManagement.ReportConfigComparisonExpression", + "azure.mgmt.costmanagement.models.ReportConfigDataset": "Microsoft.CostManagement.ReportConfigDataset", + "azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration": "Microsoft.CostManagement.ReportConfigDatasetConfiguration", + "azure.mgmt.costmanagement.models.ReportConfigDefinition": "Microsoft.CostManagement.ReportConfigDefinition", + "azure.mgmt.costmanagement.models.ReportConfigFilter": "Microsoft.CostManagement.ReportConfigFilter", + "azure.mgmt.costmanagement.models.ReportConfigGrouping": "Microsoft.CostManagement.ReportConfigGrouping", + "azure.mgmt.costmanagement.models.ReportConfigSorting": "Microsoft.CostManagement.ReportConfigSorting", + "azure.mgmt.costmanagement.models.ReportConfigTimePeriod": "Microsoft.CostManagement.ReportConfigTimePeriod", + "azure.mgmt.costmanagement.models.ReportManifest": "Microsoft.CostManagement.ReportManifest", + "azure.mgmt.costmanagement.models.ReportURL": "Microsoft.CostManagement.ReportURL", + "azure.mgmt.costmanagement.models.RequestContext": "Microsoft.CostManagement.RequestContext", + "azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummary": "Microsoft.CostManagement.SavingsPlanUtilizationSummary", + "azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummaryProperties": "Microsoft.CostManagement.SavingsPlanUtilizationSummaryProperties", + "azure.mgmt.costmanagement.models.ScheduledAction": "Microsoft.CostManagement.ScheduledAction", + "azure.mgmt.costmanagement.models.ScheduledActionProperties": "Microsoft.CostManagement.ScheduledActionProperties", + "azure.mgmt.costmanagement.models.ScheduleProperties": "Microsoft.CostManagement.ScheduleProperties", + "azure.mgmt.costmanagement.models.Setting": "Microsoft.CostManagement.Setting", + "azure.mgmt.costmanagement.models.SettingsListResult": "Microsoft.CostManagement.SettingsListResult", + "azure.mgmt.costmanagement.models.SharedScopeBenefitRecommendationProperties": "Microsoft.CostManagement.SharedScopeBenefitRecommendationProperties", + "azure.mgmt.costmanagement.models.SingleScopeBenefitRecommendationProperties": "Microsoft.CostManagement.SingleScopeBenefitRecommendationProperties", + "azure.mgmt.costmanagement.models.SourceCostAllocationResource": "Microsoft.CostManagement.SourceCostAllocationResource", + "azure.mgmt.costmanagement.models.Status": "Microsoft.CostManagement.Status", + "azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity": "Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentity", + "azure.mgmt.costmanagement.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.costmanagement.models.TagInheritanceProperties": "Microsoft.CostManagement.TagInheritanceProperties", + "azure.mgmt.costmanagement.models.TagInheritanceSetting": "Microsoft.CostManagement.TagInheritanceSetting", + "azure.mgmt.costmanagement.models.TargetCostAllocationResource": "Microsoft.CostManagement.TargetCostAllocationResource", + "azure.mgmt.costmanagement.models.View": "Microsoft.CostManagement.View", + "azure.mgmt.costmanagement.models.ViewProperties": "Microsoft.CostManagement.ViewProperties", + "azure.mgmt.costmanagement.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.costmanagement.models.ReportOperationStatusType": "Microsoft.CostManagement.ReportOperationStatusType", + "azure.mgmt.costmanagement.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "azure.mgmt.costmanagement.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "azure.mgmt.costmanagement.models.CategoryType": "Microsoft.CostManagement.CategoryType", + "azure.mgmt.costmanagement.models.TimeGrainType": "Microsoft.CostManagement.TimeGrainType", + "azure.mgmt.costmanagement.models.BudgetOperatorType": "Microsoft.CostManagement.BudgetOperatorType", + "azure.mgmt.costmanagement.models.BudgetNotificationOperatorType": "Microsoft.CostManagement.BudgetNotificationOperatorType", + "azure.mgmt.costmanagement.models.Frequency": "Microsoft.CostManagement.Frequency", + "azure.mgmt.costmanagement.models.ThresholdType": "Microsoft.CostManagement.ThresholdType", + "azure.mgmt.costmanagement.models.CultureCode": "Microsoft.CostManagement.CultureCode", + "azure.mgmt.costmanagement.models.FormatType": "Microsoft.CostManagement.FormatType", + "azure.mgmt.costmanagement.models.DestinationType": "Microsoft.CostManagement.DestinationType", + "azure.mgmt.costmanagement.models.ExportType": "Microsoft.CostManagement.ExportType", + "azure.mgmt.costmanagement.models.TimeframeType": "Microsoft.CostManagement.TimeframeType", + "azure.mgmt.costmanagement.models.GranularityType": "Microsoft.CostManagement.GranularityType", + "azure.mgmt.costmanagement.models.FilterItemNames": "Microsoft.CostManagement.FilterItemNames", + "azure.mgmt.costmanagement.models.ExecutionType": "Microsoft.CostManagement.ExecutionType", + "azure.mgmt.costmanagement.models.ExecutionStatus": "Microsoft.CostManagement.ExecutionStatus", + "azure.mgmt.costmanagement.models.DataOverwriteBehaviorType": "Microsoft.CostManagement.DataOverwriteBehaviorType", + "azure.mgmt.costmanagement.models.CompressionModeType": "Microsoft.CostManagement.CompressionModeType", + "azure.mgmt.costmanagement.models.StatusType": "Microsoft.CostManagement.StatusType", + "azure.mgmt.costmanagement.models.RecurrenceType": "Microsoft.CostManagement.RecurrenceType", + "azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType": "Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentityType", + "azure.mgmt.costmanagement.models.ReportType": "Microsoft.CostManagement.ReportType", + "azure.mgmt.costmanagement.models.ReportTimeframeType": "Microsoft.CostManagement.ReportTimeframeType", + "azure.mgmt.costmanagement.models.ReportGranularityType": "Microsoft.CostManagement.ReportGranularityType", + "azure.mgmt.costmanagement.models.FunctionType": "Microsoft.CostManagement.FunctionType", + "azure.mgmt.costmanagement.models.QueryColumnType": "Microsoft.CostManagement.QueryColumnType", + "azure.mgmt.costmanagement.models.ReportConfigSortingType": "Microsoft.CostManagement.ReportConfigSortingType", + "azure.mgmt.costmanagement.models.OperatorType": "Microsoft.CostManagement.OperatorType", + "azure.mgmt.costmanagement.models.ChartType": "Microsoft.CostManagement.ChartType", + "azure.mgmt.costmanagement.models.AccumulatedType": "Microsoft.CostManagement.AccumulatedType", + "azure.mgmt.costmanagement.models.MetricType": "Microsoft.CostManagement.MetricType", + "azure.mgmt.costmanagement.models.KpiTypeType": "Microsoft.CostManagement.KpiTypeType", + "azure.mgmt.costmanagement.models.PivotTypeType": "Microsoft.CostManagement.PivotTypeType", + "azure.mgmt.costmanagement.models.AlertType": "Microsoft.CostManagement.AlertType", + "azure.mgmt.costmanagement.models.AlertCategory": "Microsoft.CostManagement.AlertCategory", + "azure.mgmt.costmanagement.models.AlertCriteria": "Microsoft.CostManagement.AlertCriteria", + "azure.mgmt.costmanagement.models.AlertSource": "Microsoft.CostManagement.AlertSource", + "azure.mgmt.costmanagement.models.AlertTimeGrainType": "Microsoft.CostManagement.AlertTimeGrainType", + "azure.mgmt.costmanagement.models.AlertOperator": "Microsoft.CostManagement.AlertOperator", + "azure.mgmt.costmanagement.models.AlertStatus": "Microsoft.CostManagement.AlertStatus", + "azure.mgmt.costmanagement.models.ExternalCloudProviderType": "Microsoft.CostManagement.ExternalCloudProviderType", + "azure.mgmt.costmanagement.models.FileFormat": "Microsoft.CostManagement.FileFormat", + "azure.mgmt.costmanagement.models.ScheduleFrequency": "Microsoft.CostManagement.ScheduleFrequency", + "azure.mgmt.costmanagement.models.DaysOfWeek": "Microsoft.CostManagement.DaysOfWeek", + "azure.mgmt.costmanagement.models.WeeksOfMonth": "Microsoft.CostManagement.WeeksOfMonth", + "azure.mgmt.costmanagement.models.ScheduledActionStatus": "Microsoft.CostManagement.ScheduledActionStatus", + "azure.mgmt.costmanagement.models.ScheduledActionKind": "Microsoft.CostManagement.ScheduledActionKind", + "azure.mgmt.costmanagement.models.CheckNameAvailabilityReason": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason", + "azure.mgmt.costmanagement.models.SettingsKind": "Microsoft.CostManagement.SettingsKind", + "azure.mgmt.costmanagement.models.SettingType": "Microsoft.CostManagement.SettingType", + "azure.mgmt.costmanagement.models.CostDetailsStatusType": "Microsoft.CostManagement.CostDetailsStatusType", + "azure.mgmt.costmanagement.models.CostDetailsDataFormat": "Microsoft.CostManagement.CostDetailsDataFormat", + "azure.mgmt.costmanagement.models.CostDetailsMetricType": "Microsoft.CostManagement.CostDetailsMetricType", + "azure.mgmt.costmanagement.models.CostAllocationResourceType": "Microsoft.CostManagement.CostAllocationResourceType", + "azure.mgmt.costmanagement.models.CostAllocationPolicyType": "Microsoft.CostManagement.CostAllocationPolicyType", + "azure.mgmt.costmanagement.models.RuleStatus": "Microsoft.CostManagement.RuleStatus", + "azure.mgmt.costmanagement.models.Reason": "Microsoft.CostManagement.Reason", + "azure.mgmt.costmanagement.models.BenefitKind": "Microsoft.CostManagement.BenefitKind", + "azure.mgmt.costmanagement.models.LookBackPeriod": "Microsoft.CostManagement.LookBackPeriod", + "azure.mgmt.costmanagement.models.Grain": "Microsoft.CostManagement.Grain", + "azure.mgmt.costmanagement.models.Term": "Microsoft.CostManagement.Term", + "azure.mgmt.costmanagement.models.Scope": "Microsoft.CostManagement.Scope", + "azure.mgmt.costmanagement.models.GrainParameter": "Microsoft.CostManagement.GrainParameter", + "azure.mgmt.costmanagement.models.OperationStatusType": "Microsoft.CostManagement.OperationStatusType", + "azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema": "Microsoft.CostManagement.BenefitUtilizationSummaryReportSchema", + "azure.mgmt.costmanagement.models.GenerateDetailedCostReportMetricType": "Microsoft.CostManagement.GenerateDetailedCostReportMetricType", + "azure.mgmt.costmanagement.models.ForecastType": "Microsoft.CostManagement.ForecastType", + "azure.mgmt.costmanagement.models.ForecastTimeframe": "Microsoft.CostManagement.ForecastTimeframe", + "azure.mgmt.costmanagement.models.FunctionName": "Microsoft.CostManagement.FunctionName", + "azure.mgmt.costmanagement.models.ForecastOperatorType": "Microsoft.CostManagement.ForecastOperatorType", + "azure.mgmt.costmanagement.models.QueryOperatorType": "Microsoft.CostManagement.QueryOperatorType", + "azure.mgmt.costmanagement.models.ReservationReportSchema": "Microsoft.CostManagement.ReservationReportSchema", + "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationStatusOperations.get": "Microsoft.CostManagement.GenerateDetailedCostReportOperationStatus.get", + "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationStatusOperations.get": "Microsoft.CostManagement.GenerateDetailedCostReportOperationStatus.get", + "azure.mgmt.costmanagement.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.costmanagement.aio.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.costmanagement.operations.BudgetsOperations.get": "Microsoft.CostManagement.Budgets.get", + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.get": "Microsoft.CostManagement.Budgets.get", + "azure.mgmt.costmanagement.operations.BudgetsOperations.create_or_update": "Microsoft.CostManagement.Budgets.createOrUpdate", + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.create_or_update": "Microsoft.CostManagement.Budgets.createOrUpdate", + "azure.mgmt.costmanagement.operations.BudgetsOperations.delete": "Microsoft.CostManagement.Budgets.delete", + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.delete": "Microsoft.CostManagement.Budgets.delete", + "azure.mgmt.costmanagement.operations.BudgetsOperations.list": "Microsoft.CostManagement.Budgets.list", + "azure.mgmt.costmanagement.aio.operations.BudgetsOperations.list": "Microsoft.CostManagement.Budgets.list", + "azure.mgmt.costmanagement.operations.ExportsOperations.get": "Microsoft.CostManagement.Exports.get", + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.get": "Microsoft.CostManagement.Exports.get", + "azure.mgmt.costmanagement.operations.ExportsOperations.create_or_update": "Microsoft.CostManagement.Exports.createOrUpdate", + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.create_or_update": "Microsoft.CostManagement.Exports.createOrUpdate", + "azure.mgmt.costmanagement.operations.ExportsOperations.delete": "Microsoft.CostManagement.Exports.delete", + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.delete": "Microsoft.CostManagement.Exports.delete", + "azure.mgmt.costmanagement.operations.ExportsOperations.list": "Microsoft.CostManagement.Exports.list", + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.list": "Microsoft.CostManagement.Exports.list", + "azure.mgmt.costmanagement.operations.ExportsOperations.execute": "Microsoft.CostManagement.Exports.execute", + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.execute": "Microsoft.CostManagement.Exports.execute", + "azure.mgmt.costmanagement.operations.ExportsOperations.get_execution_history": "Microsoft.CostManagement.Exports.getExecutionHistory", + "azure.mgmt.costmanagement.aio.operations.ExportsOperations.get_execution_history": "Microsoft.CostManagement.Exports.getExecutionHistory", + "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationResultsOperations.begin_get": "Microsoft.CostManagement.GenerateDetailedCostReportOperationResults.get", + "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationResultsOperations.begin_get": "Microsoft.CostManagement.GenerateDetailedCostReportOperationResults.get", + "azure.mgmt.costmanagement.operations.ViewsOperations.get": "Microsoft.CostManagement.Views.get", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.get": "Microsoft.CostManagement.Views.get", + "azure.mgmt.costmanagement.operations.ViewsOperations.create_or_update": "Microsoft.CostManagement.Views.createOrUpdate", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.create_or_update": "Microsoft.CostManagement.Views.createOrUpdate", + "azure.mgmt.costmanagement.operations.ViewsOperations.delete": "Microsoft.CostManagement.Views.delete", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.delete": "Microsoft.CostManagement.Views.delete", + "azure.mgmt.costmanagement.operations.ViewsOperations.list": "Microsoft.CostManagement.Views.list", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.list": "Microsoft.CostManagement.Views.list", + "azure.mgmt.costmanagement.operations.ViewsOperations.get_by_scope": "Microsoft.CostManagement.ViewOperationGroup.getByScope", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.get_by_scope": "Microsoft.CostManagement.ViewOperationGroup.getByScope", + "azure.mgmt.costmanagement.operations.ViewsOperations.create_or_update_by_scope": "Microsoft.CostManagement.ViewOperationGroup.createOrUpdateByScope", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.create_or_update_by_scope": "Microsoft.CostManagement.ViewOperationGroup.createOrUpdateByScope", + "azure.mgmt.costmanagement.operations.ViewsOperations.delete_by_scope": "Microsoft.CostManagement.ViewOperationGroup.deleteByScope", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.delete_by_scope": "Microsoft.CostManagement.ViewOperationGroup.deleteByScope", + "azure.mgmt.costmanagement.operations.ViewsOperations.list_by_scope": "Microsoft.CostManagement.ViewOperationGroup.listByScope", + "azure.mgmt.costmanagement.aio.operations.ViewsOperations.list_by_scope": "Microsoft.CostManagement.ViewOperationGroup.listByScope", + "azure.mgmt.costmanagement.operations.AlertsOperations.get": "Microsoft.CostManagement.Alerts.get", + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.get": "Microsoft.CostManagement.Alerts.get", + "azure.mgmt.costmanagement.operations.AlertsOperations.dismiss": "Microsoft.CostManagement.Alerts.dismiss", + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.dismiss": "Microsoft.CostManagement.Alerts.dismiss", + "azure.mgmt.costmanagement.operations.AlertsOperations.list": "Microsoft.CostManagement.Alerts.list", + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.list": "Microsoft.CostManagement.Alerts.list", + "azure.mgmt.costmanagement.operations.AlertsOperations.list_external": "Microsoft.CostManagement.AlertsOperationGroup.listExternal", + "azure.mgmt.costmanagement.aio.operations.AlertsOperations.list_external": "Microsoft.CostManagement.AlertsOperationGroup.listExternal", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.get": "Microsoft.CostManagement.ScheduledActions.get", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.get": "Microsoft.CostManagement.ScheduledActions.get", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.create_or_update": "Microsoft.CostManagement.ScheduledActions.createOrUpdate", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.create_or_update": "Microsoft.CostManagement.ScheduledActions.createOrUpdate", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.delete": "Microsoft.CostManagement.ScheduledActions.delete", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.delete": "Microsoft.CostManagement.ScheduledActions.delete", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.list": "Microsoft.CostManagement.ScheduledActions.list", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.list": "Microsoft.CostManagement.ScheduledActions.list", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.run": "Microsoft.CostManagement.ScheduledActions.run", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.run": "Microsoft.CostManagement.ScheduledActions.run", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.get_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.getByScope", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.get_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.getByScope", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.create_or_update_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.createOrUpdateByScope", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.create_or_update_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.createOrUpdateByScope", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.delete_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.deleteByScope", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.delete_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.deleteByScope", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.list_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.listByScope", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.list_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.listByScope", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.run_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.runByScope", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.run_by_scope": "Microsoft.CostManagement.ScheduledActionOperationGroup.runByScope", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.check_name_availability": "Microsoft.CostManagement.ScheduledActionsOperationGroup.checkNameAvailability", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.check_name_availability": "Microsoft.CostManagement.ScheduledActionsOperationGroup.checkNameAvailability", + "azure.mgmt.costmanagement.operations.ScheduledActionsOperations.check_name_availability_by_scope": "Microsoft.CostManagement.ScheduledActionsOperationGroup.checkNameAvailabilityByScope", + "azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations.check_name_availability_by_scope": "Microsoft.CostManagement.ScheduledActionsOperationGroup.checkNameAvailabilityByScope", + "azure.mgmt.costmanagement.operations.SettingsOperations.get_by_scope": "Microsoft.CostManagement.Settings.getByScope", + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.get_by_scope": "Microsoft.CostManagement.Settings.getByScope", + "azure.mgmt.costmanagement.operations.SettingsOperations.create_or_update_by_scope": "Microsoft.CostManagement.Settings.createOrUpdateByScope", + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.create_or_update_by_scope": "Microsoft.CostManagement.Settings.createOrUpdateByScope", + "azure.mgmt.costmanagement.operations.SettingsOperations.delete_by_scope": "Microsoft.CostManagement.Settings.deleteByScope", + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.delete_by_scope": "Microsoft.CostManagement.Settings.deleteByScope", + "azure.mgmt.costmanagement.operations.SettingsOperations.list": "Microsoft.CostManagement.Settings.list", + "azure.mgmt.costmanagement.aio.operations.SettingsOperations.list": "Microsoft.CostManagement.Settings.list", + "azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations.begin_get_operation_results": "Microsoft.CostManagement.GenerateCostDetailsReport.getOperationResults", + "azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations.begin_get_operation_results": "Microsoft.CostManagement.GenerateCostDetailsReport.getOperationResults", + "azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations.begin_create_operation": "Microsoft.CostManagement.GenerateCostDetailsReportOperationGroup.createOperation", + "azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations.begin_create_operation": "Microsoft.CostManagement.GenerateCostDetailsReportOperationGroup.createOperation", + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.get": "Microsoft.CostManagement.CostAllocationRuleDefinitions.get", + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.get": "Microsoft.CostManagement.CostAllocationRuleDefinitions.get", + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.create_or_update": "Microsoft.CostManagement.CostAllocationRuleDefinitions.createOrUpdate", + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.create_or_update": "Microsoft.CostManagement.CostAllocationRuleDefinitions.createOrUpdate", + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.delete": "Microsoft.CostManagement.CostAllocationRuleDefinitions.delete", + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.delete": "Microsoft.CostManagement.CostAllocationRuleDefinitions.delete", + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.list": "Microsoft.CostManagement.CostAllocationRuleDefinitions.list", + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.list": "Microsoft.CostManagement.CostAllocationRuleDefinitions.list", + "azure.mgmt.costmanagement.operations.CostAllocationRulesOperations.check_name_availability": "Microsoft.CostManagement.CostAllocationRulesOperationGroup.checkNameAvailability", + "azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations.check_name_availability": "Microsoft.CostManagement.CostAllocationRulesOperationGroup.checkNameAvailability", + "azure.mgmt.costmanagement.operations.BenefitRecommendationsOperations.list": "Microsoft.CostManagement.BenefitRecommendationsOperationGroup.list", + "azure.mgmt.costmanagement.aio.operations.BenefitRecommendationsOperations.list": "Microsoft.CostManagement.BenefitRecommendationsOperationGroup.list", + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_billing_account_id": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listByBillingAccountId", + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_billing_account_id": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listByBillingAccountId", + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_billing_profile_id": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listByBillingProfileId", + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_billing_profile_id": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listByBillingProfileId", + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_order": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listBySavingsPlanOrder", + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_order": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listBySavingsPlanOrder", + "azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_id": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listBySavingsPlanId", + "azure.mgmt.costmanagement.aio.operations.BenefitUtilizationSummariesOperations.list_by_savings_plan_id": "Microsoft.CostManagement.BenefitUtilizationSummariesOperationGroup.listBySavingsPlanId", + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByBillingAccount", + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByBillingAccount", + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByBillingProfile", + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByBillingProfile", + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByReservationOrderId", + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByReservationOrderId", + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByReservationId", + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateByReservationId", + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateBySavingsPlanOrderId", + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateBySavingsPlanOrderId", + "azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateBySavingsPlanId", + "azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id": "Microsoft.CostManagement.GenerateBenefitUtilizationSummariesReportOperationGroup.generateBySavingsPlanId", + "azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperations.begin_create_operation": "Microsoft.CostManagement.GenerateDetailedCostReportOperationGroup.createOperation", + "azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperations.begin_create_operation": "Microsoft.CostManagement.GenerateDetailedCostReportOperationGroup.createOperation", + "azure.mgmt.costmanagement.operations.ForecastOperations.usage": "Microsoft.CostManagement.ForecastOperationGroup.usage", + "azure.mgmt.costmanagement.aio.operations.ForecastOperations.usage": "Microsoft.CostManagement.ForecastOperationGroup.usage", + "azure.mgmt.costmanagement.operations.ForecastOperations.external_cloud_provider_usage": "Microsoft.CostManagement.ForecastOperationGroup.externalCloudProviderUsage", + "azure.mgmt.costmanagement.aio.operations.ForecastOperations.external_cloud_provider_usage": "Microsoft.CostManagement.ForecastOperationGroup.externalCloudProviderUsage", + "azure.mgmt.costmanagement.operations.DimensionsOperations.list": "Microsoft.CostManagement.DimensionsOperationGroup.list", + "azure.mgmt.costmanagement.aio.operations.DimensionsOperations.list": "Microsoft.CostManagement.DimensionsOperationGroup.list", + "azure.mgmt.costmanagement.operations.DimensionsOperations.by_external_cloud_provider_type": "Microsoft.CostManagement.DimensionsOperationGroup.byExternalCloudProviderType", + "azure.mgmt.costmanagement.aio.operations.DimensionsOperations.by_external_cloud_provider_type": "Microsoft.CostManagement.DimensionsOperationGroup.byExternalCloudProviderType", + "azure.mgmt.costmanagement.operations.QueryOperations.usage": "Microsoft.CostManagement.QueryOperationGroup.usage", + "azure.mgmt.costmanagement.aio.operations.QueryOperations.usage": "Microsoft.CostManagement.QueryOperationGroup.usage", + "azure.mgmt.costmanagement.operations.QueryOperations.usage_by_external_cloud_provider_type": "Microsoft.CostManagement.QueryOperationGroup.usageByExternalCloudProviderType", + "azure.mgmt.costmanagement.aio.operations.QueryOperations.usage_by_external_cloud_provider_type": "Microsoft.CostManagement.QueryOperationGroup.usageByExternalCloudProviderType", + "azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations.begin_by_billing_account_id": "Microsoft.CostManagement.GenerateReservationDetailsReportOperationGroup.byBillingAccountId", + "azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations.begin_by_billing_account_id": "Microsoft.CostManagement.GenerateReservationDetailsReportOperationGroup.byBillingAccountId", + "azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations.begin_by_billing_profile_id": "Microsoft.CostManagement.GenerateReservationDetailsReportOperationGroup.byBillingProfileId", + "azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations.begin_by_billing_profile_id": "Microsoft.CostManagement.GenerateReservationDetailsReportOperationGroup.byBillingProfileId", + "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_invoice": "Microsoft.CostManagement.PriceSheetOperationGroup.downloadByInvoice", + "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_invoice": "Microsoft.CostManagement.PriceSheetOperationGroup.downloadByInvoice", + "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_billing_profile": "Microsoft.CostManagement.PriceSheetOperationGroup.downloadByBillingProfile", + "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_billing_profile": "Microsoft.CostManagement.PriceSheetOperationGroup.downloadByBillingProfile", + "azure.mgmt.costmanagement.operations.PriceSheetOperations.begin_download_by_billing_account": "Microsoft.CostManagement.PriceSheetOperationGroup.downloadByBillingAccount", + "azure.mgmt.costmanagement.aio.operations.PriceSheetOperations.begin_download_by_billing_account": "Microsoft.CostManagement.PriceSheetOperationGroup.downloadByBillingAccount" + }, + "CrossLanguageVersion": "3f79bcfc1b98" } \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py index cb3da220a6b5..9cd4def8a9a7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._cost_management_client import CostManagementClient # type: ignore +from ._client import CostManagementClient # type: ignore from ._version import VERSION __version__ = VERSION diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_client.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_client.py index 15942a93116a..fd70321934a3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_client.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from . import models as _models from ._configuration import CostManagementClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( @@ -43,6 +42,11 @@ ViewsOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -52,8 +56,31 @@ class CostManagementClient: # pylint: disable=too-many-instance-attributes """CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. + :ivar generate_detailed_cost_report_operation_status: + GenerateDetailedCostReportOperationStatusOperations operations + :vartype generate_detailed_cost_report_operation_status: + azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationStatusOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.costmanagement.operations.Operations + :ivar budgets: BudgetsOperations operations + :vartype budgets: azure.mgmt.costmanagement.operations.BudgetsOperations + :ivar exports: ExportsOperations operations + :vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations + :ivar generate_detailed_cost_report_operation_results: + GenerateDetailedCostReportOperationResultsOperations operations + :vartype generate_detailed_cost_report_operation_results: + azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationResultsOperations + :ivar views: ViewsOperations operations + :vartype views: azure.mgmt.costmanagement.operations.ViewsOperations + :ivar alerts: AlertsOperations operations + :vartype alerts: azure.mgmt.costmanagement.operations.AlertsOperations + :ivar scheduled_actions: ScheduledActionsOperations operations + :vartype scheduled_actions: azure.mgmt.costmanagement.operations.ScheduledActionsOperations + :ivar settings: SettingsOperations operations + :vartype settings: azure.mgmt.costmanagement.operations.SettingsOperations + :ivar generate_cost_details_report: GenerateCostDetailsReportOperations operations + :vartype generate_cost_details_report: + azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations :ivar cost_allocation_rules: CostAllocationRulesOperations operations :vartype cost_allocation_rules: azure.mgmt.costmanagement.operations.CostAllocationRulesOperations @@ -67,28 +94,9 @@ class CostManagementClient: # pylint: disable=too-many-instance-attributes GenerateBenefitUtilizationSummariesReportOperations operations :vartype generate_benefit_utilization_summaries_report: azure.mgmt.costmanagement.operations.GenerateBenefitUtilizationSummariesReportOperations - :ivar budgets: BudgetsOperations operations - :vartype budgets: azure.mgmt.costmanagement.operations.BudgetsOperations - :ivar exports: ExportsOperations operations - :vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations - :ivar generate_cost_details_report: GenerateCostDetailsReportOperations operations - :vartype generate_cost_details_report: - azure.mgmt.costmanagement.operations.GenerateCostDetailsReportOperations :ivar generate_detailed_cost_report: GenerateDetailedCostReportOperations operations :vartype generate_detailed_cost_report: azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperations - :ivar generate_detailed_cost_report_operation_results: - GenerateDetailedCostReportOperationResultsOperations operations - :vartype generate_detailed_cost_report_operation_results: - azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationResultsOperations - :ivar generate_detailed_cost_report_operation_status: - GenerateDetailedCostReportOperationStatusOperations operations - :vartype generate_detailed_cost_report_operation_status: - azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationStatusOperations - :ivar views: ViewsOperations operations - :vartype views: azure.mgmt.costmanagement.operations.ViewsOperations - :ivar alerts: AlertsOperations operations - :vartype alerts: azure.mgmt.costmanagement.operations.AlertsOperations :ivar forecast: ForecastOperations operations :vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations :ivar dimensions: DimensionsOperations operations @@ -101,19 +109,16 @@ class CostManagementClient: # pylint: disable=too-many-instance-attributes azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations :ivar price_sheet: PriceSheetOperations operations :vartype price_sheet: azure.mgmt.costmanagement.operations.PriceSheetOperations - :ivar scheduled_actions: ScheduledActionsOperations operations - :vartype scheduled_actions: azure.mgmt.costmanagement.operations.ScheduledActionsOperations - :ivar settings: SettingsOperations operations - :vartype settings: azure.mgmt.costmanagement.operations.SettingsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Known values are "2025-03-01" and None. Default value is None. If not + set, the operation's default API version will be used. Note that overriding this default value + may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -127,13 +132,18 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = CostManagementClientConfiguration( - credential=credential, cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs + credential=credential, + base_url=cast(str, base_url), + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) _policies = kwargs.pop("policies", None) @@ -154,41 +164,44 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False + self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.cost_allocation_rules = CostAllocationRulesOperations( + self.budgets = BudgetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.exports = ExportsOperations(self._client, self._config, self._serialize, self._deserialize) + self.generate_detailed_cost_report_operation_results = GenerateDetailedCostReportOperationResultsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.benefit_recommendations = BenefitRecommendationsOperations( + self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) + self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) + self.scheduled_actions = ScheduledActionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( + self.settings = SettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.generate_cost_details_report = GenerateCostDetailsReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_benefit_utilization_summaries_report = GenerateBenefitUtilizationSummariesReportOperations( + self.cost_allocation_rules = CostAllocationRulesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.budgets = BudgetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.exports = ExportsOperations(self._client, self._config, self._serialize, self._deserialize) - self.generate_cost_details_report = GenerateCostDetailsReportOperations( + self.benefit_recommendations = BenefitRecommendationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_detailed_cost_report = GenerateDetailedCostReportOperations( + self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_detailed_cost_report_operation_results = GenerateDetailedCostReportOperationResultsOperations( + self.generate_benefit_utilization_summaries_report = GenerateBenefitUtilizationSummariesReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations( + self.generate_detailed_cost_report = GenerateDetailedCostReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) - self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize) self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize) self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) @@ -196,18 +209,14 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize) - self.scheduled_actions = ScheduledActionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.settings = SettingsOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -220,7 +229,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py index dca14b609506..2ffd2b639691 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,18 +24,25 @@ class CostManagementClientConfiguration: # pylint: disable=too-many-instance-at Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Known values are "2025-03-01" and None. Default value is None. If not + set, the operation's default API version will be used. Note that overriding this default value + may result in unsupported behavior. :paramtype api_version: str """ def __init__( - self, credential: "TokenCredential", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any + self, + credential: "TokenCredential", + base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: api_version: str = kwargs.pop("api_version", "2025-03-01") @@ -43,6 +50,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") self.credential = credential + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py index 0af9b28f6607..8026245c2abc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/__init__.py @@ -1,6 +1,6 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/model_base.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/model_base.py new file mode 100644 index 000000000000..bd5b9caf1022 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/model_base.py @@ -0,0 +1,1755 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +from azure.core.rest import HttpResponse + +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") +_NONE_TYPE = type(None) + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + +_ARRAY_ENCODE_MAPPING = { + "pipeDelimited": "|", + "spaceDelimited": " ", + "commaDelimited": ",", + "newlineDelimited": "\n", +} + + +def _deserialize_array_encoded(delimit: str, attr): + if isinstance(attr, str): + if attr == "": + return [] + return attr.split(delimit) + return attr + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj # type: ignore[no-any-return] + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) # type: ignore[no-any-return] + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + # If this key has been deserialized (for mutable types), we need to handle serialization + if hasattr(self, "_attr_to_rest_field"): + cache_attr = f"_deserialized_{key}" + if hasattr(self, cache_attr): + rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) + if rf: + value = self._data.get(key) + if isinstance(value, (dict, list, set)): + # For mutable types, serialize and return + # But also update _data with serialized form and clear flag + # so mutations via this returned value affect _data + serialized = _serialize(value, rf._format) + # If serialized form is same type (no transformation needed), + # return _data directly so mutations work + if isinstance(serialized, type(value)) and serialized == value: + return self._data.get(key) + # Otherwise return serialized copy and clear flag + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + # Store serialized form back + self._data[key] = serialized + return serialized + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + # Clear any cached deserialized value when setting through dictionary access + cache_attr = f"_deserialized_{key}" + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): + return _ARRAY_ENCODE_MAPPING[format].join(o) + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +# ============================================================================ +# Fast-path scalar deserializer functions for rest_field(deserializer=...) +# These are referenced from rest_field declarations to bypass the generic +# _deserialize -> _deserialize_with_callable chain. +# Only simple/primitive types — no models or container types. +# ============================================================================ + + +def _xml_deser_str(value): + if isinstance(value, ET.Element): + return value.text or "" + return str(value) if value is not None else None + + +def _xml_deser_int(value): + if isinstance(value, ET.Element): + return int(value.text) if value.text else None + return int(value) if value is not None else None + + +def _xml_deser_float(value): + if isinstance(value, ET.Element): + return float(value.text) if value.text else None + return float(value) if value is not None else None + + +def _xml_deser_bool(value): + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + if text in (True, False): + return text + return text.lower() == "true" + + +# pylint: disable=docstring-missing-param +def _xml_deser_bytes(value): + """Deserialize bytes from XML (base64).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes(text) + + +def _xml_deser_bytes_base64url(value): + """Deserialize bytes from XML (base64url).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes_base64(text) + + +def _xml_deser_datetime(value): + """Deserialize a datetime from XML (ISO 8601 / rfc3339).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime(text) + + +def _xml_deser_datetime_rfc7231(value): + """Deserialize a datetime from XML (RFC7231 format).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_rfc7231(text) + + +def _xml_deser_datetime_unix_timestamp(value): + """Deserialize a datetime from XML (Unix timestamp).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_unix_timestamp(float(text)) + + +def _xml_deser_date(value): + """Deserialize a date from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_date(text) + + +def _xml_deser_time(value): + """Deserialize a time from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_time(text) + + +def _xml_deser_duration(value): + """Deserialize a timedelta from XML (ISO 8601 duration).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_duration(text) + + +def _xml_deser_decimal(value): + """Deserialize a Decimal from XML.""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_decimal(text) + + +def _xml_deser_enum_or_str(enum_cls, value): + """Deserialize a Union[EnumType, str] from XML.""" + text = value.text if isinstance(value, ET.Element) else value + if text is None: + return None + try: + return enum_cls(text) + except ValueError: + return text + + +def _extract_xml_model_type(rf_type): + """Extract the concrete Model class from a resolved rf._type partial chain. + + Unwraps ``Optional[Model]`` and ``_deserialize_model(Model, ...)`` + wrappers. Only handles Model and Optional[Model] — other composite + types (List, Dict, Union, etc.) return None and fall through to the + generic ``_deserialize`` path at runtime. + """ + if rf_type is None: + return None + if isinstance(rf_type, type) and _is_model(rf_type): + return rf_type + if not isinstance(rf_type, functools.partial): + return None + func = rf_type.func + args = rf_type.args + if func is _deserialize_with_optional and args: + return _extract_xml_model_type(args[0]) + if func is _deserialize_model and args: + cls = args[0] + return cls if isinstance(cls, type) and _is_model(cls) else None + return None + + +def _build_xml_field_plan( # pylint: disable=docstring-missing-return, docstring-missing-rtype, unused-variable + cls, attr_to_rest_field: dict +) -> list: + """Build a precomputed XML field plan for fast _init_from_xml iteration. + + Called once per model class in __new__. Returns a list of tuples: + (rest_name, xml_name, kind, deser, rf_type, is_optional, items_name) + + kind: 0=wrapped, 1=attribute, 2=unwrapped, 3=text + + For Model and Optional[Model] fields that lack a scalar + ``_deserializer``, this function precomputes the Model class as the + deserializer so ``_init_from_xml`` can call ``ModelClass(element)`` + directly instead of going through the expensive + ``_get_deserialize_callable_from_annotation`` chain at runtime. + """ + model_meta = getattr(cls, "_xml", {}) + model_ns = model_meta.get("ns") or model_meta.get("namespace") + plan = [] + + for rf in attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + deser = rf._deserializer + + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + is_optional = rf._is_optional + + # For Model / Optional[Model] fields without a scalar deserializer, + # precompute the Model class as the deserializer. + if deser is None and rf._type is not None: + model_cls = _extract_xml_model_type(rf._type) + if model_cls is not None: + deser = model_cls + + if prop_meta.get("attribute", False): + plan.append((rf._rest_name, xml_name, 1, deser, rf._type, is_optional, None)) + elif prop_meta.get("unwrapped", False): + items_name = prop_meta.get("itemsName") + if items_name: + items_ns = prop_meta.get("itemsNs") + if items_ns is not None: + xml_ns = items_ns + if xml_ns: + items_name = "{" + xml_ns + "}" + items_name + else: + items_name = xml_name + plan.append((rf._rest_name, xml_name, 2, deser, rf._type, is_optional, items_name)) + elif prop_meta.get("text", False): + plan.append((rf._rest_name, xml_name, 3, deser, rf._type, is_optional, None)) + else: + plan.append((rf._rest_name, xml_name, 0, deser, rf._type, is_optional, None)) + + return plan + + +# pylint: enable=docstring-missing-param +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass: dict[str, typing.Any] = {} + if args: + if isinstance(args[0], ET.Element): + dict_to_pass.update(self._init_from_xml(args[0])) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + # Apply client default values for fields the caller didn't set so that + # defaults are part of `_data` and therefore included during serialization. + for rf in self._attr_to_rest_field.values(): + if rf._default is _UNSET: + continue + if rf._rest_name in dict_to_pass: + continue + dict_to_pass[rf._rest_name] = _create_value(rf, rf._default) + super().__init__(dict_to_pass) + + def _init_from_xml( # pylint: disable=too-many-branches, too-many-statements + self, element: ET.Element + ) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + existed_attr_keys: list[str] = [] + + field_plan = getattr(self, "_xml_field_plan", None) + if field_plan: + for rest_name, xml_name, kind, deser, rf_type, is_optional, items_name in field_plan: + if kind == 0: # wrapped element (most common) + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(item) + else: + result[rest_name] = _deserialize(rf_type, item) + elif kind == 1: # attribute + attr_val = element.get(xml_name) + if attr_val is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(attr_val) + else: + result[rest_name] = attr_val + elif kind == 2: # unwrapped array + items = element.findall(items_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(items_name) + if deser: + result[rest_name] = deser(items) + else: + result[rest_name] = _deserialize(rf_type, items) + elif not is_optional: + existed_attr_keys.append(items_name) + result[rest_name] = [] + elif kind == 3: # text + if element.text is not None: + if deser: + result[rest_name] = deser(element.text) + else: + result[rest_name] = element.text + else: + model_meta = getattr(self, "_xml", {}) + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._backcompat_attr_to_rest_field: dict[str, _RestField] = { + Model._get_backcompat_attribute_name(cls._attr_to_rest_field, attr): rf + for attr, rf in cls._attr_to_rest_field.items() + } + # Build XML field plan for fast _init_from_xml (only for XML models) + if getattr(cls, "_xml", None): + cls._xml_field_plan = _build_xml_field_plan(cls, attr_to_rest_field) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_backcompat_attribute_name(cls, attr_to_rest_field: dict[str, "_RestField"], attr_name: str) -> str: + rest_field_obj = attr_to_rest_field.get(attr_name) # pylint: disable=protected-access + if rest_field_obj is None: + return attr_name + original_tsp_name = getattr(rest_field_obj, "_original_tsp_name", None) # pylint: disable=protected-access + if original_tsp_name: + return original_tsp_name + return attr_name + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: list[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): + return deserializer(obj) + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value.text if isinstance(value, ET.Element) else value) + except ValueError: + # for unknown value, return raw value + return value.text if isinstance(value, ET.Element) else value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), module, rf, format) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +# pylint: disable=too-many-instance-attributes +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, + original_tsp_name: typing.Optional[str] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._is_optional = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + self._deserializer = deserializer + self._original_tsp_name = original_tsp_name + + @property + def _class_type(self) -> typing.Any: + result = getattr(self._type, "args", [None])[0] + # type may be wrapped by nested functools.partial so we need to check for that + if isinstance(result, functools.partial): + return getattr(result, "args", [None])[0] + return result + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + # Use _data.get() directly to avoid triggering __getitem__ which clears the cache + item = obj._data.get(self._rest_name, _UNSET) + if item is _UNSET: + # Field not set by user; return the client default if one exists, otherwise None + return self._default if self._default is not _UNSET else None + if item is None: + return item + if self._is_model: + return item + + # For mutable types, we want mutations to directly affect _data + # Check if we've already deserialized this value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + # Return the value from _data directly (it's been deserialized in place) + return obj._data.get(self._rest_name) + + # Fast path: use _deserializer directly (avoids _serialize/_deserialize chain) + if self._deserializer: + deserialized = self._deserializer(item) + else: + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, store the deserialized value back in _data + # so mutations directly affect _data + if isinstance(deserialized, (dict, list, set)): + obj._data[self._rest_name] = deserialized + object.__setattr__(obj, cache_attr, True) # Mark as deserialized + return deserialized + + return deserialized + + def __set__(self, obj: Model, value) -> None: + # Clear the cached deserialized object when setting a new value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + object.__delattr__(obj, cache_attr) + + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, + original_tsp_name: typing.Optional[str] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + deserializer=deserializer, + original_tsp_name=original_tsp_name, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, list[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) + wrapped_element = _create_xml_element( + element_name, + model_meta.get("prefix"), + _model_ns, + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + _set_xml_attribute(wrapped_element, k, v, prop_meta) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": _dict_ns, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": _items_ns, + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[dict[str, typing.Any]], +) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element # type: ignore[no-any-return] + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + +def _create_xml_element( + tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None +) -> ET.Element: + if prefix and ns: + _safe_register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + if _is_model(deserializer): + return deserializer._deserialize(element, []) + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: list[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py index 6da830e0cf4a..a088671e9c51 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -39,11 +39,15 @@ import xml.etree.ElementTree as ET import isodate # type: ignore -from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") JSON = MutableMapping[str, Any] @@ -1401,7 +1405,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: # Otherwise, result are unexpected self.additional_properties_detection = True - def __call__(self, target_obj, response_data, content_type=None): + def __call__(self, target_obj, response_data, content_type=None): # pylint: disable=too-many-return-statements """Call the deserializer to process a REST response. :param str target_obj: Target data type to deserialize to. @@ -1411,6 +1415,27 @@ def __call__(self, target_obj, response_data, content_type=None): :return: Deserialized object. :rtype: object """ + # Fast path for header deserialization: response_data is a plain str or None + # and target_obj is a simple scalar type. This avoids the expensive + # _unpack_content → _deserialize → _classify_target → deserialize_data chain. + if response_data is None: + return None + if target_obj == "str" and isinstance(response_data, str): + return response_data + if isinstance(response_data, str): + if target_obj == "int": + return int(response_data) + if target_obj == "bool": + if response_data in ("true", "1", "True"): + return True + if response_data in ("false", "0", "False"): + return False + return bool(response_data) + if target_obj == "rfc-1123": + return Deserializer.deserialize_rfc(response_data) + if target_obj == "bytearray": + return Deserializer.deserialize_bytearray(response_data) + data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/utils.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/utils.py new file mode 100644 index 000000000000..cbaa624660e4 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/utils.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Optional + +from azure.core import MatchConditions + + +def quote_etag(etag: Optional[str]) -> Optional[str]: + if not etag or etag == "*": + return etag + if etag.startswith("W/"): + return etag + if etag.startswith('"') and etag.endswith('"'): + return etag + if etag.startswith("'") and etag.endswith("'"): + return etag + return '"' + etag + '"' + + +def prep_if_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfNotModified: + if_match = quote_etag(etag) if etag else None + return if_match + if match_condition == MatchConditions.IfPresent: + return "*" + return None + + +def prep_if_none_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfModified: + if_none_match = quote_etag(etag) if etag else None + return if_none_match + if match_condition == MatchConditions.IfMissing: + return "*" + return None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py index 97dd4a9776d7..d5259bd18589 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py @@ -2,9 +2,8 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- - VERSION = "4.1.0" diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py index 8170fcf87d3a..c451ce70d1bc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._cost_management_client import CostManagementClient # type: ignore +from ._client import CostManagementClient # type: ignore try: from ._patch import __all__ as _patch_all diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_cost_management_client.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_client.py similarity index 90% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_cost_management_client.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_client.py index ba8b8a3f4a45..70ef44d7e35b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_cost_management_client.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_client.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import CostManagementClientConfiguration from .operations import ( @@ -43,6 +42,11 @@ ViewsOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -52,8 +56,31 @@ class CostManagementClient: # pylint: disable=too-many-instance-attributes """CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. + :ivar generate_detailed_cost_report_operation_status: + GenerateDetailedCostReportOperationStatusOperations operations + :vartype generate_detailed_cost_report_operation_status: + azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationStatusOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.costmanagement.aio.operations.Operations + :ivar budgets: BudgetsOperations operations + :vartype budgets: azure.mgmt.costmanagement.aio.operations.BudgetsOperations + :ivar exports: ExportsOperations operations + :vartype exports: azure.mgmt.costmanagement.aio.operations.ExportsOperations + :ivar generate_detailed_cost_report_operation_results: + GenerateDetailedCostReportOperationResultsOperations operations + :vartype generate_detailed_cost_report_operation_results: + azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationResultsOperations + :ivar views: ViewsOperations operations + :vartype views: azure.mgmt.costmanagement.aio.operations.ViewsOperations + :ivar alerts: AlertsOperations operations + :vartype alerts: azure.mgmt.costmanagement.aio.operations.AlertsOperations + :ivar scheduled_actions: ScheduledActionsOperations operations + :vartype scheduled_actions: azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations + :ivar settings: SettingsOperations operations + :vartype settings: azure.mgmt.costmanagement.aio.operations.SettingsOperations + :ivar generate_cost_details_report: GenerateCostDetailsReportOperations operations + :vartype generate_cost_details_report: + azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations :ivar cost_allocation_rules: CostAllocationRulesOperations operations :vartype cost_allocation_rules: azure.mgmt.costmanagement.aio.operations.CostAllocationRulesOperations @@ -67,28 +94,9 @@ class CostManagementClient: # pylint: disable=too-many-instance-attributes GenerateBenefitUtilizationSummariesReportOperations operations :vartype generate_benefit_utilization_summaries_report: azure.mgmt.costmanagement.aio.operations.GenerateBenefitUtilizationSummariesReportOperations - :ivar budgets: BudgetsOperations operations - :vartype budgets: azure.mgmt.costmanagement.aio.operations.BudgetsOperations - :ivar exports: ExportsOperations operations - :vartype exports: azure.mgmt.costmanagement.aio.operations.ExportsOperations - :ivar generate_cost_details_report: GenerateCostDetailsReportOperations operations - :vartype generate_cost_details_report: - azure.mgmt.costmanagement.aio.operations.GenerateCostDetailsReportOperations :ivar generate_detailed_cost_report: GenerateDetailedCostReportOperations operations :vartype generate_detailed_cost_report: azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperations - :ivar generate_detailed_cost_report_operation_results: - GenerateDetailedCostReportOperationResultsOperations operations - :vartype generate_detailed_cost_report_operation_results: - azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationResultsOperations - :ivar generate_detailed_cost_report_operation_status: - GenerateDetailedCostReportOperationStatusOperations operations - :vartype generate_detailed_cost_report_operation_status: - azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationStatusOperations - :ivar views: ViewsOperations operations - :vartype views: azure.mgmt.costmanagement.aio.operations.ViewsOperations - :ivar alerts: AlertsOperations operations - :vartype alerts: azure.mgmt.costmanagement.aio.operations.AlertsOperations :ivar forecast: ForecastOperations operations :vartype forecast: azure.mgmt.costmanagement.aio.operations.ForecastOperations :ivar dimensions: DimensionsOperations operations @@ -101,19 +109,16 @@ class CostManagementClient: # pylint: disable=too-many-instance-attributes azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations :ivar price_sheet: PriceSheetOperations operations :vartype price_sheet: azure.mgmt.costmanagement.aio.operations.PriceSheetOperations - :ivar scheduled_actions: ScheduledActionsOperations operations - :vartype scheduled_actions: azure.mgmt.costmanagement.aio.operations.ScheduledActionsOperations - :ivar settings: SettingsOperations operations - :vartype settings: azure.mgmt.costmanagement.aio.operations.SettingsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Known values are "2025-03-01" and None. Default value is None. If not + set, the operation's default API version will be used. Note that overriding this default value + may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -127,13 +132,18 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = CostManagementClientConfiguration( - credential=credential, cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs + credential=credential, + base_url=cast(str, base_url), + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) _policies = kwargs.pop("policies", None) @@ -155,42 +165,45 @@ def __init__( self._config.http_logging_policy, ] self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( - base_url=cast(str, base_url), policies=_policies, **kwargs + base_url=cast(str, _endpoint), policies=_policies, **kwargs ) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False + self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.cost_allocation_rules = CostAllocationRulesOperations( + self.budgets = BudgetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.exports = ExportsOperations(self._client, self._config, self._serialize, self._deserialize) + self.generate_detailed_cost_report_operation_results = GenerateDetailedCostReportOperationResultsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.benefit_recommendations = BenefitRecommendationsOperations( + self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) + self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) + self.scheduled_actions = ScheduledActionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( + self.settings = SettingsOperations(self._client, self._config, self._serialize, self._deserialize) + self.generate_cost_details_report = GenerateCostDetailsReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_benefit_utilization_summaries_report = GenerateBenefitUtilizationSummariesReportOperations( + self.cost_allocation_rules = CostAllocationRulesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.budgets = BudgetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.exports = ExportsOperations(self._client, self._config, self._serialize, self._deserialize) - self.generate_cost_details_report = GenerateCostDetailsReportOperations( + self.benefit_recommendations = BenefitRecommendationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_detailed_cost_report = GenerateDetailedCostReportOperations( + self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_detailed_cost_report_operation_results = GenerateDetailedCostReportOperationResultsOperations( + self.generate_benefit_utilization_summaries_report = GenerateBenefitUtilizationSummariesReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations( + self.generate_detailed_cost_report = GenerateDetailedCostReportOperations( self._client, self._config, self._serialize, self._deserialize ) - self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize) - self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize) self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize) self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize) self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) @@ -198,12 +211,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize) - self.scheduled_actions = ScheduledActionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.settings = SettingsOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request( + def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. @@ -211,7 +220,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -224,7 +233,11 @@ def _send_request( """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py index 20f626e6c7e0..70c92acac77d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,18 +24,25 @@ class CostManagementClientConfiguration: # pylint: disable=too-many-instance-at Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Known values are "2025-03-01" and None. Default value is None. If not + set, the operation's default API version will be used. Note that overriding this default value + may result in unsupported behavior. :paramtype api_version: str """ def __init__( - self, credential: "AsyncTokenCredential", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any + self, + credential: "AsyncTokenCredential", + base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: api_version: str = kwargs.pop("api_version", "2025-03-01") @@ -43,6 +50,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") self.credential = credential + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py index cf144b3ea8d6..bc4eaae38dab 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/__init__.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,52 +12,52 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import GenerateDetailedCostReportOperationStatusOperations # type: ignore from ._operations import Operations # type: ignore -from ._cost_allocation_rules_operations import CostAllocationRulesOperations # type: ignore -from ._benefit_recommendations_operations import BenefitRecommendationsOperations # type: ignore -from ._benefit_utilization_summaries_operations import BenefitUtilizationSummariesOperations # type: ignore -from ._generate_benefit_utilization_summaries_report_operations import GenerateBenefitUtilizationSummariesReportOperations # type: ignore -from ._budgets_operations import BudgetsOperations # type: ignore -from ._exports_operations import ExportsOperations # type: ignore -from ._generate_cost_details_report_operations import GenerateCostDetailsReportOperations # type: ignore -from ._generate_detailed_cost_report_operations import GenerateDetailedCostReportOperations # type: ignore -from ._generate_detailed_cost_report_operation_results_operations import GenerateDetailedCostReportOperationResultsOperations # type: ignore -from ._generate_detailed_cost_report_operation_status_operations import GenerateDetailedCostReportOperationStatusOperations # type: ignore -from ._views_operations import ViewsOperations # type: ignore -from ._alerts_operations import AlertsOperations # type: ignore -from ._forecast_operations import ForecastOperations # type: ignore -from ._dimensions_operations import DimensionsOperations # type: ignore -from ._query_operations import QueryOperations # type: ignore -from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations # type: ignore -from ._price_sheet_operations import PriceSheetOperations # type: ignore -from ._scheduled_actions_operations import ScheduledActionsOperations # type: ignore -from ._settings_operations import SettingsOperations # type: ignore +from ._operations import BudgetsOperations # type: ignore +from ._operations import ExportsOperations # type: ignore +from ._operations import GenerateDetailedCostReportOperationResultsOperations # type: ignore +from ._operations import ViewsOperations # type: ignore +from ._operations import AlertsOperations # type: ignore +from ._operations import ScheduledActionsOperations # type: ignore +from ._operations import SettingsOperations # type: ignore +from ._operations import GenerateCostDetailsReportOperations # type: ignore +from ._operations import CostAllocationRulesOperations # type: ignore +from ._operations import BenefitRecommendationsOperations # type: ignore +from ._operations import BenefitUtilizationSummariesOperations # type: ignore +from ._operations import GenerateBenefitUtilizationSummariesReportOperations # type: ignore +from ._operations import GenerateDetailedCostReportOperations # type: ignore +from ._operations import ForecastOperations # type: ignore +from ._operations import DimensionsOperations # type: ignore +from ._operations import QueryOperations # type: ignore +from ._operations import GenerateReservationDetailsReportOperations # type: ignore +from ._operations import PriceSheetOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "GenerateDetailedCostReportOperationStatusOperations", "Operations", - "CostAllocationRulesOperations", - "BenefitRecommendationsOperations", - "BenefitUtilizationSummariesOperations", - "GenerateBenefitUtilizationSummariesReportOperations", "BudgetsOperations", "ExportsOperations", - "GenerateCostDetailsReportOperations", - "GenerateDetailedCostReportOperations", "GenerateDetailedCostReportOperationResultsOperations", - "GenerateDetailedCostReportOperationStatusOperations", "ViewsOperations", "AlertsOperations", + "ScheduledActionsOperations", + "SettingsOperations", + "GenerateCostDetailsReportOperations", + "CostAllocationRulesOperations", + "BenefitRecommendationsOperations", + "BenefitUtilizationSummariesOperations", + "GenerateBenefitUtilizationSummariesReportOperations", + "GenerateDetailedCostReportOperations", "ForecastOperations", "DimensionsOperations", "QueryOperations", "GenerateReservationDetailsReportOperations", "PriceSheetOperations", - "ScheduledActionsOperations", - "SettingsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py deleted file mode 100644 index 7dd611209c8c..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_alerts_operations.py +++ /dev/null @@ -1,452 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._alerts_operations import ( - build_dismiss_request, - build_get_request, - build_list_external_request, - build_list_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AlertsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`alerts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: - """Lists the alerts for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - - _request = build_list_request( - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: - """Gets the alert for the scope by alert ID. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - - _request = build_get_request( - scope=scope, - alert_id=alert_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Alert", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def dismiss( - self, - scope: str, - alert_id: str, - parameters: _models.DismissAlertPayload, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Alert: - """Dismisses the specified alert. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :param parameters: Parameters supplied to the Dismiss Alert operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def dismiss( - self, scope: str, alert_id: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Alert: - """Dismisses the specified alert. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :param parameters: Parameters supplied to the Dismiss Alert operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def dismiss( - self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, IO[bytes]], **kwargs: Any - ) -> _models.Alert: - """Dismisses the specified alert. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :param parameters: Parameters supplied to the Dismiss Alert operation. Is either a - DismissAlertPayload type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or IO[bytes] - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DismissAlertPayload") - - _request = build_dismiss_request( - scope=scope, - alert_id=alert_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Alert", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def list_external( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - **kwargs: Any - ) -> _models.AlertsResult: - """Lists the Alerts for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - - _request = build_list_external_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py deleted file mode 100644 index 95711e7c41f5..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_recommendations_operations.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._benefit_recommendations_operations import build_list_request -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class BenefitRecommendationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`benefit_recommendations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - billing_scope: str, - filter: Optional[str] = None, - orderby: Optional[str] = None, - expand: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.BenefitRecommendationModel"]: - """List of recommendations for purchasing savings plan. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param billing_scope: The scope associated with benefit recommendation operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, - /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement - scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type billing_scope: str - :param filter: Can be used to filter benefitRecommendations by: properties/scope with allowed - values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with - allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; - properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; - properties/subscriptionId; properties/resourceGroup. Default value is None. - :type filter: str - :param orderby: May be used to order the recommendations by: properties/armSkuName. For the - savings plan, the results are in order by default. There is no need to use this clause. Default - value is None. - :type orderby: str - :param expand: May be used to expand the properties by: properties/usage, - properties/allRecommendationDetails. Default value is None. - :type expand: str - :return: An iterator like instance of either BenefitRecommendationModel or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitRecommendationModel] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitRecommendationsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - billing_scope=billing_scope, - filter=filter, - orderby=orderby, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitRecommendationsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py deleted file mode 100644 index c1aeb2a0d786..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_benefit_utilization_summaries_operations.py +++ /dev/null @@ -1,464 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._benefit_utilization_summaries_operations import ( - build_list_by_billing_account_id_request, - build_list_by_billing_profile_id_request, - build_list_by_savings_plan_id_request, - build_list_by_savings_plan_order_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class BenefitUtilizationSummariesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`benefit_utilization_summaries` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_billing_account_id( - self, - billing_account_id: str, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: - """Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain - values: 'Daily' and 'Monthly'. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and - properties/usageDate. Default value is None. - :type filter: str - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_billing_account_id_request( - billing_account_id=billing_account_id, - grain_parameter=grain_parameter, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_billing_profile_id( - self, - billing_account_id: str, - billing_profile_id: str, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: - """Lists savings plan utilization summaries for billing profile. Supported at grain values: - 'Daily' and 'Monthly'. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and - properties/usageDate. Default value is None. - :type filter: str - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_billing_profile_id_request( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - grain_parameter=grain_parameter, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_savings_plan_order( - self, - savings_plan_order_id: str, - filter: Optional[str] = None, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: - """Lists the savings plan utilization summaries for daily or monthly grain. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param filter: Supports filtering by properties/usageDate. Default value is None. - :type filter: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_savings_plan_order_request( - savings_plan_order_id=savings_plan_order_id, - filter=filter, - grain_parameter=grain_parameter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - filter: Optional[str] = None, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: - """Lists the savings plan utilization summaries for daily or monthly grain. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param filter: Supports filtering by properties/usageDate. Default value is None. - :type filter: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_savings_plan_id_request( - savings_plan_order_id=savings_plan_order_id, - savings_plan_id=savings_plan_id, - filter=filter, - grain_parameter=grain_parameter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py deleted file mode 100644 index 2f9d1dadaa94..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_budgets_operations.py +++ /dev/null @@ -1,707 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._budgets_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class BudgetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`budgets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, scope: str, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged["_models.Budget"]: - """Lists all budgets for the defined scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param filter: OData filter option. May be used to filter budgets by properties/category. The - filter supports 'eq' only. Default value is None. - :type filter: str - :return: An iterator like instance of either Budget or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Budget] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BudgetsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - scope=scope, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BudgetsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: - """Gets the budget for the scope by budget name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Budget] = kwargs.pop("cls", None) - - _request = build_get_request( - scope=scope, - budget_name=budget_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Budget", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - scope: str, - budget_name: str, - parameters: _models.Budget, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Budget: - """The operation to create or update a budget. You can optionally provide an eTag if desired as a - form of concurrency control. To obtain the latest eTag for a given budget, perform a get - operation prior to your put operation. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Budget - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - scope: str, - budget_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Budget: - """The operation to create or update a budget. You can optionally provide an eTag if desired as a - form of concurrency control. To obtain the latest eTag for a given budget, perform a get - operation prior to your put operation. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, scope: str, budget_name: str, parameters: Union[_models.Budget, IO[bytes]], **kwargs: Any - ) -> _models.Budget: - """The operation to create or update a budget. You can optionally provide an eTag if desired as a - form of concurrency control. To obtain the latest eTag for a given budget, perform a get - operation prior to your put operation. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Is either a Budget type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Budget or IO[bytes] - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Budget] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Budget") - - _request = build_create_or_update_request( - scope=scope, - budget_name=budget_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Budget", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, scope: str, budget_name: str, **kwargs: Any) -> None: - """The operation to delete a budget. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - scope=scope, - budget_name=budget_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py deleted file mode 100644 index adad84ef3c52..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_cost_allocation_rules_operations.py +++ /dev/null @@ -1,525 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._cost_allocation_rules_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class CostAllocationRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`cost_allocation_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, billing_account_id: str, **kwargs: Any) -> AsyncItemPaged["_models.CostAllocationRuleDefinition"]: - """Get the list of all cost allocation rules for a billing account or enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :return: An iterator like instance of either CostAllocationRuleDefinition or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CostAllocationRuleList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - billing_account_id=billing_account_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("CostAllocationRuleList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @overload - async def check_name_availability( - self, - billing_account_id: str, - cost_allocation_rule_check_name_availability_request: _models.CostAllocationRuleCheckNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: - """Checks availability and correctness of a name for a cost allocation rule. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created - or updated. Required. - :type cost_allocation_rule_check_name_availability_request: - ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - billing_account_id: str, - cost_allocation_rule_check_name_availability_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: - """Checks availability and correctness of a name for a cost allocation rule. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created - or updated. Required. - :type cost_allocation_rule_check_name_availability_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - billing_account_id: str, - cost_allocation_rule_check_name_availability_request: Union[ - _models.CostAllocationRuleCheckNameAvailabilityRequest, IO[bytes] - ], - **kwargs: Any - ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: - """Checks availability and correctness of a name for a cost allocation rule. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created - or updated. Is either a CostAllocationRuleCheckNameAvailabilityRequest type or a IO[bytes] - type. Required. - :type cost_allocation_rule_check_name_availability_request: - ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest or IO[bytes] - :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CostAllocationRuleCheckNameAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cost_allocation_rule_check_name_availability_request, (IOBase, bytes)): - _content = cost_allocation_rule_check_name_availability_request - else: - _json = self._serialize.body( - cost_allocation_rule_check_name_availability_request, "CostAllocationRuleCheckNameAvailabilityRequest" - ) - - _request = build_check_name_availability_request( - billing_account_id=billing_account_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize( - "CostAllocationRuleCheckNameAvailabilityResponse", pipeline_response.http_response - ) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> _models.CostAllocationRuleDefinition: - """Get a cost allocation rule by rule name and billing account or enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) - - _request = build_get_request( - billing_account_id=billing_account_id, - rule_name=rule_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - billing_account_id: str, - rule_name: str, - cost_allocation_rule: _models.CostAllocationRuleDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleDefinition: - """Create/Update a rule to allocate cost between different resources within a billing account or - enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. - :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - billing_account_id: str, - rule_name: str, - cost_allocation_rule: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleDefinition: - """Create/Update a rule to allocate cost between different resources within a billing account or - enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. - :type cost_allocation_rule: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - billing_account_id: str, - rule_name: str, - cost_allocation_rule: Union[_models.CostAllocationRuleDefinition, IO[bytes]], - **kwargs: Any - ) -> _models.CostAllocationRuleDefinition: - """Create/Update a rule to allocate cost between different resources within a billing account or - enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :param cost_allocation_rule: Cost allocation rule to be created or updated. Is either a - CostAllocationRuleDefinition type or a IO[bytes] type. Required. - :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition or - IO[bytes] - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cost_allocation_rule, (IOBase, bytes)): - _content = cost_allocation_rule - else: - _json = self._serialize.body(cost_allocation_rule, "CostAllocationRuleDefinition") - - _request = build_create_or_update_request( - billing_account_id=billing_account_id, - rule_name=rule_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> None: - """Delete cost allocation rule for billing account or enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - billing_account_id=billing_account_id, - rule_name=rule_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py deleted file mode 100644 index a1eb52e9d3f2..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_dimensions_operations.py +++ /dev/null @@ -1,301 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._dimensions_operations import build_by_external_cloud_provider_type_request, build_list_request -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class DimensionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`dimensions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - scope: str, - filter: Optional[str] = None, - expand: Optional[str] = None, - skiptoken: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.Dimension"]: - """Lists the dimensions by the defined scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with dimension operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param filter: May be used to filter dimensions by properties/category, properties/usageStart, - properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. Default value is - None. - :type filter: str - :param expand: May be used to expand the properties/data within a dimension category. By - default, data is not included when listing dimensions. Default value is None. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If - a previous response contains a nextLink element, the value of the nextLink element will include - a skiptoken parameter that specifies a starting point to use for subsequent calls. Default - value is None. - :type skiptoken: str - :param top: May be used to limit the number of results to the most recent N dimension data. - Default value is None. - :type top: int - :return: An iterator like instance of either Dimension or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Dimension] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - scope=scope, - filter=filter, - expand=expand, - skiptoken=skiptoken, - top=top, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DimensionsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - filter: Optional[str] = None, - expand: Optional[str] = None, - skiptoken: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged["_models.Dimension"]: - """Lists the dimensions by the external cloud provider type. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param filter: May be used to filter dimensions by properties/category, properties/usageStart, - properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. Default value is - None. - :type filter: str - :param expand: May be used to expand the properties/data within a dimension category. By - default, data is not included when listing dimensions. Default value is None. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If - a previous response contains a nextLink element, the value of the nextLink element will include - a skiptoken parameter that specifies a starting point to use for subsequent calls. Default - value is None. - :type skiptoken: str - :param top: May be used to limit the number of results to the most recent N dimension data. - Default value is None. - :type top: int - :return: An iterator like instance of either Dimension or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Dimension] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_by_external_cloud_provider_type_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - filter=filter, - expand=expand, - skiptoken=skiptoken, - top=top, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DimensionsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py deleted file mode 100644 index 51f2ddacd7ee..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_exports_operations.py +++ /dev/null @@ -1,737 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._exports_operations import ( - build_create_or_update_request, - build_delete_request, - build_execute_request, - build_get_execution_history_request, - build_get_request, - build_list_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ExportsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`exports` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> _models.ExportListResult: - """The operation to list all exports at the given scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param expand: May be used to expand the properties within an export. Currently only - 'runHistory' is supported and will return information for the last run of each export. Default - value is None. - :type expand: str - :return: ExportListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExportListResult] = kwargs.pop("cls", None) - - _request = build_list_request( - scope=scope, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ExportListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get(self, scope: str, export_name: str, expand: Optional[str] = None, **kwargs: Any) -> _models.Export: - """The operation to get the export for the defined scope by export name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param expand: May be used to expand the properties within an export. Currently only - 'runHistory' is supported and will return information for the last 10 runs of the export. - Default value is None. - :type expand: str - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Export] = kwargs.pop("cls", None) - - _request = build_get_request( - scope=scope, - export_name=export_name, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Export", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - scope: str, - export_name: str, - parameters: _models.Export, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Export: - """The operation to create or update a export. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Export - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - scope: str, - export_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Export: - """The operation to create or update a export. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, scope: str, export_name: str, parameters: Union[_models.Export, IO[bytes]], **kwargs: Any - ) -> _models.Export: - """The operation to create or update a export. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Is either a - Export type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Export or IO[bytes] - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Export] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Export") - - _request = build_create_or_update_request( - scope=scope, - export_name=export_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Export", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, scope: str, export_name: str, **kwargs: Any) -> None: - """The operation to delete a export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - scope=scope, - export_name=export_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def execute( - self, - scope: str, - export_name: str, - parameters: Optional[_models.ExportRunRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """The operation to run an export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the Execute Export operation. Default value is None. - :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def execute( - self, - scope: str, - export_name: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """The operation to run an export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the Execute Export operation. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def execute( - self, - scope: str, - export_name: str, - parameters: Optional[Union[_models.ExportRunRequest, IO[bytes]]] = None, - **kwargs: Any - ) -> None: - """The operation to run an export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the Execute Export operation. Is either a - ExportRunRequest type or a IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "ExportRunRequest") - else: - _json = None - - _request = build_execute_request( - scope=scope, - export_name=export_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def get_execution_history( - self, scope: str, export_name: str, **kwargs: Any - ) -> _models.ExportExecutionListResult: - """The operation to get the run history of an export for the defined scope and export name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :return: ExportExecutionListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExportExecutionListResult] = kwargs.pop("cls", None) - - _request = build_get_execution_history_request( - scope=scope, - export_name=export_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ExportExecutionListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py deleted file mode 100644 index 3824d23d429d..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_forecast_operations.py +++ /dev/null @@ -1,424 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._forecast_operations import build_external_cloud_provider_usage_request, build_usage_request -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ForecastOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`forecast` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def usage( - self, - scope: str, - parameters: _models.ForecastDefinition, - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> Optional[_models.ForecastResult]: - """Lists the forecast charges for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with forecast operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def usage( - self, - scope: str, - parameters: IO[bytes], - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> Optional[_models.ForecastResult]: - """Lists the forecast charges for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with forecast operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def usage( - self, - scope: str, - parameters: Union[_models.ForecastDefinition, IO[bytes]], - filter: Optional[str] = None, - **kwargs: Any - ) -> Optional[_models.ForecastResult]: - """Lists the forecast charges for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with forecast operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :return: ForecastResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.ForecastResult]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ForecastDefinition") - - _request = build_usage_request( - scope=scope, - filter=filter, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def external_cloud_provider_usage( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: _models.ForecastDefinition, - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ForecastResult: - """Lists the forecast charges for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def external_cloud_provider_usage( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: IO[bytes], - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ForecastResult: - """Lists the forecast charges for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def external_cloud_provider_usage( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: Union[_models.ForecastDefinition, IO[bytes]], - filter: Optional[str] = None, - **kwargs: Any - ) -> _models.ForecastResult: - """Lists the forecast charges for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :return: ForecastResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ForecastResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ForecastDefinition") - - _request = build_external_cloud_provider_usage_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - filter=filter, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py deleted file mode 100644 index a8d09d6a6629..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_benefit_utilization_summaries_report_operations.py +++ /dev/null @@ -1,1344 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._generate_benefit_utilization_summaries_report_operations import ( - build_generate_by_billing_account_request, - build_generate_by_billing_profile_request, - build_generate_by_reservation_id_request, - build_generate_by_reservation_order_id_request, - build_generate_by_savings_plan_id_request, - build_generate_by_savings_plan_order_id_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GenerateBenefitUtilizationSummariesReportOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`generate_benefit_utilization_summaries_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _generate_by_billing_account_initial( - self, - billing_account_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_billing_account_request( - billing_account_id=billing_account_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_generate_by_billing_account( - self, - billing_account_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account. - This API supports only enrollment accounts. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_generate_by_billing_account( - self, - billing_account_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account. - This API supports only enrollment accounts. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_generate_by_billing_account( - self, - billing_account_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account. - This API supports only enrollment accounts. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._generate_by_billing_account_initial( - billing_account_id=billing_account_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _generate_by_billing_profile_initial( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_billing_profile_request( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_generate_by_billing_profile( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account - and billing profile. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_generate_by_billing_profile( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account - and billing profile. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_generate_by_billing_profile( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account - and billing profile. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._generate_by_billing_profile_initial( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _generate_by_reservation_order_id_initial( # pylint: disable=name-too-long - self, - reservation_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_reservation_order_id_request( - reservation_order_id=reservation_order_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_generate_by_reservation_order_id( - self, - reservation_order_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_generate_by_reservation_order_id( - self, - reservation_order_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_generate_by_reservation_order_id( - self, - reservation_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._generate_by_reservation_order_id_initial( - reservation_order_id=reservation_order_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _generate_by_reservation_id_initial( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_reservation_id_request( - reservation_order_id=reservation_order_id, - reservation_id=reservation_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_generate_by_reservation_id( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param reservation_id: Reservation ID. Required. - :type reservation_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_generate_by_reservation_id( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param reservation_id: Reservation ID. Required. - :type reservation_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_generate_by_reservation_id( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param reservation_id: Reservation ID. Required. - :type reservation_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._generate_by_reservation_id_initial( - reservation_order_id=reservation_order_id, - reservation_id=reservation_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _generate_by_savings_plan_order_id_initial( # pylint: disable=name-too-long - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_savings_plan_order_id_request( - savings_plan_order_id=savings_plan_order_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_generate_by_savings_plan_order_id( - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_generate_by_savings_plan_order_id( - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_generate_by_savings_plan_order_id( - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._generate_by_savings_plan_order_id_initial( - savings_plan_order_id=savings_plan_order_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _generate_by_savings_plan_id_initial( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_savings_plan_id_request( - savings_plan_order_id=savings_plan_order_id, - savings_plan_id=savings_plan_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_generate_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_generate_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_generate_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._generate_by_savings_plan_id_initial( - savings_plan_order_id=savings_plan_order_id, - savings_plan_id=savings_plan_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py deleted file mode 100644 index 44c76a8271e1..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_cost_details_report_operations.py +++ /dev/null @@ -1,413 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._generate_cost_details_report_operations import ( - build_create_operation_request, - build_get_operation_results_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GenerateCostDetailsReportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`generate_cost_details_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_operation_initial( - self, - scope: str, - parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GenerateCostDetailsReportRequestDefinition") - - _request = build_create_operation_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.GenerateCostDetailsReportErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_operation( - self, - scope: str, - parameters: _models.GenerateCostDetailsReportRequestDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: - """This API is the replacement for all previously release Usage Details APIs. Request to generate - a cost details report for the provided date range, billing period (Only enterprise customers) - or Invoice Id asynchronously at a certain scope. The initial call to request a report will - return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the - endpoint to poll to get the result of the report generation. The 'Retry-After' provides the - duration to wait before polling for the generated report. A call to poll the report operation - will provide a 202 response with a 'Location' header if the operation is still in progress. - Once the report generation operation completes, the polling endpoint will provide a 200 - response along with details on the report blob(s) that are available for download. The details - on the file(s) available for download will be available in the polling response body. To - Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create cost details operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_operation( - self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: - """This API is the replacement for all previously release Usage Details APIs. Request to generate - a cost details report for the provided date range, billing period (Only enterprise customers) - or Invoice Id asynchronously at a certain scope. The initial call to request a report will - return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the - endpoint to poll to get the result of the report generation. The 'Retry-After' provides the - duration to wait before polling for the generated report. A call to poll the report operation - will provide a 202 response with a 'Location' header if the operation is still in progress. - Once the report generation operation completes, the polling endpoint will provide a 200 - response along with details on the report blob(s) that are available for download. The details - on the file(s) available for download will be available in the polling response body. To - Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create cost details operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_operation( - self, - scope: str, - parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: - """This API is the replacement for all previously release Usage Details APIs. Request to generate - a cost details report for the provided date range, billing period (Only enterprise customers) - or Invoice Id asynchronously at a certain scope. The initial call to request a report will - return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the - endpoint to poll to get the result of the report generation. The 'Retry-After' provides the - duration to wait before polling for the generated report. A call to poll the report operation - will provide a 202 response with a 'Location' header if the operation is still in progress. - Once the report generation operation completes, the polling endpoint will provide a 200 - response along with details on the report blob(s) that are available for download. The details - on the file(s) available for download will be available in the polling response body. To - Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create cost details operation. Is either a - GenerateCostDetailsReportRequestDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - or IO[bytes] - :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_operation_initial( - scope=scope, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CostDetailsOperationResults].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CostDetailsOperationResults]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _get_operation_results_initial( - self, scope: str, operation_id: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_get_operation_results_request( - scope=scope, - operation_id=operation_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_get_operation_results( - self, scope: str, operation_id: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: - """Get the result of the specified operation. This link is provided in the CostDetails creation - request response Location header. - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param operation_id: The target operation Id. Required. - :type operation_id: str - :return: An instance of AsyncLROPoller that returns either CostDetailsOperationResults or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._get_operation_results_initial( - scope=scope, - operation_id=operation_id, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CostDetailsOperationResults].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CostDetailsOperationResults]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py deleted file mode 100644 index d0f29f8232c0..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_results_operations.py +++ /dev/null @@ -1,172 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._generate_detailed_cost_report_operation_results_operations import build_get_request -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GenerateDetailedCostReportOperationResultsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`generate_detailed_cost_report_operation_results` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _get_initial(self, operation_id: str, scope: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_get_request( - operation_id=operation_id, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_get( - self, operation_id: str, scope: str, **kwargs: Any - ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Gets the result of the specified operation. The link with this operationId is provided as a - response header of the initial request. - - :param operation_id: The target operation Id. Required. - :type operation_id: str - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :return: An instance of AsyncLROPoller that returns either - GenerateDetailedCostReportOperationResult or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._get_initial( - operation_id=operation_id, - scope=scope, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "GenerateDetailedCostReportOperationResult", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py deleted file mode 100644 index 3b36c274536b..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operation_status_operations.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._generate_detailed_cost_report_operation_status_operations import build_get_request -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GenerateDetailedCostReportOperationStatusOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`generate_detailed_cost_report_operation_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, operation_id: str, scope: str, **kwargs: Any - ) -> _models.GenerateDetailedCostReportOperationStatuses: - """Get the status of the specified operation. This link is provided in the - GenerateDetailedCostReport creation request response header. - - :param operation_id: The target operation Id. Required. - :type operation_id: str - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :return: GenerateDetailedCostReportOperationStatuses or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateDetailedCostReportOperationStatuses] = kwargs.pop("cls", None) - - _request = build_get_request( - operation_id=operation_id, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GenerateDetailedCostReportOperationStatuses", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py deleted file mode 100644 index 66c7b5516191..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_detailed_cost_report_operations.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._generate_detailed_cost_report_operations import build_create_operation_request -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GenerateDetailedCostReportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`generate_detailed_cost_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_operation_initial( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GenerateDetailedCostReportDefinition") - - _request = build_create_operation_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.GenerateDetailedCostReportErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-Consumption-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-Consumption-AsyncOperation") - ) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_operation( - self, - scope: str, - parameters: _models.GenerateDetailedCostReportDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Generates the detailed cost report for provided date range, billing period(only enterprise - customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header - Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the - operation will provide the status and if the operation is completed the blob file where - generated detailed cost report is being stored. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create detailed cost report operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - GenerateDetailedCostReportOperationResult or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_operation( - self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Generates the detailed cost report for provided date range, billing period(only enterprise - customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header - Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the - operation will provide the status and if the operation is completed the blob file where - generated detailed cost report is being stored. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create detailed cost report operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - GenerateDetailedCostReportOperationResult or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_operation( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Generates the detailed cost report for provided date range, billing period(only enterprise - customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header - Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the - operation will provide the status and if the operation is completed the blob file where - generated detailed cost report is being stored. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create detailed cost report operation. Is either - a GenerateDetailedCostReportDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either - GenerateDetailedCostReportOperationResult or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_operation_initial( - scope=scope, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "GenerateDetailedCostReportOperationResult", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py deleted file mode 100644 index 45fa004f006e..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_generate_reservation_details_report_operations.py +++ /dev/null @@ -1,323 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._generate_reservation_details_report_operations import ( - build_by_billing_account_id_request, - build_by_billing_profile_id_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class GenerateReservationDetailsReportOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`generate_reservation_details_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _by_billing_account_id_initial( - self, billing_account_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_by_billing_account_id_request( - billing_account_id=billing_account_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_by_billing_account_id( - self, billing_account_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> AsyncLROPoller[_models.OperationStatus]: - """Generates the reservations details report for provided date range asynchronously based on - enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. - For more details on the roles see, - https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param billing_account_id: Enrollment ID (Legacy BillingAccount ID). Required. - :type billing_account_id: str - :param start_date: Start Date. Required. - :type start_date: str - :param end_date: End Date. Required. - :type end_date: str - :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._by_billing_account_id_initial( - billing_account_id=billing_account_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _by_billing_profile_id_initial( - self, billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_by_billing_profile_id_request( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_by_billing_profile_id( - self, billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> AsyncLROPoller[_models.OperationStatus]: - """Generates the reservations details report for provided date range asynchronously by billing - profile. The Reservation usage details can be viewed by only certain enterprise roles by - default. For more details on the roles see, - https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param start_date: Start Date. Required. - :type start_date: str - :param end_date: End Date. Required. - :type end_date: str - :return: An instance of AsyncLROPoller that returns either OperationStatus or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._by_billing_profile_id_initial( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py index cdffa1bb1511..ad49fe94b6b2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py @@ -1,40 +1,213 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +from io import IOBase +import json +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse -from azure.core import AsyncPipelineClient +from azure.core import AsyncPipelineClient, MatchConditions from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, + ResourceModifiedError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_list_request +from ...operations._operations import ( + build_alerts_dismiss_request, + build_alerts_get_request, + build_alerts_list_external_request, + build_alerts_list_request, + build_benefit_recommendations_list_request, + build_benefit_utilization_summaries_list_by_billing_account_id_request, + build_benefit_utilization_summaries_list_by_billing_profile_id_request, + build_benefit_utilization_summaries_list_by_savings_plan_id_request, + build_benefit_utilization_summaries_list_by_savings_plan_order_request, + build_budgets_create_or_update_request, + build_budgets_delete_request, + build_budgets_get_request, + build_budgets_list_request, + build_cost_allocation_rules_check_name_availability_request, + build_cost_allocation_rules_create_or_update_request, + build_cost_allocation_rules_delete_request, + build_cost_allocation_rules_get_request, + build_cost_allocation_rules_list_request, + build_dimensions_by_external_cloud_provider_type_request, + build_dimensions_list_request, + build_exports_create_or_update_request, + build_exports_delete_request, + build_exports_execute_request, + build_exports_get_execution_history_request, + build_exports_get_request, + build_exports_list_request, + build_forecast_external_cloud_provider_usage_request, + build_forecast_usage_request, + build_generate_benefit_utilization_summaries_report_generate_by_billing_account_request, + build_generate_benefit_utilization_summaries_report_generate_by_billing_profile_request, + build_generate_benefit_utilization_summaries_report_generate_by_reservation_id_request, + build_generate_benefit_utilization_summaries_report_generate_by_reservation_order_id_request, + build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_id_request, + build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_order_id_request, + build_generate_cost_details_report_create_operation_request, + build_generate_cost_details_report_get_operation_results_request, + build_generate_detailed_cost_report_create_operation_request, + build_generate_detailed_cost_report_operation_results_get_request, + build_generate_detailed_cost_report_operation_status_get_request, + build_generate_reservation_details_report_by_billing_account_id_request, + build_generate_reservation_details_report_by_billing_profile_id_request, + build_operations_list_request, + build_price_sheet_download_by_billing_account_request, + build_price_sheet_download_by_billing_profile_request, + build_price_sheet_download_by_invoice_request, + build_query_usage_by_external_cloud_provider_type_request, + build_query_usage_request, + build_scheduled_actions_check_name_availability_by_scope_request, + build_scheduled_actions_check_name_availability_request, + build_scheduled_actions_create_or_update_by_scope_request, + build_scheduled_actions_create_or_update_request, + build_scheduled_actions_delete_by_scope_request, + build_scheduled_actions_delete_request, + build_scheduled_actions_get_by_scope_request, + build_scheduled_actions_get_request, + build_scheduled_actions_list_by_scope_request, + build_scheduled_actions_list_request, + build_scheduled_actions_run_by_scope_request, + build_scheduled_actions_run_request, + build_settings_create_or_update_by_scope_request, + build_settings_delete_by_scope_request, + build_settings_get_by_scope_request, + build_settings_list_request, + build_views_create_or_update_by_scope_request, + build_views_create_or_update_request, + build_views_delete_by_scope_request, + build_views_delete_request, + build_views_get_by_scope_request, + build_views_get_request, + build_views_list_by_scope_request, + build_views_list_request, +) from .._configuration import CostManagementClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list +class GenerateDetailedCostReportOperationStatusOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`generate_detailed_cost_report_operation_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, operation_id: str, scope: str, **kwargs: Any + ) -> _models.GenerateDetailedCostReportOperationStatuses: + """Get the status of the specified operation. This link is provided in the + GenerateDetailedCostReport creation request response header. + + :param operation_id: The target operation Id. Required. + :type operation_id: str + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :return: GenerateDetailedCostReportOperationStatuses. The + GenerateDetailedCostReportOperationStatuses is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateDetailedCostReportOperationStatuses] = kwargs.pop("cls", None) + + _request = build_generate_detailed_cost_report_operation_status_get_request( + operation_id=operation_id, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GenerateDetailedCostReportOperationStatuses, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + class Operations: """ .. warning:: @@ -45,8 +218,6 @@ class Operations: :attr:`operations` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") @@ -56,19 +227,418 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list(self, **kwargs: Any) -> AsyncItemPaged["_models.CostManagementOperation"]: - """Lists all of the available cost management REST API operations. + """List the operations for the provider. - :return: An iterator like instance of either CostManagementOperation or the result of - cls(response) + :return: An iterator like instance of CostManagementOperation :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.CostManagementOperation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CostManagementOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CostManagementOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class BudgetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`budgets` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: + """Gets the budget for the scope by budget name. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + _request = build_budgets_get_request( + scope=scope, + budget_name=budget_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Budget, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + scope: str, + budget_name: str, + parameters: _models.Budget, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, scope: str, budget_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + scope: str, + budget_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, scope: str, budget_name: str, parameters: Union[_models.Budget, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Is one of the following + types: Budget, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget or JSON or IO[bytes] + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_budgets_create_or_update_request( + scope=scope, + budget_name=budget_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Budget, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, scope: str, budget_name: str, **kwargs: Any) -> None: + """The operation to delete a budget. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_budgets_delete_request( + scope=scope, + budget_name=budget_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged["_models.Budget"]: + """Lists all budgets for the defined scope. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :keyword filter: OData filter option. May be used to filter budgets by properties/category. The + filter supports 'eq' only. Default value is None. + :paramtype filter: str + :return: An iterator like instance of Budget + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Budget] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Budget]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -81,12 +651,19 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.CostManagementOperation def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_budgets_list_request( + scope=scope, + filter=filter, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -99,18 +676,29 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Budget], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) @@ -123,12 +711,8753 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( + error = _failsafe_deserialize( _models.ErrorResponse, - pipeline_response, + response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + + +class ExportsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`exports` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, scope: str, export_name: str, *, expand: Optional[str] = None, **kwargs: Any) -> _models.Export: + """The operation to get the export for the defined scope by export name. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :keyword expand: May be used to expand the properties within an export. Currently only + 'runHistory' is supported and will return information for the last 10 runs of the export. + Default value is None. + :paramtype expand: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Export] = kwargs.pop("cls", None) + + _request = build_exports_get_request( + scope=scope, + export_name=export_name, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Export, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + scope: str, + export_name: str, + parameters: _models.Export, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Export + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, scope: str, export_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + scope: str, + export_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, scope: str, export_name: str, parameters: Union[_models.Export, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Is one of the + following types: Export, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.Export or JSON or IO[bytes] + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Export] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_exports_create_or_update_request( + scope=scope, + export_name=export_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Export, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, scope: str, export_name: str, **kwargs: Any) -> None: + """The operation to delete a export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_exports_delete_request( + scope=scope, + export_name=export_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list(self, scope: str, *, expand: Optional[str] = None, **kwargs: Any) -> _models.ExportListResult: + """The operation to list all exports at the given scope. + + :param scope: The scope associated with alerts operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :keyword expand: May be used to expand the properties within an export. Currently only + 'runHistory' is supported and will return information for the last run of each export. Default + value is None. + :paramtype expand: str + :return: ExportListResult. The ExportListResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ExportListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExportListResult] = kwargs.pop("cls", None) + + _request = build_exports_list_request( + scope=scope, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ExportListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def execute( + self, + scope: str, + export_name: str, + parameters: Optional[_models.ExportRunRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def execute( + self, + scope: str, + export_name: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def execute( + self, + scope: str, + export_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def execute( + self, + scope: str, + export_name: str, + parameters: Optional[Union[_models.ExportRunRequest, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Is one of the following + types: ExportRunRequest, JSON, IO[bytes] Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest or JSON or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_exports_execute_request( + scope=scope, + export_name=export_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def get_execution_history( + self, scope: str, export_name: str, **kwargs: Any + ) -> _models.ExportExecutionListResult: + """The operation to get the run history of an export for the defined scope and export name. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :return: ExportExecutionListResult. The ExportExecutionListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExportExecutionListResult] = kwargs.pop("cls", None) + + _request = build_exports_get_execution_history_request( + scope=scope, + export_name=export_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ExportExecutionListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GenerateDetailedCostReportOperationResultsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`generate_detailed_cost_report_operation_results` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _get_initial(self, operation_id: str, scope: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_generate_detailed_cost_report_operation_results_get_request( + operation_id=operation_id, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_get( + self, operation_id: str, scope: str, **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Gets the result of the specified operation. The link with this operationId is provided as a + response header of the initial request. + + :param operation_id: The target operation Id. Required. + :type operation_id: str + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :return: An instance of AsyncLROPoller that returns GenerateDetailedCostReportOperationResult. + The GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._get_initial( + operation_id=operation_id, + scope=scope, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.GenerateDetailedCostReportOperationResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ViewsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`views` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, view_name: str, **kwargs: Any) -> _models.View: + """Gets the view by view name. + + :param view_name: View name. Required. + :type view_name: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + _request = build_views_get_request( + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, view_name: str, parameters: _models.View, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, view_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, view_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, view_name: str, parameters: Union[_models.View, JSON, IO[bytes]], **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is one of the + following types: View, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or JSON or IO[bytes] + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_views_create_or_update_request( + view_name=view_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, view_name: str, **kwargs: Any) -> None: + """The operation to delete a view. + + :param view_name: View name. Required. + :type view_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_views_delete_request( + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.View"]: + """Lists all views by tenant and object. + + :return: An iterator like instance of View + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.View] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.View]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_views_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.View], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.View: + """Gets the view for the defined scope by view name. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + _request = build_views_get_by_scope_request( + scope=scope, + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update_by_scope( + self, + scope: str, + view_name: str, + parameters: _models.View, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_by_scope( + self, scope: str, view_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_by_scope( + self, + scope: str, + view_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update_by_scope( + self, scope: str, view_name: str, parameters: Union[_models.View, JSON, IO[bytes]], **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is one of the + following types: View, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or JSON or IO[bytes] + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_views_create_or_update_by_scope_request( + scope=scope, + view_name=view_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> None: + """The operation to delete a view. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_views_delete_by_scope_request( + scope=scope, + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_scope(self, scope: str, **kwargs: Any) -> AsyncItemPaged["_models.View"]: + """Lists all views at the given scope. + + :param scope: undefined. Required. + :type scope: str + :return: An iterator like instance of View + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.View] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.View]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_views_list_by_scope_request( + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.View], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class AlertsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`alerts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: + """Gets the alert for the scope by alert ID. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Alert] = kwargs.pop("cls", None) + + _request = build_alerts_get_request( + scope=scope, + alert_id=alert_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Alert, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def dismiss( + self, + scope: str, + alert_id: str, + parameters: _models.DismissAlertPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def dismiss( + self, scope: str, alert_id: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def dismiss( + self, scope: str, alert_id: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def dismiss( + self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Is one of the following + types: DismissAlertPayload, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or JSON or IO[bytes] + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Alert] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_alerts_dismiss_request( + scope=scope, + alert_id=alert_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Alert, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: + """Lists the alerts for scope defined. + + :param scope: The scope associated with alerts operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :return: AlertsResult. The AlertsResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) + + _request = build_alerts_list_request( + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AlertsResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list_external( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + **kwargs: Any + ) -> _models.AlertsResult: + """Lists the Alerts for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :return: AlertsResult. The AlertsResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) + + _request = build_alerts_list_external_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AlertsResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ScheduledActionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`scheduled_actions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: + """Get the private scheduled action by name. + + :param name: Scheduled action name. Required. + :type name: str + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_get_request( + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + name: str, + scheduled_action: _models.ScheduledAction, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + name: str, + scheduled_action: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + name: str, + scheduled_action: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + name: str, + scheduled_action: Union[_models.ScheduledAction, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Is one of the following + types: ScheduledAction, JSON, IO[bytes] Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(scheduled_action, (IOBase, bytes)): + _content = scheduled_action + else: + _content = json.dumps(scheduled_action, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_create_or_update_request( + name=name, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, name: str, **kwargs: Any) -> None: + """Delete a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_delete_request( + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged["_models.ScheduledAction"]: + """List all private scheduled actions. + + :keyword filter: May be used to filter scheduled actions by properties/viewId. Supported + operator is 'eq'. Default value is None. + :paramtype filter: str + :return: An iterator like instance of ScheduledAction + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_request( + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def run(self, name: str, **kwargs: Any) -> None: + """Processes a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_run_request( + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.ScheduledAction: + """Get the shared scheduled action from the given scope by name. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_get_by_scope_request( + scope=scope, + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: _models.ScheduledAction, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: Union[_models.ScheduledAction, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Is one of the following + types: ScheduledAction, JSON, IO[bytes] Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(scheduled_action, (IOBase, bytes)): + _content = scheduled_action + else: + _content = json.dumps(scheduled_action, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_create_or_update_by_scope_request( + scope=scope, + name=name, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_by_scope(self, scope: str, name: str, **kwargs: Any) -> None: + """Delete a scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_delete_by_scope_request( + scope=scope, + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_scope( + self, scope: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.ScheduledAction"]: + """List all shared scheduled actions within the given scope. + + :param scope: undefined. Required. + :type scope: str + :keyword filter: May be used to filter scheduled actions by properties/viewId. Supported + operator is 'eq'. Default value is None. + :paramtype filter: str + :return: An iterator like instance of ScheduledAction + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_by_scope_request( + scope=scope, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def run_by_scope(self, scope: str, name: str, **kwargs: Any) -> None: + """Runs a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_run_by_scope_request( + scope=scope, + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + async def check_name_availability( + self, + check_name_availability_request: _models.CheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, check_name_availability_request: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Required. + :type check_name_availability_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, check_name_availability_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Required. + :type check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Is one of the following types: + CheckNameAvailabilityRequest, JSON, IO[bytes] Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or JSON or IO[bytes] + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_request, (IOBase, bytes)): + _content = check_name_availability_request + else: + _content = json.dumps(check_name_availability_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_check_name_availability_request( + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: _models.CheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Required. + :type check_name_availability_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Required. + :type check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Is one of + the following types: CheckNameAvailabilityRequest, JSON, IO[bytes] Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or JSON or IO[bytes] + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_request, (IOBase, bytes)): + _content = check_name_availability_request + else: + _content = json.dumps(check_name_availability_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_check_name_availability_by_scope_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> _models.Setting: + """Get the setting from the given scope by name. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + _request = build_settings_get_by_scope_request( + scope=scope, + type=type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Setting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: _models.Setting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: Union[_models.Setting, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Is one of the following types: Setting, JSON, + IO[bytes] Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting or JSON or IO[bytes] + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(setting, (IOBase, bytes)): + _content = setting + else: + _content = json.dumps(setting, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_settings_create_or_update_by_scope_request( + scope=scope, + type=type, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Setting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> None: + """Delete a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_settings_delete_by_scope_request( + scope=scope, + type=type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list(self, scope: str, **kwargs: Any) -> _models.SettingsListResult: + """List all cost management settings in the requested scope. + + :param scope: undefined. Required. + :type scope: str + :return: SettingsListResult. The SettingsListResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.SettingsListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SettingsListResult] = kwargs.pop("cls", None) + + _request = build_settings_list_request( + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SettingsListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GenerateCostDetailsReportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`generate_cost_details_report` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _get_operation_results_initial( + self, scope: str, operation_id: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_generate_cost_details_report_get_operation_results_request( + scope=scope, + operation_id=operation_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_get_operation_results( + self, scope: str, operation_id: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: + """Get the result of the specified operation. This link is provided in the CostDetails creation + request response Location header. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param operation_id: The target operation Id. Required. + :type operation_id: str + :return: An instance of AsyncLROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._get_operation_results_initial( + scope=scope, + operation_id=operation_id, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CostDetailsOperationResults, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CostDetailsOperationResults].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _create_operation_initial( + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_cost_details_report_create_operation_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.GenerateCostDetailsReportErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_operation( + self, + scope: str, + parameters: _models.GenerateCostDetailsReportRequestDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_operation( + self, scope: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_operation( + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_operation( + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Is one of the + following types: GenerateCostDetailsReportRequestDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition + or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_operation_initial( + scope=scope, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CostDetailsOperationResults, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CostDetailsOperationResults].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class CostAllocationRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`cost_allocation_rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> _models.CostAllocationRuleDefinition: + """Get a cost allocation rule by rule name and billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + _request = build_cost_allocation_rules_get_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CostAllocationRuleDefinition, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: _models.CostAllocationRuleDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: Union[_models.CostAllocationRuleDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Is one of the + following types: CostAllocationRuleDefinition, JSON, IO[bytes] Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition or + JSON or IO[bytes] + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cost_allocation_rule, (IOBase, bytes)): + _content = cost_allocation_rule + else: + _content = json.dumps(cost_allocation_rule, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cost_allocation_rules_create_or_update_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CostAllocationRuleDefinition, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> None: + """Delete cost allocation rule for billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_cost_allocation_rules_delete_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, billing_account_id: str, **kwargs: Any) -> AsyncItemPaged["_models.CostAllocationRuleDefinition"]: + """Get the list of all cost allocation rules for a billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :return: An iterator like instance of CostAllocationRuleDefinition + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CostAllocationRuleDefinition]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_cost_allocation_rules_list_request( + billing_account_id=billing_account_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CostAllocationRuleDefinition], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: _models.CostAllocationRuleCheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: Union[ + _models.CostAllocationRuleCheckNameAvailabilityRequest, JSON, IO[bytes] + ], + **kwargs: Any + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Is one of the following types: CostAllocationRuleCheckNameAvailabilityRequest, + JSON, IO[bytes] Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest or JSON or + IO[bytes] + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleCheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cost_allocation_rule_check_name_availability_request, (IOBase, bytes)): + _content = cost_allocation_rule_check_name_availability_request + else: + _content = json.dumps(cost_allocation_rule_check_name_availability_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cost_allocation_rules_check_name_availability_request( + billing_account_id=billing_account_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CostAllocationRuleCheckNameAvailabilityResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class BenefitRecommendationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`benefit_recommendations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + billing_scope: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + expand: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.BenefitRecommendationModel"]: + """List of recommendations for purchasing savings plan. + + :param billing_scope: The scope associated with benefit recommendation operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, + /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement + scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type billing_scope: str + :keyword filter: Can be used to filter benefitRecommendations by: properties/scope with allowed + values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with + allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; + properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; + properties/subscriptionId; properties/resourceGroup. Default value is None. + :paramtype filter: str + :keyword orderby: May be used to order the recommendations by: properties/armSkuName. For the + savings plan, the results are in order by default. There is no need to use this clause. Default + value is None. + :paramtype orderby: str + :keyword expand: May be used to expand the properties by: properties/usage, + properties/allRecommendationDetails. Default value is None. + :paramtype expand: str + :return: An iterator like instance of BenefitRecommendationModel + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitRecommendationModel] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitRecommendationModel]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_recommendations_list_request( + billing_scope=billing_scope, + filter=filter, + orderby=orderby, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitRecommendationModel], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class BenefitUtilizationSummariesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`benefit_utilization_summaries` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_billing_account_id( + self, + billing_account_id: str, + *, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: + """Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain + values: 'Daily' and 'Monthly'. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :keyword filter: Supports filtering by properties/benefitId, properties/benefitOrderId and + properties/usageDate. Default value is None. + :paramtype filter: str + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_billing_account_id_request( + billing_account_id=billing_account_id, + grain_parameter=grain_parameter, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_billing_profile_id( + self, + billing_account_id: str, + billing_profile_id: str, + *, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: + """Lists savings plan utilization summaries for billing profile. Supported at grain values: + 'Daily' and 'Monthly'. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :keyword filter: Supports filtering by properties/benefitId, properties/benefitOrderId and + properties/usageDate. Default value is None. + :paramtype filter: str + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_billing_profile_id_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + grain_parameter=grain_parameter, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_savings_plan_order( + self, + savings_plan_order_id: str, + *, + filter: Optional[str] = None, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: + """Lists the savings plan utilization summaries for daily or monthly grain. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :keyword filter: Supports filtering by properties/usageDate. Default value is None. + :paramtype filter: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_savings_plan_order_request( + savings_plan_order_id=savings_plan_order_id, + filter=filter, + grain_parameter=grain_parameter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + *, + filter: Optional[str] = None, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.BenefitUtilizationSummary"]: + """Lists the savings plan utilization summaries for daily or monthly grain. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :keyword filter: Supports filtering by properties/usageDate. Default value is None. + :paramtype filter: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_savings_plan_id_request( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + filter=filter, + grain_parameter=grain_parameter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class GenerateBenefitUtilizationSummariesReportOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`generate_benefit_utilization_summaries_report` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _generate_by_billing_account_initial( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_billing_account_request( + billing_account_id=billing_account_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_billing_account_initial( + billing_account_id=billing_account_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_billing_profile_initial( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_billing_profile_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_billing_profile_initial( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_reservation_order_id_initial( # pylint: disable=name-too-long + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_reservation_order_id_request( + reservation_order_id=reservation_order_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_reservation_order_id_initial( + reservation_order_id=reservation_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_reservation_id_initial( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_reservation_id_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_reservation_id_initial( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_savings_plan_order_id_initial( # pylint: disable=name-too-long + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_order_id_request( + savings_plan_order_id=savings_plan_order_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_savings_plan_order_id_initial( + savings_plan_order_id=savings_plan_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _generate_by_savings_plan_id_initial( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_id_request( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns BenefitUtilizationSummariesOperationStatus. + The BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_by_savings_plan_id_initial( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class GenerateDetailedCostReportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`generate_detailed_cost_report` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _create_operation_initial( + self, + scope: str, + parameters: Union[_models.GenerateDetailedCostReportDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_detailed_cost_report_create_operation_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.GenerateDetailedCostReportErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-Consumption-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-Consumption-AsyncOperation") + ) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_operation( + self, + scope: str, + parameters: _models.GenerateDetailedCostReportDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns GenerateDetailedCostReportOperationResult. + The GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_operation( + self, scope: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns GenerateDetailedCostReportOperationResult. + The GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_operation( + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns GenerateDetailedCostReportOperationResult. + The GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_operation( + self, + scope: str, + parameters: Union[_models.GenerateDetailedCostReportDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Is one of + the following types: GenerateDetailedCostReportDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns GenerateDetailedCostReportOperationResult. + The GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_operation_initial( + scope=scope, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.GenerateDetailedCostReportOperationResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ForecastOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`forecast` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def usage( + self, + scope: str, + parameters: _models.ForecastDefinition, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. + Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def usage( + self, + scope: str, + parameters: JSON, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. + Required. + :type parameters: JSON + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def usage( + self, + scope: str, + parameters: IO[bytes], + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. + Required. + :type parameters: IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def usage( + self, + scope: str, + parameters: Union[_models.ForecastDefinition, JSON, IO[bytes]], + *, + filter: Optional[str] = None, + **kwargs: Any + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is one + of the following types: ForecastDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or JSON or IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.ForecastResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_forecast_usage_request( + scope=scope, + filter=filter, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ForecastResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: _models.ForecastDefinition, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: JSON, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: JSON + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: IO[bytes], + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: Union[_models.ForecastDefinition, JSON, IO[bytes]], + *, + filter: Optional[str] = None, + **kwargs: Any + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Is one of the following types: ForecastDefinition, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or JSON or IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ForecastResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_forecast_external_cloud_provider_usage_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + filter=filter, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ForecastResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DimensionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`dimensions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + scope: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skiptoken: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.Dimension"]: + """Lists the dimensions by the defined scope. + + :param scope: The scope associated with dimension operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :keyword filter: May be used to filter dimensions by properties/category, + properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', + 'ge'. Default value is None. + :paramtype filter: str + :keyword expand: May be used to expand the properties/data within a dimension category. By + default, data is not included when listing dimensions. Default value is None. + :paramtype expand: str + :keyword skiptoken: Skiptoken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skiptoken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skiptoken: str + :keyword top: May be used to limit the number of results to the most recent N dimension data. + Default value is None. + :paramtype top: int + :return: An iterator like instance of Dimension + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Dimension] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Dimension]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_dimensions_list_request( + scope=scope, + filter=filter, + expand=expand, + skiptoken=skiptoken, + top=top, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Dimension], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skiptoken: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.Dimension"]: + """Lists the dimensions by the external cloud provider type. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :keyword filter: May be used to filter dimensions by properties/category, + properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', + 'ge'. Default value is None. + :paramtype filter: str + :keyword expand: May be used to expand the properties/data within a dimension category. By + default, data is not included when listing dimensions. Default value is None. + :paramtype expand: str + :keyword skiptoken: Skiptoken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skiptoken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skiptoken: str + :keyword top: May be used to limit the number of results to the most recent N dimension data. + Default value is None. + :paramtype top: int + :return: An iterator like instance of Dimension + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.Dimension] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Dimension]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_dimensions_by_external_cloud_provider_type_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + filter=filter, + expand=expand, + skiptoken=skiptoken, + top=top, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Dimension], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class QueryOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`query` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def usage( + self, scope: str, parameters: _models.QueryDefinition, *, content_type: str = "application/json", **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def usage( + self, scope: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def usage( + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def usage( + self, scope: str, parameters: Union[_models.QueryDefinition, JSON, IO[bytes]], **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is one of + the following types: QueryDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or JSON or IO[bytes] + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.QueryResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_query_usage_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QueryResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: _models.QueryDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: Union[_models.QueryDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Is one of the following types: QueryDefinition, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or JSON or IO[bytes] + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.QueryResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_query_usage_by_external_cloud_provider_type_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QueryResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GenerateReservationDetailsReportOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`generate_reservation_details_report` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _by_billing_account_id_initial( + self, billing_account_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_generate_reservation_details_report_by_billing_account_id_request( + billing_account_id=billing_account_id, + start_date=start_date, + end_date=end_date, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_by_billing_account_id( + self, billing_account_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatus]: + """Generates the reservations details report for provided date range asynchronously based on + enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. + For more details on the roles see, + `https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + `_. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :keyword start_date: Start Date. Required. + :paramtype start_date: str + :keyword end_date: End Date. Required. + :paramtype end_date: str + :return: An instance of AsyncLROPoller that returns OperationStatus. The OperationStatus is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._by_billing_account_id_initial( + billing_account_id=billing_account_id, + start_date=start_date, + end_date=end_date, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _by_billing_profile_id_initial( + self, billing_account_id: str, billing_profile_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_generate_reservation_details_report_by_billing_profile_id_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + start_date=start_date, + end_date=end_date, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_by_billing_profile_id( + self, billing_account_id: str, billing_profile_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatus]: + """Generates the reservations details report for provided date range asynchronously by billing + profile. The Reservation usage details can be viewed by only certain enterprise roles by + default. For more details on the roles see, + `https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access + `_. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :keyword start_date: Start Date. Required. + :paramtype start_date: str + :keyword end_date: End Date. Required. + :paramtype end_date: str + :return: An instance of AsyncLROPoller that returns OperationStatus. The OperationStatus is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._by_billing_profile_id_initial( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + start_date=start_date, + end_date=end_date, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class PriceSheetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s + :attr:`price_sheet` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _download_by_invoice_initial( + self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_price_sheet_download_by_invoice_request( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + invoice_name=invoice_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_download_by_invoice( + self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.DownloadURL]: + """Gets a URL to download the pricesheet for an invoice. The operation is supported for billing + accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + + :param billing_account_name: BillingAccount ID. Required. + :type billing_account_name: str + :param billing_profile_name: Billing Profile Name. Required. + :type billing_profile_name: str + :param invoice_name: The ID that uniquely identifies an invoice. Required. + :type invoice_name: str + :return: An instance of AsyncLROPoller that returns DownloadURL. The DownloadURL is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.DownloadURL] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DownloadURL] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._download_by_invoice_initial( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + invoice_name=invoice_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DownloadURL, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DownloadURL].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DownloadURL]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _download_by_billing_profile_initial( + self, billing_account_name: str, billing_profile_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_price_sheet_download_by_billing_profile_request( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_download_by_billing_profile( + self, billing_account_name: str, billing_profile_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.PricesheetDownloadProperties]: + """Gets a URL to download the current month's pricesheet for a billing profile. The operation is + supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + Customer Agreement. + + You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure + Reserved Instance (RI) pricing is only available through the new version of the API. + + Due to Azure product growth, the Azure price sheet download experience in this preview version + will be updated from a single csv/json file to a Zip file containing multiple csv/json files, + each with max size of 75MB. + + :param billing_account_name: BillingAccount ID. Required. + :type billing_account_name: str + :param billing_profile_name: Billing Profile Name. Required. + :type billing_profile_name: str + :return: An instance of AsyncLROPoller that returns PricesheetDownloadProperties. The + PricesheetDownloadProperties is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.PricesheetDownloadProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PricesheetDownloadProperties] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._download_by_billing_profile_initial( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PricesheetDownloadProperties, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PricesheetDownloadProperties].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PricesheetDownloadProperties]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _download_by_billing_account_initial( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_price_sheet_download_by_billing_account_request( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_download_by_billing_account( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatus]: + """Generates the pricesheet for the provided billing period asynchronously based on the Enrollment + ID. This is for Enterprise Agreement customers. + + **Migrate to version 2025-03-01** + + You can use the 2025-03-01 API version with the new URI: + + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download' + + With a new schema detailed below, the new version of the price sheet provides additional + information and includes prices for Azure Reserved Instances (RI) for the current billing + period. We recommend downloading an Azure Price Sheet for when entering a new billing period if + you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing. + + The EA Azure price sheet is available for billing periods in the past 13 months. To request a + price sheet for a billing period older than 13 months, please contact support. + + The Azure price sheet download experience has been updated from a single .csv file to a zip + file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has + been upgraded to use http POST method; details can be found below. + + All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account + (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to + be retired on 01 June 2026 and will no longer be supported after this date. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_period_name: Billing Period Name. Required. + :type billing_period_name: str + :return: An instance of AsyncLROPoller that returns OperationStatus. The OperationStatus is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._download_by_billing_account_initial( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py deleted file mode 100644 index 0b49c54965da..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_price_sheet_operations.py +++ /dev/null @@ -1,460 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._price_sheet_operations import ( - build_download_by_billing_account_request, - build_download_by_billing_profile_request, - build_download_by_invoice_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PriceSheetOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`price_sheet` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _download_by_invoice_initial( - self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_by_invoice_request( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - invoice_name=invoice_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) - response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_download_by_invoice( - self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.DownloadURL]: - """Gets a URL to download the pricesheet for an invoice. The operation is supported for billing - accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. - - :param billing_account_name: The ID that uniquely identifies a billing account. Required. - :type billing_account_name: str - :param billing_profile_name: The ID that uniquely identifies a billing profile. Required. - :type billing_profile_name: str - :param invoice_name: The ID that uniquely identifies an invoice. Required. - :type invoice_name: str - :return: An instance of AsyncLROPoller that returns either DownloadURL or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.DownloadURL] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DownloadURL] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._download_by_invoice_initial( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - invoice_name=invoice_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DownloadURL", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DownloadURL].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DownloadURL]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _download_by_billing_profile_initial( - self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_by_billing_profile_request( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) - response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_download_by_billing_profile( - self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.PricesheetDownloadProperties]: - """Gets a URL to download the current month's pricesheet for a billing profile. The operation is - supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft - Customer Agreement. - - You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure - Reserved Instance (RI) pricing is only available through the new version of the API. - - Due to Azure product growth, the Azure price sheet download experience in this preview version - will be updated from a single csv/json file to a Zip file containing multiple csv/json files, - each with max size of 75MB. - - :param billing_account_name: The ID that uniquely identifies a billing account. Required. - :type billing_account_name: str - :param billing_profile_name: The ID that uniquely identifies a billing profile. Required. - :type billing_profile_name: str - :return: An instance of AsyncLROPoller that returns either PricesheetDownloadProperties or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.PricesheetDownloadProperties] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PricesheetDownloadProperties] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._download_by_billing_profile_initial( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PricesheetDownloadProperties", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PricesheetDownloadProperties].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PricesheetDownloadProperties]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _download_by_billing_account_initial( - self, billing_account_id: str, billing_period_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_by_billing_account_request( - billing_account_id=billing_account_id, - billing_period_name=billing_period_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated2, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_download_by_billing_account( - self, billing_account_id: str, billing_period_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.OperationStatusAutoGenerated]: - """Generates the pricesheet for the provided billing period asynchronously based on the Enrollment - ID. This is for Enterprise Agreement customers. - - **Migrate to version 2025-03-01** - - You can use the 2025-03-01 API version with the new URI: - - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download' - - With a new schema detailed below, the new version of the price sheet provides additional - information and includes prices for Azure Reserved Instances (RI) for the current billing - period. We recommend downloading an Azure Price Sheet for when entering a new billing period if - you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing. - - The EA Azure price sheet is available for billing periods in the past 13 months. To request a - price sheet for a billing period older than 13 months, please contact support. - - The Azure price sheet download experience has been updated from a single .csv file to a zip - file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has - been upgraded to use http POST method; details can be found below. - - All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account - (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to - be retired on 01 June 2026 and will no longer be supported after this date. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param billing_period_name: Billing Period Name. Required. - :type billing_period_name: str - :return: An instance of AsyncLROPoller that returns either OperationStatusAutoGenerated or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.costmanagement.models.OperationStatusAutoGenerated] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusAutoGenerated] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._download_by_billing_account_initial( - billing_account_id=billing_account_id, - billing_period_name=billing_period_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatusAutoGenerated", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OperationStatusAutoGenerated].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OperationStatusAutoGenerated]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py deleted file mode 100644 index 68da7e26282d..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_query_operations.py +++ /dev/null @@ -1,375 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._query_operations import build_usage_by_external_cloud_provider_type_request, build_usage_request -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class QueryOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`query` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def usage( - self, scope: str, parameters: _models.QueryDefinition, *, content_type: str = "application/json", **kwargs: Any - ) -> Optional[_models.QueryResult]: - """Query the usage data for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with query and export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def usage( - self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> Optional[_models.QueryResult]: - """Query the usage data for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with query and export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def usage( - self, scope: str, parameters: Union[_models.QueryDefinition, IO[bytes]], **kwargs: Any - ) -> Optional[_models.QueryResult]: - """Query the usage data for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with query and export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] - :return: QueryResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.QueryResult]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QueryDefinition") - - _request = build_usage_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("QueryResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def usage_by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: _models.QueryDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QueryResult: - """Query the usage data for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def usage_by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QueryResult: - """Query the usage data for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def usage_by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: Union[_models.QueryDefinition, IO[bytes]], - **kwargs: Any - ) -> _models.QueryResult: - """Query the usage data for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.QueryResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QueryDefinition") - - _request = build_usage_by_external_cloud_provider_type_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QueryResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py deleted file mode 100644 index 4d691d449898..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_scheduled_actions_operations.py +++ /dev/null @@ -1,1245 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._scheduled_actions_operations import ( - build_check_name_availability_by_scope_request, - build_check_name_availability_request, - build_create_or_update_by_scope_request, - build_create_or_update_request, - build_delete_by_scope_request, - build_delete_request, - build_get_by_scope_request, - build_get_request, - build_list_by_scope_request, - build_list_request, - build_run_by_scope_request, - build_run_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ScheduledActionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`scheduled_actions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncItemPaged["_models.ScheduledAction"]: - """List all private scheduled actions. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator - is 'eq'. Default value is None. - :type filter: str - :return: An iterator like instance of either ScheduledAction or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_scope( - self, scope: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.ScheduledAction"]: - """List all shared scheduled actions within the given scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator - is 'eq'. Default value is None. - :type filter: str - :return: An iterator like instance of either ScheduledAction or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_scope_request( - scope=scope, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @overload - async def create_or_update( - self, - name: str, - scheduled_action: _models.ScheduledAction, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - name: str, - scheduled_action: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - name: str, - scheduled_action: Union[_models.ScheduledAction, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO[bytes] type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scheduled_action, (IOBase, bytes)): - _content = scheduled_action - else: - _json = self._serialize.body(scheduled_action, "ScheduledAction") - - _request = build_create_or_update_request( - name=name, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: - """Get the private scheduled action by name. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param name: Scheduled action name. Required. - :type name: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - _request = build_get_request( - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, name: str, **kwargs: Any) -> None: - """Delete a private scheduled action. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def create_or_update_by_scope( - self, - scope: str, - name: str, - scheduled_action: _models.ScheduledAction, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update_by_scope( - self, - scope: str, - name: str, - scheduled_action: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update_by_scope( - self, - scope: str, - name: str, - scheduled_action: Union[_models.ScheduledAction, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO[bytes] type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scheduled_action, (IOBase, bytes)): - _content = scheduled_action - else: - _json = self._serialize.body(scheduled_action, "ScheduledAction") - - _request = build_create_or_update_by_scope_request( - scope=scope, - name=name, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.ScheduledAction: - """Get the shared scheduled action from the given scope by name. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - _request = build_get_by_scope_request( - scope=scope, - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete_by_scope(self, scope: str, name: str, **kwargs: Any) -> None: - """Delete a scheduled action within the given scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_by_scope_request( - scope=scope, - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def run(self, name: str, **kwargs: Any) -> None: - """Processes a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_run_request( - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def run_by_scope(self, scope: str, name: str, **kwargs: Any) -> None: - """Runs a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_run_by_scope_request( - scope=scope, - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - async def check_name_availability( - self, - check_name_availability_request: _models.CheckNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action. - - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, check_name_availability_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action. - - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action. - - :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO[bytes] type. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_request, (IOBase, bytes)): - _content = check_name_availability_request - else: - _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - - _request = build_check_name_availability_request( - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def check_name_availability_by_scope( - self, - scope: str, - check_name_availability_request: _models.CheckNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability_by_scope( - self, - scope: str, - check_name_availability_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability_by_scope( - self, - scope: str, - check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO[bytes] type. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_request, (IOBase, bytes)): - _content = check_name_availability_request - else: - _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - - _request = build_check_name_availability_by_scope_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py deleted file mode 100644 index 1c07cbd6a241..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_settings_operations.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._settings_operations import ( - build_create_or_update_by_scope_request, - build_delete_by_scope_request, - build_get_by_scope_request, - build_list_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class SettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list(self, scope: str, **kwargs: Any) -> _models.SettingsListResult: - """List all cost management settings in the requested scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :return: SettingsListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.SettingsListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SettingsListResult] = kwargs.pop("cls", None) - - _request = build_list_request( - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SettingsListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update_by_scope( - self, - scope: str, - type: Union[str, _models.SettingType], - setting: _models.Setting, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Setting: - """Create or update a setting within the given scope. - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :param setting: Setting to be created or updated. Required. - :type setting: ~azure.mgmt.costmanagement.models.Setting - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update_by_scope( - self, - scope: str, - type: Union[str, _models.SettingType], - setting: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Setting: - """Create or update a setting within the given scope. - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :param setting: Setting to be created or updated. Required. - :type setting: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update_by_scope( - self, - scope: str, - type: Union[str, _models.SettingType], - setting: Union[_models.Setting, IO[bytes]], - **kwargs: Any - ) -> _models.Setting: - """Create or update a setting within the given scope. - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :param setting: Setting to be created or updated. Is either a Setting type or a IO[bytes] type. - Required. - :type setting: ~azure.mgmt.costmanagement.models.Setting or IO[bytes] - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Setting] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(setting, (IOBase, bytes)): - _content = setting - else: - _json = self._serialize.body(setting, "Setting") - - _request = build_create_or_update_by_scope_request( - scope=scope, - type=type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Setting", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> _models.Setting: - """Get the setting from the given scope by name. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Setting] = kwargs.pop("cls", None) - - _request = build_get_by_scope_request( - scope=scope, - type=type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Setting", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> None: - """Delete a setting within the given scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_by_scope_request( - scope=scope, - type=type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py deleted file mode 100644 index 1ef8d5f02fae..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_views_operations.py +++ /dev/null @@ -1,814 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._views_operations import ( - build_create_or_update_by_scope_request, - build_create_or_update_request, - build_delete_by_scope_request, - build_delete_request, - build_get_by_scope_request, - build_get_request, - build_list_by_scope_request, - build_list_request, -) -from .._configuration import CostManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ViewsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.aio.CostManagementClient`'s - :attr:`views` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.View"]: - """Lists all views by tenant and object. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :return: An iterator like instance of either View or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.View] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ViewListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_scope(self, scope: str, **kwargs: Any) -> AsyncItemPaged["_models.View"]: - """Lists all views at the given scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :return: An iterator like instance of either View or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.View] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_scope_request( - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ViewListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, view_name: str, **kwargs: Any) -> _models.View: - """Gets the view by view name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - _request = build_get_request( - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, view_name: str, parameters: _models.View, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, view_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "View") - - _request = build_create_or_update_request( - view_name=view_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, view_name: str, **kwargs: Any) -> None: - """The operation to delete a view. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.View: - """Gets the view for the defined scope by view name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - _request = build_get_by_scope_request( - scope=scope, - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update_by_scope( - self, - scope: str, - view_name: str, - parameters: _models.View, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update_by_scope( - self, - scope: str, - view_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update_by_scope( - self, scope: str, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "View") - - _request = build_create_or_update_by_scope_request( - scope=scope, - view_name=view_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> None: - """The operation to delete a view. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_by_scope_request( - scope=scope, - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py index 8dd49c78927c..ff9e79ff3786 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,19 +13,19 @@ from ._patch import * # pylint: disable=unused-wildcard-import -from ._models_py3 import ( # type: ignore +from ._models import ( # type: ignore Alert, + AlertProperties, AlertPropertiesDefinition, AlertPropertiesDetails, AlertsResult, AllSavingsBenefitDetails, AllSavingsList, + ArmErrorResponse, AsyncOperationStatusProperties, BenefitRecommendationModel, BenefitRecommendationProperties, - BenefitRecommendationsListResult, BenefitResource, - BenefitUtilizationSummariesListResult, BenefitUtilizationSummariesOperationStatus, BenefitUtilizationSummariesRequest, BenefitUtilizationSummary, @@ -35,8 +35,8 @@ BudgetComparisonExpression, BudgetFilter, BudgetFilterProperties, + BudgetProperties, BudgetTimePeriod, - BudgetsListResult, CheckNameAvailabilityRequest, CheckNameAvailabilityResponse, CommonExportProperties, @@ -46,7 +46,6 @@ CostAllocationRuleCheckNameAvailabilityResponse, CostAllocationRuleDefinition, CostAllocationRuleDetails, - CostAllocationRuleList, CostAllocationRuleProperties, CostDetailsOperationResults, CostDetailsTimePeriod, @@ -55,18 +54,14 @@ CostManagementResource, CurrentSpend, Dimension, - DimensionsListResult, + DimensionProperties, DismissAlertPayload, DownloadURL, - EAPriceSheetProperties, ErrorAdditionalInfo, ErrorDetail, - ErrorDetailAutoGenerated, ErrorDetails, ErrorDetailsWithNestedDetails, ErrorResponse, - ErrorResponseAutoGenerated, - ErrorResponseAutoGenerated2, ErrorResponseWithNestedDetails, Export, ExportDataset, @@ -79,10 +74,12 @@ ExportProperties, ExportRecurrencePeriod, ExportRun, + ExportRunProperties, ExportRunRequest, ExportSchedule, ExportSuspensionContext, ExportTimePeriod, + ExtensionResource, FileDestination, FilterItems, ForecastAggregation, @@ -92,6 +89,7 @@ ForecastDatasetConfiguration, ForecastDefinition, ForecastFilter, + ForecastProperties, ForecastResult, ForecastSpend, ForecastTimePeriod, @@ -110,9 +108,7 @@ NotificationProperties, Operation, OperationDisplay, - OperationListResult, OperationStatus, - OperationStatusAutoGenerated, PivotProperties, PricesheetDownloadProperties, ProxyResource, @@ -124,6 +120,7 @@ QueryDefinition, QueryFilter, QueryGrouping, + QueryProperties, QueryResult, QueryTimePeriod, RecommendationUsageDetails, @@ -131,17 +128,20 @@ ReportConfigComparisonExpression, ReportConfigDataset, ReportConfigDatasetConfiguration, + ReportConfigDefinition, ReportConfigFilter, ReportConfigGrouping, ReportConfigSorting, ReportConfigTimePeriod, + ReportManifest, + ReportURL, + RequestContext, Resource, SavingsPlanUtilizationSummary, SavingsPlanUtilizationSummaryProperties, ScheduleProperties, ScheduledAction, - ScheduledActionListResult, - ScheduledActionProxyResource, + ScheduledActionProperties, Setting, SettingsListResult, SharedScopeBenefitRecommendationProperties, @@ -154,10 +154,10 @@ TagInheritanceSetting, TargetCostAllocationResource, View, - ViewListResult, + ViewProperties, ) -from ._cost_management_client_enums import ( # type: ignore +from ._enums import ( # type: ignore AccumulatedType, ActionType, AlertCategory, @@ -202,13 +202,13 @@ Grain, GrainParameter, GranularityType, - KpiType, + KpiTypeType, LookBackPeriod, MetricType, OperationStatusType, OperatorType, Origin, - PivotType, + PivotTypeType, QueryColumnType, QueryOperatorType, Reason, @@ -240,17 +240,17 @@ __all__ = [ "Alert", + "AlertProperties", "AlertPropertiesDefinition", "AlertPropertiesDetails", "AlertsResult", "AllSavingsBenefitDetails", "AllSavingsList", + "ArmErrorResponse", "AsyncOperationStatusProperties", "BenefitRecommendationModel", "BenefitRecommendationProperties", - "BenefitRecommendationsListResult", "BenefitResource", - "BenefitUtilizationSummariesListResult", "BenefitUtilizationSummariesOperationStatus", "BenefitUtilizationSummariesRequest", "BenefitUtilizationSummary", @@ -260,8 +260,8 @@ "BudgetComparisonExpression", "BudgetFilter", "BudgetFilterProperties", + "BudgetProperties", "BudgetTimePeriod", - "BudgetsListResult", "CheckNameAvailabilityRequest", "CheckNameAvailabilityResponse", "CommonExportProperties", @@ -271,7 +271,6 @@ "CostAllocationRuleCheckNameAvailabilityResponse", "CostAllocationRuleDefinition", "CostAllocationRuleDetails", - "CostAllocationRuleList", "CostAllocationRuleProperties", "CostDetailsOperationResults", "CostDetailsTimePeriod", @@ -280,18 +279,14 @@ "CostManagementResource", "CurrentSpend", "Dimension", - "DimensionsListResult", + "DimensionProperties", "DismissAlertPayload", "DownloadURL", - "EAPriceSheetProperties", "ErrorAdditionalInfo", "ErrorDetail", - "ErrorDetailAutoGenerated", "ErrorDetails", "ErrorDetailsWithNestedDetails", "ErrorResponse", - "ErrorResponseAutoGenerated", - "ErrorResponseAutoGenerated2", "ErrorResponseWithNestedDetails", "Export", "ExportDataset", @@ -304,10 +299,12 @@ "ExportProperties", "ExportRecurrencePeriod", "ExportRun", + "ExportRunProperties", "ExportRunRequest", "ExportSchedule", "ExportSuspensionContext", "ExportTimePeriod", + "ExtensionResource", "FileDestination", "FilterItems", "ForecastAggregation", @@ -317,6 +314,7 @@ "ForecastDatasetConfiguration", "ForecastDefinition", "ForecastFilter", + "ForecastProperties", "ForecastResult", "ForecastSpend", "ForecastTimePeriod", @@ -335,9 +333,7 @@ "NotificationProperties", "Operation", "OperationDisplay", - "OperationListResult", "OperationStatus", - "OperationStatusAutoGenerated", "PivotProperties", "PricesheetDownloadProperties", "ProxyResource", @@ -349,6 +345,7 @@ "QueryDefinition", "QueryFilter", "QueryGrouping", + "QueryProperties", "QueryResult", "QueryTimePeriod", "RecommendationUsageDetails", @@ -356,17 +353,20 @@ "ReportConfigComparisonExpression", "ReportConfigDataset", "ReportConfigDatasetConfiguration", + "ReportConfigDefinition", "ReportConfigFilter", "ReportConfigGrouping", "ReportConfigSorting", "ReportConfigTimePeriod", + "ReportManifest", + "ReportURL", + "RequestContext", "Resource", "SavingsPlanUtilizationSummary", "SavingsPlanUtilizationSummaryProperties", "ScheduleProperties", "ScheduledAction", - "ScheduledActionListResult", - "ScheduledActionProxyResource", + "ScheduledActionProperties", "Setting", "SettingsListResult", "SharedScopeBenefitRecommendationProperties", @@ -379,7 +379,7 @@ "TagInheritanceSetting", "TargetCostAllocationResource", "View", - "ViewListResult", + "ViewProperties", "AccumulatedType", "ActionType", "AlertCategory", @@ -424,13 +424,13 @@ "Grain", "GrainParameter", "GranularityType", - "KpiType", + "KpiTypeType", "LookBackPeriod", "MetricType", "OperationStatusType", "OperatorType", "Origin", - "PivotType", + "PivotTypeType", "QueryColumnType", "QueryOperatorType", "Reason", diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_enums.py similarity index 77% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_enums.py index 28826f9c9dfa..11c3d40f4243 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_enums.py @@ -1,8 +1,9 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -14,93 +15,143 @@ class AccumulatedType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Show costs accumulated over time.""" TRUE = "true" + """TRUE.""" FALSE = "false" + """FALSE.""" class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.""" + """Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal + only APIs. + """ INTERNAL = "Internal" + """Actions are for internal-only APIs.""" class AlertCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Alert category.""" COST = "Cost" + """COST.""" USAGE = "Usage" + """USAGE.""" BILLING = "Billing" + """BILLING.""" SYSTEM = "System" + """SYSTEM.""" class AlertCriteria(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Criteria that triggered alert.""" COST_THRESHOLD_EXCEEDED = "CostThresholdExceeded" + """COST_THRESHOLD_EXCEEDED.""" USAGE_THRESHOLD_EXCEEDED = "UsageThresholdExceeded" + """USAGE_THRESHOLD_EXCEEDED.""" CREDIT_THRESHOLD_APPROACHING = "CreditThresholdApproaching" + """CREDIT_THRESHOLD_APPROACHING.""" CREDIT_THRESHOLD_REACHED = "CreditThresholdReached" + """CREDIT_THRESHOLD_REACHED.""" QUOTA_THRESHOLD_APPROACHING = "QuotaThresholdApproaching" + """QUOTA_THRESHOLD_APPROACHING.""" QUOTA_THRESHOLD_REACHED = "QuotaThresholdReached" + """QUOTA_THRESHOLD_REACHED.""" MULTI_CURRENCY = "MultiCurrency" + """MULTI_CURRENCY.""" FORECAST_COST_THRESHOLD_EXCEEDED = "ForecastCostThresholdExceeded" + """FORECAST_COST_THRESHOLD_EXCEEDED.""" FORECAST_USAGE_THRESHOLD_EXCEEDED = "ForecastUsageThresholdExceeded" + """FORECAST_USAGE_THRESHOLD_EXCEEDED.""" INVOICE_DUE_DATE_APPROACHING = "InvoiceDueDateApproaching" + """INVOICE_DUE_DATE_APPROACHING.""" INVOICE_DUE_DATE_REACHED = "InvoiceDueDateReached" + """INVOICE_DUE_DATE_REACHED.""" CROSS_CLOUD_NEW_DATA_AVAILABLE = "CrossCloudNewDataAvailable" + """CROSS_CLOUD_NEW_DATA_AVAILABLE.""" CROSS_CLOUD_COLLECTION_ERROR = "CrossCloudCollectionError" + """CROSS_CLOUD_COLLECTION_ERROR.""" GENERAL_THRESHOLD_ERROR = "GeneralThresholdError" + """GENERAL_THRESHOLD_ERROR.""" class AlertOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """operator used to compare currentSpend with amount.""" NONE = "None" + """NONE.""" EQUAL_TO = "EqualTo" + """EQUAL_TO.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL_TO = "GreaterThanOrEqualTo" + """GREATER_THAN_OR_EQUAL_TO.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL_TO = "LessThanOrEqualTo" + """LESS_THAN_OR_EQUAL_TO.""" class AlertSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Source of alert.""" PRESET = "Preset" + """PRESET.""" USER = "User" + """USER.""" class AlertStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """alert status.""" NONE = "None" + """NONE.""" ACTIVE = "Active" + """ACTIVE.""" OVERRIDDEN = "Overridden" + """OVERRIDDEN.""" RESOLVED = "Resolved" + """RESOLVED.""" DISMISSED = "Dismissed" + """DISMISSED.""" class AlertTimeGrainType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of timegrain cadence.""" NONE = "None" + """NONE.""" MONTHLY = "Monthly" + """MONTHLY.""" QUARTERLY = "Quarterly" + """QUARTERLY.""" ANNUALLY = "Annually" + """ANNUALLY.""" BILLING_MONTH = "BillingMonth" + """BILLING_MONTH.""" BILLING_QUARTER = "BillingQuarter" + """BILLING_QUARTER.""" BILLING_ANNUAL = "BillingAnnual" + """BILLING_ANNUAL.""" class AlertType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """type of alert.""" BUDGET = "Budget" + """BUDGET.""" INVOICE = "Invoice" + """INVOICE.""" CREDIT = "Credit" + """CREDIT.""" QUOTA = "Quota" + """QUOTA.""" GENERAL = "General" + """GENERAL.""" X_CLOUD = "xCloud" + """X_CLOUD.""" BUDGET_FORECAST = "BudgetForecast" + """BUDGET_FORECAST.""" class BenefitKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -121,29 +172,36 @@ class BenefitUtilizationSummaryReportSchema(str, Enum, metaclass=CaseInsensitive """ KIND = "Kind" + """KIND.""" AVG_UTILIZATION_PERCENTAGE = "AvgUtilizationPercentage" + """AVG_UTILIZATION_PERCENTAGE.""" BENEFIT_ORDER_ID = "BenefitOrderId" + """BENEFIT_ORDER_ID.""" BENEFIT_ID = "BenefitId" + """BENEFIT_ID.""" BENEFIT_TYPE = "BenefitType" + """BENEFIT_TYPE.""" MAX_UTILIZATION_PERCENTAGE = "MaxUtilizationPercentage" + """MAX_UTILIZATION_PERCENTAGE.""" MIN_UTILIZATION_PERCENTAGE = "MinUtilizationPercentage" + """MIN_UTILIZATION_PERCENTAGE.""" USAGE_DATE = "UsageDate" + """USAGE_DATE.""" UTILIZED_PERCENTAGE = "UtilizedPercentage" + """UTILIZED_PERCENTAGE.""" class BudgetNotificationOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The comparison operator. - Supported for CategoryType(s): Cost, ReservationUtilization. - - Supported operators for **CategoryType: Cost** + Supported for CategoryType(s): Cost, ReservationUtilization. + Supported operators for **CategoryType: Cost** * GreaterThan - * - GreaterThanOrEqualTo + * GreaterThanOrEqualTo - Supported operators for **CategoryType: ReservationUtilization** + Supported operators for **CategoryType: ReservationUtilization** * LessThan. """ @@ -154,34 +212,34 @@ class BudgetNotificationOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMet as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. - Supported for CategoryType(s): Cost.""" + Supported for CategoryType(s): Cost.""" GREATER_THAN = "GreaterThan" """Notification will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. - Supported for CategoryType(s): Cost.""" + Supported for CategoryType(s): Cost.""" GREATER_THAN_OR_EQUAL_TO = "GreaterThanOrEqualTo" """Notification will be triggered if the evaluated cost is greater than or equal to the threshold value. - Supported for CategoryType(s): Cost.""" + Supported for CategoryType(s): Cost.""" LESS_THAN = "LessThan" """Notification will be triggered if any Reservations in the scope of the Reservation Utilization Alert Rule have a utilization less than the threshold percentage. - Supported for CategoryType(s): ReservationUtilization.""" + Supported for CategoryType(s): ReservationUtilization.""" class BudgetOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operator to use for comparison.""" IN = "In" + """IN.""" class CategoryType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The category of the budget. - * 'Cost' defines a Budget. * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. """ @@ -198,17 +256,24 @@ class ChartType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Chart type of the main view in Cost Analysis. Required.""" AREA = "Area" + """AREA.""" LINE = "Line" + """LINE.""" STACKED_COLUMN = "StackedColumn" + """STACKED_COLUMN.""" GROUPED_COLUMN = "GroupedColumn" + """GROUPED_COLUMN.""" TABLE = "Table" + """TABLE.""" class CheckNameAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The reason why the given name is not available.""" + """Possible reasons for a name not being available.""" INVALID = "Invalid" + """Name is invalid.""" ALREADY_EXISTS = "AlreadyExists" + """Name already exists.""" class CompressionModeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -217,8 +282,11 @@ class CompressionModeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ GZIP = "gzip" + """GZIP.""" SNAPPY = "snappy" + """SNAPPY.""" NONE = "none" + """NONE.""" class CostAllocationPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -227,6 +295,7 @@ class CostAllocationPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ FIXED_PROPORTION = "FixedProportion" + """FIXED_PROPORTION.""" class CostAllocationResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -267,12 +336,16 @@ class CostDetailsStatusType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" + """The kind of entity that created the resource.""" USER = "User" + """The entity was created by a user.""" APPLICATION = "Application" + """The entity was created by an application.""" MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" KEY = "Key" + """The entity was created by a key.""" class CultureCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -282,26 +355,47 @@ class CultureCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ EN_US = "en-us" + """EN_US.""" JA_JP = "ja-jp" + """JA_JP.""" ZH_CN = "zh-cn" + """ZH_CN.""" DE_DE = "de-de" + """DE_DE.""" ES_ES = "es-es" + """ES_ES.""" FR_FR = "fr-fr" + """FR_FR.""" IT_IT = "it-it" + """IT_IT.""" KO_KR = "ko-kr" + """KO_KR.""" PT_BR = "pt-br" + """PT_BR.""" RU_RU = "ru-ru" + """RU_RU.""" ZH_TW = "zh-tw" + """ZH_TW.""" CS_CZ = "cs-cz" + """CS_CZ.""" PL_PL = "pl-pl" + """PL_PL.""" TR_TR = "tr-tr" + """TR_TR.""" DA_DK = "da-dk" + """DA_DK.""" EN_GB = "en-gb" + """EN_GB.""" HU_HU = "hu-hu" + """HU_HU.""" NB_NO = "nb-no" + """NB_NO.""" NL_NL = "nl-nl" + """NL_NL.""" PT_PT = "pt-pt" + """PT_PT.""" SV_SE = "sv-se" + """SV_SE.""" class DataOverwriteBehaviorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -311,44 +405,63 @@ class DataOverwriteBehaviorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ OVERWRITE_PREVIOUS_REPORT = "OverwritePreviousReport" + """OVERWRITE_PREVIOUS_REPORT.""" CREATE_NEW_REPORT = "CreateNewReport" + """CREATE_NEW_REPORT.""" class DaysOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Days of Week.""" MONDAY = "Monday" + """MONDAY.""" TUESDAY = "Tuesday" + """TUESDAY.""" WEDNESDAY = "Wednesday" + """WEDNESDAY.""" THURSDAY = "Thursday" + """THURSDAY.""" FRIDAY = "Friday" + """FRIDAY.""" SATURDAY = "Saturday" + """SATURDAY.""" SUNDAY = "Sunday" + """SUNDAY.""" class DestinationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The export delivery destination type. Currently only 'AzureBlob' is supported.""" AZURE_BLOB = "AzureBlob" + """AZURE_BLOB.""" class ExecutionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The last known status of the export run.""" QUEUED = "Queued" + """QUEUED.""" IN_PROGRESS = "InProgress" + """IN_PROGRESS.""" COMPLETED = "Completed" + """COMPLETED.""" FAILED = "Failed" + """FAILED.""" TIMEOUT = "Timeout" + """TIMEOUT.""" NEW_DATA_NOT_AVAILABLE = "NewDataNotAvailable" + """NEW_DATA_NOT_AVAILABLE.""" DATA_NOT_AVAILABLE = "DataNotAvailable" + """DATA_NOT_AVAILABLE.""" class ExecutionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the export run.""" ON_DEMAND = "OnDemand" + """ON_DEMAND.""" SCHEDULED = "Scheduled" + """SCHEDULED.""" class ExportType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -357,26 +470,37 @@ class ExportType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ USAGE = "Usage" + """USAGE.""" ACTUAL_COST = "ActualCost" + """ACTUAL_COST.""" AMORTIZED_COST = "AmortizedCost" + """AMORTIZED_COST.""" FOCUS_COST = "FocusCost" + """FOCUS_COST.""" PRICE_SHEET = "PriceSheet" + """PRICE_SHEET.""" RESERVATION_TRANSACTIONS = "ReservationTransactions" + """RESERVATION_TRANSACTIONS.""" RESERVATION_RECOMMENDATIONS = "ReservationRecommendations" + """RESERVATION_RECOMMENDATIONS.""" RESERVATION_DETAILS = "ReservationDetails" + """RESERVATION_DETAILS.""" class ExternalCloudProviderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ExternalCloudProviderType.""" + """Type of ExternalCloudProviderType.""" EXTERNAL_SUBSCRIPTIONS = "externalSubscriptions" + """EXTERNAL_SUBSCRIPTIONS.""" EXTERNAL_BILLING_ACCOUNTS = "externalBillingAccounts" + """EXTERNAL_BILLING_ACCOUNTS.""" class FileFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Destination of the view data. Currently only CSV format is supported.""" CSV = "Csv" + """CSV.""" class FilterItemNames(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -386,35 +510,45 @@ class FilterItemNames(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ RESERVATION_SCOPE = "ReservationScope" + """RESERVATION_SCOPE.""" RESOURCE_TYPE = "ResourceType" + """RESOURCE_TYPE.""" LOOK_BACK_PERIOD = "LookBackPeriod" + """LOOK_BACK_PERIOD.""" class ForecastOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operator to use for comparison.""" IN = "In" + """IN.""" class ForecastTimeframe(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The time frame for pulling data for the forecast.""" CUSTOM = "Custom" + """CUSTOM.""" class ForecastType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the forecast.""" USAGE = "Usage" + """USAGE.""" ACTUAL_COST = "ActualCost" + """ACTUAL_COST.""" AMORTIZED_COST = "AmortizedCost" + """AMORTIZED_COST.""" class FormatType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The format of the export being delivered.""" CSV = "Csv" + """CSV.""" PARQUET = "Parquet" + """PARQUET.""" class Frequency(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -423,7 +557,7 @@ class Frequency(str, Enum, metaclass=CaseInsensitiveEnumMeta): default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when timeGrain: Last30Days). - Supported for CategoryType(s): ReservationUtilization. + Supported for CategoryType(s): ReservationUtilization. """ DAILY = "Daily" @@ -441,22 +575,29 @@ class FunctionName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The name of the column to aggregate.""" PRE_TAX_COST_USD = "PreTaxCostUSD" + """PRE_TAX_COST_USD.""" COST = "Cost" + """COST.""" COST_USD = "CostUSD" + """COST_USD.""" PRE_TAX_COST = "PreTaxCost" + """PRE_TAX_COST.""" class FunctionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The name of the aggregation function to use.""" SUM = "Sum" + """SUM.""" class GenerateDetailedCostReportMetricType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the detailed report. By default ActualCost is provided.""" ACTUAL_COST = "ActualCost" + """ACTUAL_COST.""" AMORTIZED_COST = "AmortizedCost" + """AMORTIZED_COST.""" class Grain(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -471,7 +612,7 @@ class Grain(str, Enum, metaclass=CaseInsensitiveEnumMeta): class GrainParameter(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """GrainParameter.""" + """Type of GrainParameter.""" HOURLY = "Hourly" """Hourly grain corresponds to value per hour.""" @@ -485,14 +626,18 @@ class GranularityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The granularity of rows in the export. Currently 'Daily' is supported for most cases.""" DAILY = "Daily" + """DAILY.""" MONTHLY = "Monthly" + """MONTHLY.""" -class KpiType(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class KpiTypeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """KPI type (Forecast, Budget).""" FORECAST = "Forecast" + """FORECAST.""" BUDGET = "Budget" + """BUDGET.""" class LookBackPeriod(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -510,24 +655,31 @@ class MetricType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Metric to use when displaying costs.""" ACTUAL_COST = "ActualCost" + """ACTUAL_COST.""" AMORTIZED_COST = "AmortizedCost" + """AMORTIZED_COST.""" AHUB = "AHUB" + """AHUB.""" class OperationStatusType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Enum representing the status of an async operation.""" RUNNING = "Running" - COMPLETE = "Complete" - FAILED = "Failed" + """RUNNING.""" COMPLETED = "Completed" + """COMPLETED.""" + FAILED = "Failed" + """FAILED.""" class OperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operator to use for comparison.""" IN = "In" + """IN.""" CONTAINS = "Contains" + """CONTAINS.""" class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -536,15 +688,20 @@ class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ USER = "user" + """Indicates the operation is initiated by a user.""" SYSTEM = "system" + """Indicates the operation is initiated by a system.""" USER_SYSTEM = "user,system" + """Indicates the operation is initiated by a user or system.""" -class PivotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class PivotTypeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Data type to show in view.""" DIMENSION = "Dimension" + """DIMENSION.""" TAG_KEY = "TagKey" + """TAG_KEY.""" class QueryColumnType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -560,49 +717,68 @@ class QueryOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operator to use for comparison.""" IN = "In" + """IN.""" class Reason(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The reason this name is not available.""" INVALID = "Invalid" + """INVALID.""" ALREADY_EXISTS = "AlreadyExists" + """ALREADY_EXISTS.""" VALID = "Valid" + """VALID.""" class RecurrenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The schedule recurrence.""" DAILY = "Daily" + """DAILY.""" WEEKLY = "Weekly" + """WEEKLY.""" MONTHLY = "Monthly" + """MONTHLY.""" ANNUALLY = "Annually" + """ANNUALLY.""" class ReportConfigSortingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Direction of sort.""" ASCENDING = "Ascending" + """ASCENDING.""" DESCENDING = "Descending" + """DESCENDING.""" class ReportGranularityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The granularity of rows in the report.""" DAILY = "Daily" + """DAILY.""" MONTHLY = "Monthly" + """MONTHLY.""" class ReportOperationStatusType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The status of the long running operation.""" IN_PROGRESS = "InProgress" + """IN_PROGRESS.""" COMPLETED = "Completed" + """COMPLETED.""" FAILED = "Failed" + """FAILED.""" QUEUED = "Queued" + """QUEUED.""" NO_DATA_FOUND = "NoDataFound" + """NO_DATA_FOUND.""" READY_TO_DOWNLOAD = "ReadyToDownload" + """READY_TO_DOWNLOAD.""" TIMED_OUT = "TimedOut" + """TIMED_OUT.""" class ReportTimeframeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -611,9 +787,13 @@ class ReportTimeframeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ WEEK_TO_DATE = "WeekToDate" + """WEEK_TO_DATE.""" MONTH_TO_DATE = "MonthToDate" + """MONTH_TO_DATE.""" YEAR_TO_DATE = "YearToDate" + """YEAR_TO_DATE.""" CUSTOM = "Custom" + """CUSTOM.""" class ReportType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -623,6 +803,7 @@ class ReportType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ USAGE = "Usage" + """USAGE.""" class ReservationReportSchema(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -631,16 +812,27 @@ class ReservationReportSchema(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ INSTANCE_FLEXIBILITY_GROUP = "InstanceFlexibilityGroup" + """INSTANCE_FLEXIBILITY_GROUP.""" INSTANCE_FLEXIBILITY_RATIO = "InstanceFlexibilityRatio" + """INSTANCE_FLEXIBILITY_RATIO.""" INSTANCE_ID = "InstanceId" + """INSTANCE_ID.""" KIND = "Kind" + """KIND.""" RESERVATION_ID = "ReservationId" + """RESERVATION_ID.""" RESERVATION_ORDER_ID = "ReservationOrderId" + """RESERVATION_ORDER_ID.""" RESERVED_HOURS = "ReservedHours" + """RESERVED_HOURS.""" SKU_NAME = "SkuName" + """SKU_NAME.""" TOTAL_RESERVED_QUANTITY = "TotalReservedQuantity" + """TOTAL_RESERVED_QUANTITY.""" USAGE_DATE = "UsageDate" + """USAGE_DATE.""" USED_HOURS = "UsedHours" + """USED_HOURS.""" class RuleStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -668,12 +860,12 @@ class ScheduledActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ScheduledActionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """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.""" + DISABLED = "Disabled" + """Scheduled action is saved but will not be run.""" class ScheduleFrequency(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -700,10 +892,11 @@ class SettingsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the kind of settings.""" TAGINHERITANCE = "taginheritance" + """TAGINHERITANCE.""" class SettingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """SettingType.""" + """Type of SettingType.""" TAGINHERITANCE = "taginheritance" """This setting applies billing profile, invoice section, subscription and resource group tags to @@ -716,14 +909,18 @@ class StatusType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ACTIVE = "Active" + """ACTIVE.""" INACTIVE = "Inactive" + """INACTIVE.""" class SystemAssignedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of managed service identity (either system assigned, or none).""" NONE = "None" + """No managed system identity.""" SYSTEM_ASSIGNED = "SystemAssigned" + """System assigned managed system identity.""" class Term(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -754,12 +951,19 @@ class TimeframeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ MONTH_TO_DATE = "MonthToDate" + """MONTH_TO_DATE.""" BILLING_MONTH_TO_DATE = "BillingMonthToDate" + """BILLING_MONTH_TO_DATE.""" THE_LAST_MONTH = "TheLastMonth" + """THE_LAST_MONTH.""" THE_LAST_BILLING_MONTH = "TheLastBillingMonth" + """THE_LAST_BILLING_MONTH.""" WEEK_TO_DATE = "WeekToDate" + """WEEK_TO_DATE.""" CUSTOM = "Custom" + """CUSTOM.""" THE_CURRENT_MONTH = "TheCurrentMonth" + """THE_CURRENT_MONTH.""" class TimeGrainType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -767,7 +971,8 @@ class TimeGrainType(str, Enum, metaclass=CaseInsensitiveEnumMeta): Supported for CategoryType(s): Cost, ReservationUtilization. - Supported timeGrainTypes for **CategoryType: Cost** + Supported timeGrainTypes for **CategoryType: Cost** + * Monthly @@ -775,61 +980,64 @@ class TimeGrainType(str, Enum, metaclass=CaseInsensitiveEnumMeta): * Annually * BillingMonth* * BillingQuarter* - * - BillingAnnual* + * BillingAnnual* - *only supported for Web Direct customers. + *only supported for Web Direct customers. - Supported timeGrainTypes for **CategoryType: ReservationUtilization** + Supported timeGrainTypes for **CategoryType: ReservationUtilization** * Last7Days - * - Last30Days + * Last30Days - Required for CategoryType(s): Cost, ReservationUtilization. + Required for CategoryType(s): Cost, ReservationUtilization. """ MONTHLY = "Monthly" """The budget will track costs in the current calendar month against the amount. - Supported for CategoryType: Cost only.""" + Supported for CategoryType: Cost only.""" QUARTERLY = "Quarterly" """The budget will track costs in the current calendar quarter against the amount. - Supported for CategoryType: Cost only.""" + Supported for CategoryType: Cost only.""" ANNUALLY = "Annually" """The budget will track costs in the current calendar year against the amount. - Supported for CategoryType: Cost only.""" + Supported for CategoryType: Cost only.""" BILLING_MONTH = "BillingMonth" """The budget will track costs in the current billing month against the amount. - Supported for CategoryType: Cost and Web Direct customers only.""" + Supported for CategoryType: Cost and Web Direct customers only.""" BILLING_QUARTER = "BillingQuarter" """The budget will track costs in the current billing quarter against the amount. - Supported for CategoryType: Cost and Web Direct customers only.""" + Supported for CategoryType: Cost and Web Direct customers only.""" BILLING_ANNUAL = "BillingAnnual" """The budget will track costs in the current billing year against the amount. - Supported for CategoryType: Cost and Web Direct customers only.""" + Supported for CategoryType: Cost and Web Direct customers only.""" LAST7_DAYS = "Last7Days" """The Reservation Utilization Alert Rule will evaluate reservations based on their 7-Day utilization percentage. - Supported for CategoryType: ReservationUtilization only.""" + Supported for CategoryType: ReservationUtilization only.""" LAST30_DAYS = "Last30Days" """The Reservation Utilization Alert Rule will evaluate reservations based on their 30-Day utilization percentage. - Supported for CategoryType: ReservationUtilization only.""" + Supported for CategoryType: ReservationUtilization only.""" class WeeksOfMonth(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Weeks of month.""" FIRST = "First" + """FIRST.""" SECOND = "Second" + """SECOND.""" THIRD = "Third" + """THIRD.""" FOURTH = "Fourth" + """FOURTH.""" LAST = "Last" + """LAST.""" diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py new file mode 100644 index 000000000000..afdc7eb2d29f --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py @@ -0,0 +1,7521 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +import datetime +import decimal +from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .._utils.model_base import Model as _Model, rest_discriminator, rest_field +from ._enums import BenefitKind, Scope, SettingsKind + +if TYPE_CHECKING: + from .. import models as _models + + +class Resource(_Model): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ExtensionResource(Resource): + """The base extension resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + """ + + +class Alert(ExtensionResource): + """An individual alert. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: Alert properties. + :vartype properties: ~azure.mgmt.costmanagement.models.AlertProperties + :ivar e_tag: 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. + :vartype e_tag: str + """ + + properties: Optional["_models.AlertProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Alert properties.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + __flattened_items = [ + "definition", + "description", + "source", + "details", + "cost_entity_id", + "status", + "creation_time", + "close_time", + "modification_time", + "status_modification_user_name", + "status_modification_time", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AlertProperties"] = None, + e_tag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AlertProperties(_Model): + """Alert properties. + + :ivar definition: defines the type of alert. + :vartype definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition + :ivar description: Alert description. + :vartype description: str + :ivar source: Source of alert. Known values are: "Preset" and "User". + :vartype source: str or ~azure.mgmt.costmanagement.models.AlertSource + :ivar details: Alert details. + :vartype details: ~azure.mgmt.costmanagement.models.AlertPropertiesDetails + :ivar cost_entity_id: related budget. + :vartype cost_entity_id: str + :ivar status: alert status. Known values are: "None", "Active", "Overridden", "Resolved", and + "Dismissed". + :vartype status: str or ~azure.mgmt.costmanagement.models.AlertStatus + :ivar creation_time: dateTime in which alert was created. + :vartype creation_time: str + :ivar close_time: dateTime in which alert was closed. + :vartype close_time: str + :ivar modification_time: dateTime in which alert was last modified. + :vartype modification_time: str + :ivar status_modification_user_name: User who last modified the alert. + :vartype status_modification_user_name: str + :ivar status_modification_time: dateTime in which the alert status was last modified. + :vartype status_modification_time: str + """ + + definition: Optional["_models.AlertPropertiesDefinition"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """defines the type of alert.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Alert description.""" + source: Optional[Union[str, "_models.AlertSource"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Source of alert. Known values are: \"Preset\" and \"User\".""" + details: Optional["_models.AlertPropertiesDetails"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Alert details.""" + cost_entity_id: Optional[str] = rest_field( + name="costEntityId", visibility=["read", "create", "update", "delete", "query"] + ) + """related budget.""" + status: Optional[Union[str, "_models.AlertStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """alert status. Known values are: \"None\", \"Active\", \"Overridden\", \"Resolved\", and + \"Dismissed\".""" + creation_time: Optional[str] = rest_field( + name="creationTime", visibility=["read", "create", "update", "delete", "query"] + ) + """dateTime in which alert was created.""" + close_time: Optional[str] = rest_field(name="closeTime", visibility=["read", "create", "update", "delete", "query"]) + """dateTime in which alert was closed.""" + modification_time: Optional[str] = rest_field( + name="modificationTime", visibility=["read", "create", "update", "delete", "query"] + ) + """dateTime in which alert was last modified.""" + status_modification_user_name: Optional[str] = rest_field( + name="statusModificationUserName", visibility=["read", "create", "update", "delete", "query"] + ) + """User who last modified the alert.""" + status_modification_time: Optional[str] = rest_field( + name="statusModificationTime", visibility=["read", "create", "update", "delete", "query"] + ) + """dateTime in which the alert status was last modified.""" + + @overload + def __init__( + self, + *, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AlertPropertiesDefinition(_Model): + """defines the type of alert. + + :ivar type: type of alert. Known values are: "Budget", "Invoice", "Credit", "Quota", "General", + "xCloud", and "BudgetForecast". + :vartype type: str or ~azure.mgmt.costmanagement.models.AlertType + :ivar category: Alert category. Known values are: "Cost", "Usage", "Billing", and "System". + :vartype category: str or ~azure.mgmt.costmanagement.models.AlertCategory + :ivar criteria: Criteria that triggered alert. Known values are: "CostThresholdExceeded", + "UsageThresholdExceeded", "CreditThresholdApproaching", "CreditThresholdReached", + "QuotaThresholdApproaching", "QuotaThresholdReached", "MultiCurrency", + "ForecastCostThresholdExceeded", "ForecastUsageThresholdExceeded", "InvoiceDueDateApproaching", + "InvoiceDueDateReached", "CrossCloudNewDataAvailable", "CrossCloudCollectionError", and + "GeneralThresholdError". + :vartype criteria: str or ~azure.mgmt.costmanagement.models.AlertCriteria + """ + + type: Optional[Union[str, "_models.AlertType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """type of alert. Known values are: \"Budget\", \"Invoice\", \"Credit\", \"Quota\", \"General\", + \"xCloud\", and \"BudgetForecast\".""" + category: Optional[Union[str, "_models.AlertCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Alert category. Known values are: \"Cost\", \"Usage\", \"Billing\", and \"System\".""" + criteria: Optional[Union[str, "_models.AlertCriteria"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Criteria that triggered alert. Known values are: \"CostThresholdExceeded\", + \"UsageThresholdExceeded\", \"CreditThresholdApproaching\", \"CreditThresholdReached\", + \"QuotaThresholdApproaching\", \"QuotaThresholdReached\", \"MultiCurrency\", + \"ForecastCostThresholdExceeded\", \"ForecastUsageThresholdExceeded\", + \"InvoiceDueDateApproaching\", \"InvoiceDueDateReached\", \"CrossCloudNewDataAvailable\", + \"CrossCloudCollectionError\", and \"GeneralThresholdError\".""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.AlertType"]] = None, + category: Optional[Union[str, "_models.AlertCategory"]] = None, + criteria: Optional[Union[str, "_models.AlertCriteria"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AlertPropertiesDetails(_Model): + """Alert details. + + :ivar time_grain_type: Type of timegrain cadence. Known values are: "None", "Monthly", + "Quarterly", "Annually", "BillingMonth", "BillingQuarter", and "BillingAnnual". + :vartype time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType + :ivar period_start_date: datetime of periodStartDate. + :vartype period_start_date: str + :ivar triggered_by: notificationId that triggered this alert. + :vartype triggered_by: str + :ivar resource_group_filter: array of resourceGroups to filter by. + :vartype resource_group_filter: list[any] + :ivar resource_filter: array of resources to filter by. + :vartype resource_filter: list[any] + :ivar meter_filter: array of meters to filter by. + :vartype meter_filter: list[any] + :ivar tag_filter: tags to filter by. + :vartype tag_filter: any + :ivar threshold: notification threshold percentage as a decimal which activated this alert. + :vartype threshold: ~decimal.Decimal + :ivar operator: operator used to compare currentSpend with amount. Known values are: "None", + "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", "LessThan", and "LessThanOrEqualTo". + :vartype operator: str or ~azure.mgmt.costmanagement.models.AlertOperator + :ivar amount: budget threshold amount. + :vartype amount: ~decimal.Decimal + :ivar unit: unit of currency being used. + :vartype unit: str + :ivar current_spend: current spend. + :vartype current_spend: ~decimal.Decimal + :ivar contact_emails: list of emails to contact. + :vartype contact_emails: list[str] + :ivar contact_groups: list of action groups to broadcast to. + :vartype contact_groups: list[str] + :ivar contact_roles: list of contact roles. + :vartype contact_roles: list[str] + :ivar overriding_alert: overriding alert. + :vartype overriding_alert: str + :ivar department_name: department name. + :vartype department_name: str + :ivar company_name: company name. + :vartype company_name: str + :ivar enrollment_number: enrollment number. + :vartype enrollment_number: str + :ivar enrollment_start_date: datetime of enrollmentStartDate. + :vartype enrollment_start_date: str + :ivar enrollment_end_date: datetime of enrollmentEndDate. + :vartype enrollment_end_date: str + :ivar invoicing_threshold: invoicing threshold. + :vartype invoicing_threshold: ~decimal.Decimal + """ + + time_grain_type: Optional[Union[str, "_models.AlertTimeGrainType"]] = rest_field( + name="timeGrainType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of timegrain cadence. Known values are: \"None\", \"Monthly\", \"Quarterly\", + \"Annually\", \"BillingMonth\", \"BillingQuarter\", and \"BillingAnnual\".""" + period_start_date: Optional[str] = rest_field( + name="periodStartDate", visibility=["read", "create", "update", "delete", "query"] + ) + """datetime of periodStartDate.""" + triggered_by: Optional[str] = rest_field( + name="triggeredBy", visibility=["read", "create", "update", "delete", "query"] + ) + """notificationId that triggered this alert.""" + resource_group_filter: Optional[list[Any]] = rest_field( + name="resourceGroupFilter", visibility=["read", "create", "update", "delete", "query"] + ) + """array of resourceGroups to filter by.""" + resource_filter: Optional[list[Any]] = rest_field( + name="resourceFilter", visibility=["read", "create", "update", "delete", "query"] + ) + """array of resources to filter by.""" + meter_filter: Optional[list[Any]] = rest_field( + name="meterFilter", visibility=["read", "create", "update", "delete", "query"] + ) + """array of meters to filter by.""" + tag_filter: Optional[Any] = rest_field(name="tagFilter", visibility=["read", "create", "update", "delete", "query"]) + """tags to filter by.""" + threshold: Optional[decimal.Decimal] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """notification threshold percentage as a decimal which activated this alert.""" + operator: Optional[Union[str, "_models.AlertOperator"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """operator used to compare currentSpend with amount. Known values are: \"None\", \"EqualTo\", + \"GreaterThan\", \"GreaterThanOrEqualTo\", \"LessThan\", and \"LessThanOrEqualTo\".""" + amount: Optional[decimal.Decimal] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """budget threshold amount.""" + unit: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """unit of currency being used.""" + current_spend: Optional[decimal.Decimal] = rest_field( + name="currentSpend", visibility=["read", "create", "update", "delete", "query"] + ) + """current spend.""" + contact_emails: Optional[list[str]] = rest_field( + name="contactEmails", visibility=["read", "create", "update", "delete", "query"] + ) + """list of emails to contact.""" + contact_groups: Optional[list[str]] = rest_field( + name="contactGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """list of action groups to broadcast to.""" + contact_roles: Optional[list[str]] = rest_field( + name="contactRoles", visibility=["read", "create", "update", "delete", "query"] + ) + """list of contact roles.""" + overriding_alert: Optional[str] = rest_field( + name="overridingAlert", visibility=["read", "create", "update", "delete", "query"] + ) + """overriding alert.""" + department_name: Optional[str] = rest_field( + name="departmentName", visibility=["read", "create", "update", "delete", "query"] + ) + """department name.""" + company_name: Optional[str] = rest_field( + name="companyName", visibility=["read", "create", "update", "delete", "query"] + ) + """company name.""" + enrollment_number: Optional[str] = rest_field( + name="enrollmentNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """enrollment number.""" + enrollment_start_date: Optional[str] = rest_field( + name="enrollmentStartDate", visibility=["read", "create", "update", "delete", "query"] + ) + """datetime of enrollmentStartDate.""" + enrollment_end_date: Optional[str] = rest_field( + name="enrollmentEndDate", visibility=["read", "create", "update", "delete", "query"] + ) + """datetime of enrollmentEndDate.""" + invoicing_threshold: Optional[decimal.Decimal] = rest_field( + name="invoicingThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """invoicing threshold.""" + + @overload + def __init__( + self, + *, + 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[Any] = None, + threshold: Optional[decimal.Decimal] = None, + operator: Optional[Union[str, "_models.AlertOperator"]] = None, + amount: Optional[decimal.Decimal] = None, + unit: Optional[str] = None, + current_spend: Optional[decimal.Decimal] = 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[decimal.Decimal] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AlertsResult(_Model): + """Result of alerts. + + :ivar value: List of alerts. + :vartype value: list[~azure.mgmt.costmanagement.models.Alert] + :ivar next_link: URL to get the next set of alerts results if there are any. + :vartype next_link: str + """ + + value: Optional[list["_models.Alert"]] = rest_field(visibility=["read"]) + """List of alerts.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read"]) + """URL to get the next set of alerts results if there are any.""" + + +class AllSavingsBenefitDetails(_Model): + """Benefit recommendation details. + + :ivar overage_cost: The difference between total cost and benefit cost for the 'totalHours' in + the look-back period. + :vartype overage_cost: ~decimal.Decimal + :ivar benefit_cost: The estimated cost with benefit for the 'totalHours' in the look-back + period. It's equal to (commitmentAmount * totalHours). + :vartype benefit_cost: ~decimal.Decimal + :ivar total_cost: Total cost, which is sum of benefit cost and overage cost. + :vartype total_cost: ~decimal.Decimal + :ivar savings_amount: The amount saved for the 'totalHours' in the look-back period, by + purchasing the recommended quantity of the benefit. + :vartype savings_amount: ~decimal.Decimal + :ivar savings_percentage: The savings in percentage for the 'totalHours' in the look-back + period, by purchasing the recommended quantity of benefit. + :vartype savings_percentage: ~decimal.Decimal + :ivar coverage_percentage: Estimated benefit coverage percentage for the 'totalHours' in the + look-back period, with this commitment. + :vartype coverage_percentage: ~decimal.Decimal + :ivar commitment_amount: The commitment amount at the commitmentGranularity. + :vartype commitment_amount: ~decimal.Decimal + :ivar average_utilization_percentage: Estimated average utilization percentage for the + 'totalHours' in the look-back period, with this commitment. + :vartype average_utilization_percentage: ~decimal.Decimal + :ivar wastage_cost: Estimated unused portion of the 'benefitCost'. + :vartype wastage_cost: ~decimal.Decimal + """ + + overage_cost: Optional[decimal.Decimal] = rest_field(name="overageCost", visibility=["read"]) + """The difference between total cost and benefit cost for the 'totalHours' in the look-back + period.""" + benefit_cost: Optional[decimal.Decimal] = rest_field(name="benefitCost", visibility=["read"]) + """The estimated cost with benefit for the 'totalHours' in the look-back period. It's equal to + (commitmentAmount * totalHours).""" + total_cost: Optional[decimal.Decimal] = rest_field(name="totalCost", visibility=["read"]) + """Total cost, which is sum of benefit cost and overage cost.""" + savings_amount: Optional[decimal.Decimal] = rest_field(name="savingsAmount", visibility=["read"]) + """The amount saved for the 'totalHours' in the look-back period, by purchasing the recommended + quantity of the benefit.""" + savings_percentage: Optional[decimal.Decimal] = rest_field(name="savingsPercentage", visibility=["read"]) + """The savings in percentage for the 'totalHours' in the look-back period, by purchasing the + recommended quantity of benefit.""" + coverage_percentage: Optional[decimal.Decimal] = rest_field(name="coveragePercentage", visibility=["read"]) + """Estimated benefit coverage percentage for the 'totalHours' in the look-back period, with this + commitment.""" + commitment_amount: Optional[decimal.Decimal] = rest_field(name="commitmentAmount", visibility=["read"]) + """The commitment amount at the commitmentGranularity.""" + average_utilization_percentage: Optional[decimal.Decimal] = rest_field( + name="averageUtilizationPercentage", visibility=["read"] + ) + """Estimated average utilization percentage for the 'totalHours' in the look-back period, with + this commitment.""" + wastage_cost: Optional[decimal.Decimal] = rest_field(name="wastageCost", visibility=["read"]) + """Estimated unused portion of the 'benefitCost'.""" + + +class AllSavingsList(_Model): + """The list of all benefit recommendations with the recommendation details. + + :ivar value: The list of benefit recommendations with the recommendation details.. + :vartype value: list[~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails] + :ivar next_link: The link (URL) to the next page of results. + :vartype next_link: str + """ + + value: Optional[list["_models.AllSavingsBenefitDetails"]] = rest_field(visibility=["read"]) + """The list of benefit recommendations with the recommendation details..""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read"]) + """The link (URL) to the next page of results.""" + + +class ArmErrorResponse(_Model): + """Error response. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AsyncOperationStatusProperties(_Model): + """Object representing the report url and valid until date of the async report generated. + + :ivar report_url: Sas url to the async benefit utilization summaries report. Will be empty if + the report is in Running or Failed state. Known values are: "Kind", "AvgUtilizationPercentage", + "BenefitOrderId", "BenefitId", "BenefitType", "MaxUtilizationPercentage", + "MinUtilizationPercentage", "UsageDate", and "UtilizedPercentage". + :vartype report_url: str or + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema + :ivar secondary_report_url: Sas url to async benefit utilization summaries report in secondary + storage in case of primary outage. Will be empty if the report is in Running or Failed state. + Known values are: "Kind", "AvgUtilizationPercentage", "BenefitOrderId", "BenefitId", + "BenefitType", "MaxUtilizationPercentage", "MinUtilizationPercentage", "UsageDate", and + "UtilizedPercentage". + :vartype secondary_report_url: str or + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema + :ivar valid_until: The date that the sas url provided in reportUrl expires. + :vartype valid_until: ~datetime.datetime + """ + + report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = rest_field( + name="reportUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Sas url to the async benefit utilization summaries report. Will be empty if the report is in + Running or Failed state. Known values are: \"Kind\", \"AvgUtilizationPercentage\", + \"BenefitOrderId\", \"BenefitId\", \"BenefitType\", \"MaxUtilizationPercentage\", + \"MinUtilizationPercentage\", \"UsageDate\", and \"UtilizedPercentage\".""" + secondary_report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = rest_field( + name="secondaryReportUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Sas url to async benefit utilization summaries report in secondary storage in case of primary + outage. Will be empty if the report is in Running or Failed state. Known values are: \"Kind\", + \"AvgUtilizationPercentage\", \"BenefitOrderId\", \"BenefitId\", \"BenefitType\", + \"MaxUtilizationPercentage\", \"MinUtilizationPercentage\", \"UsageDate\", and + \"UtilizedPercentage\".""" + valid_until: Optional[datetime.datetime] = rest_field( + name="validUntil", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The date that the sas url provided in reportUrl expires.""" + + @overload + def __init__( + self, + *, + report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = None, + secondary_report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = None, + valid_until: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BenefitResource(Resource): + """The benefit resource model definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar kind: Reservation or SavingsPlan. Known values are: "IncludedQuantity", "Reservation", + and "SavingsPlan". + :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind + """ + + kind: Optional[Union[str, "_models.BenefitKind"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Reservation or SavingsPlan. Known values are: \"IncludedQuantity\", \"Reservation\", and + \"SavingsPlan\".""" + + @overload + def __init__( + self, + *, + kind: Optional[Union[str, "_models.BenefitKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BenefitRecommendationModel(BenefitResource): + """benefit plan recommendation details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar kind: Reservation or SavingsPlan. Known values are: "IncludedQuantity", "Reservation", + and "SavingsPlan". + :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind + :ivar properties: The properties of the benefit recommendations. + :vartype properties: ~azure.mgmt.costmanagement.models.BenefitRecommendationProperties + """ + + properties: Optional["_models.BenefitRecommendationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the benefit recommendations.""" + + @overload + def __init__( + self, + *, + kind: Optional[Union[str, "_models.BenefitKind"]] = None, + properties: Optional["_models.BenefitRecommendationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BenefitRecommendationProperties(_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 + + :ivar first_consumption_date: The first usage date used for looking back for computing the + recommendations. + :vartype first_consumption_date: ~datetime.datetime + :ivar last_consumption_date: The last usage date used for looking back for computing the + recommendations. + :vartype last_consumption_date: ~datetime.datetime + :ivar look_back_period: The number of days of usage evaluated for computing the + recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". + :vartype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod + :ivar total_hours: The total hours for which the cost is covered. Its equal to number of + records in a property 'properties/usage/charges'. + :vartype total_hours: int + :ivar usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that were + used for computing benefit recommendations. + :vartype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails + :ivar arm_sku_name: ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan. + :vartype arm_sku_name: str + :ivar term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and + "P3Y". + :vartype term: str or ~azure.mgmt.costmanagement.models.Term + :ivar commitment_granularity: Grain of the proposed commitment amount. Supported values: + 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". + :vartype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain + :ivar currency_code: An ISO 4217 currency code identifier for the costs and savings amounts. + :vartype currency_code: str + :ivar cost_without_benefit: The current cost without benefit, corresponds to 'totalHours' in + the look-back period. + :vartype cost_without_benefit: ~decimal.Decimal + :ivar recommendation_details: The details of the proposed recommendation. + :vartype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails + :ivar all_recommendation_details: The list of all benefit recommendations with the + recommendation details. + :vartype all_recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsList + :ivar scope: Benefit scope. For example, Single or Shared. Required. Known values are: "Single" + and "Shared". + :vartype scope: str or ~azure.mgmt.costmanagement.models.Scope + """ + + __mapping__: dict[str, _Model] = {} + first_consumption_date: Optional[datetime.datetime] = rest_field( + name="firstConsumptionDate", visibility=["read"], format="rfc3339" + ) + """The first usage date used for looking back for computing the recommendations.""" + last_consumption_date: Optional[datetime.datetime] = rest_field( + name="lastConsumptionDate", visibility=["read"], format="rfc3339" + ) + """The last usage date used for looking back for computing the recommendations.""" + look_back_period: Optional[Union[str, "_models.LookBackPeriod"]] = rest_field( + name="lookBackPeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of days of usage evaluated for computing the recommendations. Known values are: + \"Last7Days\", \"Last30Days\", and \"Last60Days\".""" + total_hours: Optional[int] = rest_field(name="totalHours", visibility=["read"]) + """The total hours for which the cost is covered. Its equal to number of records in a property + 'properties/usage/charges'.""" + usage: Optional["_models.RecommendationUsageDetails"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for + computing benefit recommendations.""" + arm_sku_name: Optional[str] = rest_field(name="armSkuName", visibility=["read"]) + """ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan.""" + term: Optional[Union[str, "_models.Term"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Term period of the benefit. For example, P1Y or P3Y. Known values are: \"P1Y\" and \"P3Y\".""" + commitment_granularity: Optional[Union[str, "_models.Grain"]] = rest_field( + name="commitmentGranularity", visibility=["read", "create", "update", "delete", "query"] + ) + """Grain of the proposed commitment amount. Supported values: 'Hourly'. Known values are: + \"Hourly\", \"Daily\", and \"Monthly\".""" + currency_code: Optional[str] = rest_field(name="currencyCode", visibility=["read"]) + """An ISO 4217 currency code identifier for the costs and savings amounts.""" + cost_without_benefit: Optional[decimal.Decimal] = rest_field(name="costWithoutBenefit", visibility=["read"]) + """The current cost without benefit, corresponds to 'totalHours' in the look-back period.""" + recommendation_details: Optional["_models.AllSavingsBenefitDetails"] = rest_field( + name="recommendationDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """The details of the proposed recommendation.""" + all_recommendation_details: Optional["_models.AllSavingsList"] = rest_field( + name="allRecommendationDetails", visibility=["read"] + ) + """The list of all benefit recommendations with the recommendation details.""" + scope: str = rest_discriminator(name="scope", visibility=["read", "create", "update", "delete", "query"]) + """Benefit scope. For example, Single or Shared. Required. Known values are: \"Single\" and + \"Shared\".""" + + @overload + def __init__( + self, + *, + scope: str, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BenefitUtilizationSummariesOperationStatus(_Model): # pylint: disable=name-too-long + """Status of a benefit utilization summaries report. Provides Async Benefit Utilization Summaries + Request input, status, and report sas url. + + :ivar input: Input given to create the benefit utilization summaries report. + :vartype input: ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :ivar status: The status of the creation of the benefit utilization summaries report. Known + values are: "Running", "Completed", and "Failed". + :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType + :ivar properties: Contains sas url to the async benefit utilization summaries report and a date + that the url is valid until. These values will be empty if the report is in a Running or Failed + state. + :vartype properties: ~azure.mgmt.costmanagement.models.AsyncOperationStatusProperties + """ + + input: Optional["_models.BenefitUtilizationSummariesRequest"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Input given to create the benefit utilization summaries report.""" + status: Optional[Union[str, "_models.OperationStatusType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the creation of the benefit utilization summaries report. Known values are: + \"Running\", \"Completed\", and \"Failed\".""" + properties: Optional["_models.AsyncOperationStatusProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Contains sas url to the async benefit utilization summaries report and a date that the url is + valid until. These values will be empty if the report is in a Running or Failed state.""" + + @overload + def __init__( + self, + *, + input: Optional["_models.BenefitUtilizationSummariesRequest"] = None, + status: Optional[Union[str, "_models.OperationStatusType"]] = None, + properties: Optional["_models.AsyncOperationStatusProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BenefitUtilizationSummariesRequest(_Model): + """Properties of an async benefit utilization summaries request. + + :ivar billing_account_id: Billing account the benefit utilization summaries report is for. + Required for billing account and billing profile scopes. Not supported for any benefit scopes. + :vartype billing_account_id: str + :ivar billing_profile_id: Billing profile id the benefit utilization summaries report is for. + Required for billing profile scope. Not supported for billing account or any benefit scopes. + :vartype billing_profile_id: str + :ivar benefit_order_id: Benefit order id the benefit utilization summaries report is for. + Required for benefit order and benefit id scopes. Not supported for any billing scopes. + :vartype benefit_order_id: str + :ivar benefit_id: Benefit id the benefit utilization summaries report is for. Required for + benefit id scope. Not supported for benefit order or any billing scopes. + :vartype benefit_id: str + :ivar grain: The grain the summaries data is served at in the report. Accepted values are + 'Daily' or 'Monthly'. Required. Known values are: "Hourly", "Daily", and "Monthly". + :vartype grain: str or ~azure.mgmt.costmanagement.models.Grain + :ivar start_date: The start date of the summaries data that will be served in the report. + Required. + :vartype start_date: ~datetime.datetime + :ivar end_date: The end date of the summaries data that will be served in the report. Required. + :vartype end_date: ~datetime.datetime + :ivar kind: The type of benefit data requested. Required for billing account and billing + profile scopes. Implied and not to be passed at benefit scopes. Supported values are + Reservation and SavingsPlan. Known values are: "IncludedQuantity", "Reservation", and + "SavingsPlan". + :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind + """ + + billing_account_id: Optional[str] = rest_field( + name="billingAccountId", visibility=["read", "create", "update", "delete", "query"] + ) + """Billing account the benefit utilization summaries report is for. Required for billing account + and billing profile scopes. Not supported for any benefit scopes.""" + billing_profile_id: Optional[str] = rest_field( + name="billingProfileId", visibility=["read", "create", "update", "delete", "query"] + ) + """Billing profile id the benefit utilization summaries report is for. Required for billing + profile scope. Not supported for billing account or any benefit scopes.""" + benefit_order_id: Optional[str] = rest_field( + name="benefitOrderId", visibility=["read", "create", "update", "delete", "query"] + ) + """Benefit order id the benefit utilization summaries report is for. Required for benefit order + and benefit id scopes. Not supported for any billing scopes.""" + benefit_id: Optional[str] = rest_field(name="benefitId", visibility=["read", "create", "update", "delete", "query"]) + """Benefit id the benefit utilization summaries report is for. Required for benefit id scope. Not + supported for benefit order or any billing scopes.""" + grain: Union[str, "_models.Grain"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The grain the summaries data is served at in the report. Accepted values are 'Daily' or + 'Monthly'. Required. Known values are: \"Hourly\", \"Daily\", and \"Monthly\".""" + start_date: datetime.datetime = rest_field( + name="startDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date of the summaries data that will be served in the report. Required.""" + end_date: datetime.datetime = rest_field( + name="endDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end date of the summaries data that will be served in the report. Required.""" + kind: Optional[Union[str, "_models.BenefitKind"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of benefit data requested. Required for billing account and billing profile scopes. + Implied and not to be passed at benefit scopes. Supported values are Reservation and + SavingsPlan. Known values are: \"IncludedQuantity\", \"Reservation\", and \"SavingsPlan\".""" + + @overload + def __init__( + self, + *, + grain: Union[str, "_models.Grain"], + start_date: datetime.datetime, + end_date: datetime.datetime, + billing_account_id: Optional[str] = None, + billing_profile_id: Optional[str] = None, + benefit_order_id: Optional[str] = None, + benefit_id: Optional[str] = None, + kind: Optional[Union[str, "_models.BenefitKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BenefitUtilizationSummary(Resource): + """Benefit utilization summary resource. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + IncludedQuantityUtilizationSummary, SavingsPlanUtilizationSummary + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar kind: Supported values: 'SavingsPlan'. Required. Known values are: "IncludedQuantity", + "Reservation", and "SavingsPlan". + :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind + """ + + __mapping__: dict[str, _Model] = {} + kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) + """Supported values: 'SavingsPlan'. Required. Known values are: \"IncludedQuantity\", + \"Reservation\", and \"SavingsPlan\".""" + + @overload + def __init__( + self, + *, + kind: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BenefitUtilizationSummaryProperties(_Model): + """The properties of a benefit utilization summary. + + :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. + :vartype arm_sku_name: str + :ivar benefit_id: The benefit ID is the identifier of the benefit. + :vartype benefit_id: str + :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. + :vartype benefit_order_id: str + :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: + "IncludedQuantity", "Reservation", and "SavingsPlan". + :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind + :ivar usage_date: 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. + :vartype usage_date: ~datetime.datetime + """ + + arm_sku_name: Optional[str] = rest_field(name="armSkuName", visibility=["read"]) + """ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan.""" + benefit_id: Optional[str] = rest_field(name="benefitId", visibility=["read"]) + """The benefit ID is the identifier of the benefit.""" + benefit_order_id: Optional[str] = rest_field(name="benefitOrderId", visibility=["read"]) + """The benefit order ID is the identifier for a benefit purchase.""" + benefit_type: Optional[Union[str, "_models.BenefitKind"]] = rest_field( + name="benefitType", visibility=["read", "create", "update", "delete", "query"] + ) + """The benefit type. Supported values: 'SavingsPlan'. Known values are: \"IncludedQuantity\", + \"Reservation\", and \"SavingsPlan\".""" + usage_date: Optional[datetime.datetime] = rest_field(name="usageDate", visibility=["read"], format="rfc3339") + """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.""" + + @overload + def __init__( + self, + *, + benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BlobInfo(_Model): + """The blob information generated by this operation. + + :ivar blob_link: Link to the blob to download file. + :vartype blob_link: str + :ivar byte_count: Bytes in the blob. + :vartype byte_count: int + """ + + blob_link: Optional[str] = rest_field(name="blobLink", visibility=["read", "create", "update", "delete", "query"]) + """Link to the blob to download file.""" + byte_count: Optional[int] = rest_field(name="byteCount", visibility=["read", "create", "update", "delete", "query"]) + """Bytes in the blob.""" + + @overload + def __init__( + self, + *, + blob_link: Optional[str] = None, + byte_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Budget(ExtensionResource): + """A budget resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: The properties of the budget. + :vartype properties: ~azure.mgmt.costmanagement.models.BudgetProperties + :ivar e_tag: 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. + :vartype e_tag: str + """ + + properties: Optional["_models.BudgetProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the budget.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + __flattened_items = [ + "category", + "amount", + "time_grain", + "time_period", + "filter", + "current_spend", + "notifications", + "forecast_spend", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.BudgetProperties"] = None, + e_tag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class BudgetComparisonExpression(_Model): + """The comparison expression to be used in the budgets. + + :ivar name: The name of the column to use in comparison. Required. + :vartype name: str + :ivar operator: The operator to use for comparison. Required. "In" + :vartype operator: str or ~azure.mgmt.costmanagement.models.BudgetOperatorType + :ivar values_property: Array of values to use for comparison. Required. + :vartype values_property: list[str] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to use in comparison. Required.""" + operator: Union[str, "_models.BudgetOperatorType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operator to use for comparison. Required. \"In\"""" + values_property: list[str] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Array of values to use for comparison. Required.""" + + @overload + def __init__( + self, + *, + name: str, + operator: Union[str, "_models.BudgetOperatorType"], + values_property: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BudgetFilter(_Model): + """May be used to filter budgets by user-specified dimensions and/or tags. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + :ivar and_property: The logical "AND" expression. Must have at least 2 items. + + Supported for CategoryType(s): Cost. + :vartype and_property: list[~azure.mgmt.costmanagement.models.BudgetFilterProperties] + :ivar dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): + Cost, ReservationUtilization. Supported dimension names for **CategoryType: + ReservationUtilization** + + * ReservationId + * ReservedResourceType. + :vartype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + :ivar tags: Has comparison expression for a tag. + + Supported for CategoryType(s): Cost. + :vartype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + """ + + and_property: Optional[list["_models.BudgetFilterProperties"]] = rest_field( + name="and", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical \"AND\" expression. Must have at least 2 items. + + Supported for CategoryType(s): Cost.""" + dimensions: Optional["_models.BudgetComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a dimension. Supported for CategoryType(s): Cost, + ReservationUtilization. Supported dimension names for **CategoryType: ReservationUtilization** + + * ReservationId + * ReservedResourceType.""" + tags: Optional["_models.BudgetComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a tag. + + Supported for CategoryType(s): Cost.""" + + @overload + def __init__( + self, + *, + and_property: Optional[list["_models.BudgetFilterProperties"]] = None, + dimensions: Optional["_models.BudgetComparisonExpression"] = None, + tags: Optional["_models.BudgetComparisonExpression"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BudgetFilterProperties(_Model): + """The Dimensions or Tags to filter a budget by. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + :ivar dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): + Cost, ReservationUtilization. Supported dimension names for **CategoryType: + ReservationUtilization** + + * ReservationId + * ReservedResourceType. + :vartype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + :ivar tags: Has comparison expression for a tag. + + Supported for CategoryType(s): Cost. + :vartype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression + """ + + dimensions: Optional["_models.BudgetComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a dimension. Supported for CategoryType(s): Cost, + ReservationUtilization. Supported dimension names for **CategoryType: ReservationUtilization** + + * ReservationId + * ReservedResourceType.""" + tags: Optional["_models.BudgetComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a tag. + + Supported for CategoryType(s): Cost.""" + + @overload + def __init__( + self, + *, + dimensions: Optional["_models.BudgetComparisonExpression"] = None, + tags: Optional["_models.BudgetComparisonExpression"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BudgetProperties(_Model): + """The properties of the budget. + + :ivar category: The category of the budget. + + * 'Cost' defines a Budget. + * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. Required. Known + values are: "Cost" and "ReservationUtilization". + :vartype category: str or ~azure.mgmt.costmanagement.models.CategoryType + :ivar amount: The total amount of cost to track with the budget. + + Supported for CategoryType(s): Cost. + + Required for CategoryType(s): Cost. + :vartype amount: float + :ivar time_grain: The time covered by a budget. Tracking of the amount will be reset based on + the time grain. Supported for CategoryType(s): Cost, ReservationUtilization. Supported + timeGrainTypes for **CategoryType: Cost** + + * Monthly + * Quarterly + * Annually + * BillingMonth* + * BillingQuarter* + * BillingAnnual* + + *only supported for Web Direct customers. + + Supported timeGrainTypes for **CategoryType: ReservationUtilization** + + * Last7Days + * Last30Days + + Required for CategoryType(s): Cost, ReservationUtilization. Required. Known values are: + "Monthly", "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual", + "Last7Days", and "Last30Days". + :vartype time_grain: str or ~azure.mgmt.costmanagement.models.TimeGrainType + :ivar time_period: The time period that defines the active period of the budget. The budget + will evaluate data on or after the startDate and will expire on the endDate. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Required for CategoryType(s): Cost, ReservationUtilization. Required. + :vartype time_period: ~azure.mgmt.costmanagement.models.BudgetTimePeriod + :ivar filter: May be used to filter budgets by user-specified dimensions and/or tags. + + Supported for CategoryType(s): Cost, ReservationUtilization. + :vartype filter: ~azure.mgmt.costmanagement.models.BudgetFilter + :ivar current_spend: The current amount of cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost. + :vartype current_spend: ~azure.mgmt.costmanagement.models.CurrentSpend + :ivar notifications: Dictionary of notifications associated with the budget. Supported for + CategoryType(s): Cost, ReservationUtilization. + + * Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with + thresholdType: Actual and 5 notifications with thresholdType: Forecasted. + * Constraints for **CategoryType: ReservationUtilization** - Only one notification + allowed. thresholdType is not applicable. + :vartype notifications: dict[str, ~azure.mgmt.costmanagement.models.Notification] + :ivar forecast_spend: The forecasted cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost. + :vartype forecast_spend: ~azure.mgmt.costmanagement.models.ForecastSpend + """ + + category: Union[str, "_models.CategoryType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The category of the budget. + + * 'Cost' defines a Budget. + * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. Required. Known + values are: \"Cost\" and \"ReservationUtilization\".""" + amount: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The total amount of cost to track with the budget. + + Supported for CategoryType(s): Cost. + + Required for CategoryType(s): Cost.""" + time_grain: Union[str, "_models.TimeGrainType"] = rest_field( + name="timeGrain", visibility=["read", "create", "update", "delete", "query"] + ) + """The time covered by a budget. Tracking of the amount will be reset based on the time grain. + Supported for CategoryType(s): Cost, ReservationUtilization. Supported timeGrainTypes for + **CategoryType: Cost** + + * Monthly + * Quarterly + * Annually + * BillingMonth* + * BillingQuarter* + * BillingAnnual* + + *only supported for Web Direct customers. + + Supported timeGrainTypes for **CategoryType: ReservationUtilization** + + * Last7Days + * Last30Days + + Required for CategoryType(s): Cost, ReservationUtilization. Required. Known values are: + \"Monthly\", \"Quarterly\", \"Annually\", \"BillingMonth\", \"BillingQuarter\", + \"BillingAnnual\", \"Last7Days\", and \"Last30Days\".""" + time_period: "_models.BudgetTimePeriod" = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """The time period that defines the active period of the budget. The budget will evaluate data on + or after the startDate and will expire on the endDate. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Required for CategoryType(s): Cost, ReservationUtilization. Required.""" + filter: Optional["_models.BudgetFilter"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """May be used to filter budgets by user-specified dimensions and/or tags. + + Supported for CategoryType(s): Cost, ReservationUtilization.""" + current_spend: Optional["_models.CurrentSpend"] = rest_field(name="currentSpend", visibility=["read"]) + """The current amount of cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost.""" + notifications: Optional[dict[str, "_models.Notification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Dictionary of notifications associated with the budget. Supported for CategoryType(s): Cost, + ReservationUtilization. + + * Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with + thresholdType: Actual and 5 notifications with thresholdType: Forecasted. + * Constraints for **CategoryType: ReservationUtilization** - Only one notification + allowed. thresholdType is not applicable.""" + forecast_spend: Optional["_models.ForecastSpend"] = rest_field(name="forecastSpend", visibility=["read"]) + """The forecasted cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost.""" + + @overload + def __init__( + self, + *, + category: Union[str, "_models.CategoryType"], + time_grain: Union[str, "_models.TimeGrainType"], + time_period: "_models.BudgetTimePeriod", + amount: Optional[float] = None, + filter: Optional["_models.BudgetFilter"] = None, # pylint: disable=redefined-builtin + notifications: Optional[dict[str, "_models.Notification"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BudgetTimePeriod(_Model): + """The time period that defines the active period of the budget. The budget will evaluate data on + or after the startDate and will expire on the endDate. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + Required for CategoryType(s): Cost, ReservationUtilization. + + :ivar start_date: The start date for the budget. + + * Constraints for **CategoryType: Cost** - Must be first of the month and should be less + than the end date. Budget start date must be on or after June 1, 2017. Future start date should + not be more than twelve months. Past start date should be selected within the timegrain + period. + + * Constraints for **CategoryType: ReservationUtilization** - Must be on or after the + current date and less than the end date. Required. + :vartype start_date: ~datetime.datetime + :ivar end_date: The end date for the budget. + + * Constraints for **CategoryType: Cost** - No constraints. If not provided, we default + this to 10 years from the start date. + + * Constraints for **CategoryType: ReservationUtilization** - End date cannot be more than + 3 years after the start date. + :vartype end_date: ~datetime.datetime + """ + + start_date: datetime.datetime = rest_field( + name="startDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date for the budget. + + * Constraints for **CategoryType: Cost** - Must be first of the month and should be less + than the end date. Budget start date must be on or after June 1, 2017. Future start date should + not be more than twelve months. Past start date should be selected within the timegrain + period. + + * Constraints for **CategoryType: ReservationUtilization** - Must be on or after the + current date and less than the end date. Required.""" + end_date: Optional[datetime.datetime] = rest_field( + name="endDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end date for the budget. + + * Constraints for **CategoryType: Cost** - No constraints. If not provided, we default + this to 10 years from the start date. + + * Constraints for **CategoryType: ReservationUtilization** - End date cannot be more than + 3 years after the start date.""" + + @overload + def __init__( + self, + *, + start_date: datetime.datetime, + end_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckNameAvailabilityRequest(_Model): + """The check availability request body. + + :ivar name: The name of the resource for which availability needs to be checked. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the resource for which availability needs to be checked.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resource type.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckNameAvailabilityResponse(_Model): + """The check availability result. + + :ivar name_available: Indicates if the resource name is available. + :vartype name_available: bool + :ivar reason: The reason why the given name is not available. Known values are: "Invalid" and + "AlreadyExists". + :vartype reason: str or ~azure.mgmt.costmanagement.models.CheckNameAvailabilityReason + :ivar message: Detailed reason why the given name is not available. + :vartype message: str + """ + + name_available: Optional[bool] = rest_field( + name="nameAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates if the resource name is available.""" + reason: Optional[Union[str, "_models.CheckNameAvailabilityReason"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The reason why the given name is not available. Known values are: \"Invalid\" and + \"AlreadyExists\".""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Detailed reason why the given name is not available.""" + + @overload + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "_models.CheckNameAvailabilityReason"]] = None, + message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonExportProperties(_Model): + """The common properties of the export. + + :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". + :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType + :ivar delivery_info: Has delivery information for the export. Required. + :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :ivar definition: Has the definition for the export. Required. + :vartype definition: ~azure.mgmt.costmanagement.models.ExportDefinition + :ivar run_history: If requested, has the most recent run history for the export. + :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :ivar partition_data: If set to true, exported data will be partitioned by size and placed in a + blob directory together with a manifest file. + :vartype partition_data: bool + :ivar data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :vartype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :ivar compression_mode: Allow customers to select compress data for exports. This setting will + enable destination file compression scheme at runtime. By default set to None. Gzip is for csv + and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :ivar export_description: The export description set by customer at time of export + creation/update. + :vartype export_description: str + :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the + next run time. + :vartype next_run_time_estimate: ~datetime.datetime + :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended + state. This is not populated currently. + :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext + """ + + format: Optional[Union[str, "_models.FormatType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The format of the export being delivered. Known values are: \"Csv\" and \"Parquet\".""" + delivery_info: "_models.ExportDeliveryInfo" = rest_field( + name="deliveryInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Has delivery information for the export. Required.""" + definition: "_models.ExportDefinition" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Has the definition for the export. Required.""" + run_history: Optional["_models.ExportExecutionListResult"] = rest_field( + name="runHistory", visibility=["read", "create", "update", "delete", "query"] + ) + """If requested, has the most recent run history for the export.""" + partition_data: Optional[bool] = rest_field( + name="partitionData", visibility=["read", "create", "update", "delete", "query"] + ) + """If set to true, exported data will be partitioned by size and placed in a blob directory + together with a manifest file.""" + data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = rest_field( + name="dataOverwriteBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting + will enable overwrite data for the same month in customer storage account. By default set to + CreateNewReport. Known values are: \"OverwritePreviousReport\" and \"CreateNewReport\".""" + compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = rest_field( + name="compressionMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Allow customers to select compress data for exports. This setting will enable destination file + compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet. + Known values are: \"gzip\", \"snappy\", and \"none\".""" + export_description: Optional[str] = rest_field( + name="exportDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """The export description set by customer at time of export creation/update.""" + next_run_time_estimate: Optional[datetime.datetime] = rest_field( + name="nextRunTimeEstimate", visibility=["read"], format="rfc3339" + ) + """If the export has an active schedule, provides an estimate of the next run time.""" + system_suspension_context: Optional["_models.ExportSuspensionContext"] = rest_field( + name="systemSuspensionContext", visibility=["read"] + ) + """The export suspension reason if export is in SystemSuspended state. This is not populated + currently.""" + + @overload + def __init__( + self, + *, + 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, + data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, + compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, + export_description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostAllocationProportion(_Model): + """Target resources and allocation. + + :ivar name: Target resource for cost allocation. Required. + :vartype name: str + :ivar percentage: Percentage of source cost to allocate to this resource. This value can be + specified to two decimal places and the total percentage of all resources in this rule must sum + to 100.00. Required. + :vartype percentage: float + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Target resource for cost allocation. Required.""" + percentage: float = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Percentage of source cost to allocate to this resource. This value can be specified to two + decimal places and the total percentage of all resources in this rule must sum to 100.00. + Required.""" + + @overload + def __init__( + self, + *, + name: str, + percentage: float, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostAllocationResource(_Model): + """Common values for resources for cost allocation. + + :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known + values are: "Dimension" and "Tag". + :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :ivar name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :vartype name: str + """ + + resource_type: Union[str, "_models.CostAllocationResourceType"] = rest_field( + name="resourceType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of resources contained in this cost allocation rule. Required. Known values are: + \"Dimension\" and \"Tag\".""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If + resource type is tag, this must be a valid Azure tag. Required.""" + + @overload + def __init__( + self, + *, + resource_type: Union[str, "_models.CostAllocationResourceType"], + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostAllocationRuleCheckNameAvailabilityRequest(_Model): # pylint: disable=name-too-long + """The cost allocation rule check name availability request. + + :ivar name: Rule name. + :vartype name: str + :ivar type: Resource type. This is expected to be Microsoft.CostManagement/costAllocationRules. + :vartype type: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Rule name.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource type. This is expected to be Microsoft.CostManagement/costAllocationRules.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostAllocationRuleCheckNameAvailabilityResponse(_Model): # pylint: disable=name-too-long + """The cost allocation rule check name availability response. + + :ivar name_available: Whether this rule name is available. + :vartype name_available: bool + :ivar reason: The reason this name is not available. Known values are: "Invalid", + "AlreadyExists", and "Valid". + :vartype reason: str or ~azure.mgmt.costmanagement.models.Reason + :ivar message: Error message if the name is not available. + :vartype message: str + """ + + name_available: Optional[bool] = rest_field( + name="nameAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether this rule name is available.""" + reason: Optional[Union[str, "_models.Reason"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The reason this name is not available. Known values are: \"Invalid\", \"AlreadyExists\", and + \"Valid\".""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error message if the name is not available.""" + + @overload + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "_models.Reason"]] = None, + message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + """ + + +class CostAllocationRuleDefinition(ProxyResource): + """The cost allocation rule model definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: Cost allocation rule properties. + :vartype properties: ~azure.mgmt.costmanagement.models.CostAllocationRuleProperties + """ + + properties: Optional["_models.CostAllocationRuleProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Cost allocation rule properties.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.CostAllocationRuleProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostAllocationRuleDetails(_Model): + """Resource details of the cost allocation rule. + + :ivar source_resources: Source resources for cost allocation. At this time, this list can + contain no more than one element. + :vartype source_resources: list[~azure.mgmt.costmanagement.models.SourceCostAllocationResource] + :ivar target_resources: Target resources for cost allocation. At this time, this list can + contain no more than one element. + :vartype target_resources: list[~azure.mgmt.costmanagement.models.TargetCostAllocationResource] + """ + + source_resources: Optional[list["_models.SourceCostAllocationResource"]] = rest_field( + name="sourceResources", visibility=["read", "create", "update", "delete", "query"] + ) + """Source resources for cost allocation. At this time, this list can contain no more than one + element.""" + target_resources: Optional[list["_models.TargetCostAllocationResource"]] = rest_field( + name="targetResources", visibility=["read", "create", "update", "delete", "query"] + ) + """Target resources for cost allocation. At this time, this list can contain no more than one + element.""" + + @overload + def __init__( + self, + *, + source_resources: Optional[list["_models.SourceCostAllocationResource"]] = None, + target_resources: Optional[list["_models.TargetCostAllocationResource"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostAllocationRuleProperties(_Model): + """The properties of a cost allocation rule. + + :ivar description: Description of a cost allocation rule. + :vartype description: str + :ivar details: Resource information for the cost allocation rule. Required. + :vartype details: ~azure.mgmt.costmanagement.models.CostAllocationRuleDetails + :ivar status: Status of the rule. Required. Known values are: "NotActive", "Active", and + "Processing". + :vartype status: str or ~azure.mgmt.costmanagement.models.RuleStatus + :ivar created_date: Time at which the rule was created. Rules that change cost for the same + resource are applied in order of creation. + :vartype created_date: ~datetime.datetime + :ivar updated_date: Time at which the rule was last updated. + :vartype updated_date: ~datetime.datetime + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of a cost allocation rule.""" + details: "_models.CostAllocationRuleDetails" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource information for the cost allocation rule. Required.""" + status: Union[str, "_models.RuleStatus"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Status of the rule. Required. Known values are: \"NotActive\", \"Active\", and \"Processing\".""" + created_date: Optional[datetime.datetime] = rest_field(name="createdDate", visibility=["read"], format="rfc3339") + """Time at which the rule was created. Rules that change cost for the same resource are applied in + order of creation.""" + updated_date: Optional[datetime.datetime] = rest_field(name="updatedDate", visibility=["read"], format="rfc3339") + """Time at which the rule was last updated.""" + + @overload + def __init__( + self, + *, + details: "_models.CostAllocationRuleDetails", + status: Union[str, "_models.RuleStatus"], + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostDetailsOperationResults(_Model): + """The result of the long running operation for cost details Api. + + :ivar id: The id of the long running operation. + :vartype id: str + :ivar name: The name of the long running operation. + :vartype name: str + :ivar type: The type of the long running operation. + :vartype type: str + :ivar status: The status of the cost details operation. Known values are: "Completed", + "NoDataFound", and "Failed". + :vartype status: str or ~azure.mgmt.costmanagement.models.CostDetailsStatusType + :ivar manifest: The manifest of the report generated by the operation. + :vartype manifest: ~azure.mgmt.costmanagement.models.ReportManifest + :ivar valid_till: The time at which report URL becomes invalid/expires in UTC e.g. + 2020-12-08T05:55:59.4394737Z. + :vartype valid_till: ~datetime.datetime + :ivar error: The details of the error. + :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetails + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The id of the long running operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the long running operation.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of the long running operation.""" + status: Optional[Union[str, "_models.CostDetailsStatusType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the cost details operation. Known values are: \"Completed\", \"NoDataFound\", and + \"Failed\".""" + manifest: Optional["_models.ReportManifest"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The manifest of the report generated by the operation.""" + valid_till: Optional[datetime.datetime] = rest_field( + name="validTill", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.""" + error: Optional["_models.ErrorDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The details of the error.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + type: Optional[str] = None, + status: Optional[Union[str, "_models.CostDetailsStatusType"]] = None, + manifest: Optional["_models.ReportManifest"] = None, + valid_till: Optional[datetime.datetime] = None, + error: Optional["_models.ErrorDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostDetailsTimePeriod(_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. + + :ivar start: The start date to pull data from. example format 2020-03-15. Required. + :vartype start: str + :ivar end: The end date to pull data to. example format 2020-03-15. Required. + :vartype end: str + """ + + start: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The start date to pull data from. example format 2020-03-15. Required.""" + end: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The end date to pull data to. example format 2020-03-15. Required.""" + + @overload + def __init__( + self, + *, + start: str, + end: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Operation(_Model): + """REST API Operation. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for Azure Resource Manager/control-plane operations. + :vartype is_data_action: bool + :ivar display: Localized display information for this particular operation. + :vartype display: ~azure.mgmt.costmanagement.models.OperationDisplay + :ivar 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". + :vartype origin: str or ~azure.mgmt.costmanagement.models.Origin + :ivar action_type: Extensible enum. Indicates the action type. "Internal" refers to actions + that are for internal only APIs. "Internal" + :vartype action_type: str or ~azure.mgmt.costmanagement.models.ActionType + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """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: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) + """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and + \"false\" for Azure Resource Manager/control-plane operations.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Localized display information for this particular operation.""" + origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) + """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: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) + """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for + internal only APIs. \"Internal\"""" + + @overload + def __init__( + self, + *, + display: Optional["_models.OperationDisplay"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostManagementOperation(Operation): + """A Cost management REST API operation. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for Azure Resource Manager/control-plane operations. + :vartype is_data_action: bool + :ivar display: Localized display information for this particular operation. + :vartype display: ~azure.mgmt.costmanagement.models.OperationDisplay + :ivar 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". + :vartype origin: str or ~azure.mgmt.costmanagement.models.Origin + :ivar action_type: Extensible enum. Indicates the action type. "Internal" refers to actions + that are for internal only APIs. "Internal" + :vartype action_type: str or ~azure.mgmt.costmanagement.models.ActionType + :ivar id: Operation id: {provider}/{resource}/{operation}. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Operation id: {provider}/{resource}/{operation}.""" + + @overload + def __init__( + self, + *, + display: Optional["_models.OperationDisplay"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostManagementProxyResource(_Model): + """The Resource model definition. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar e_tag: 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. + :vartype e_tag: str + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Resource Id.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Resource name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + @overload + def __init__( + self, + *, + e_tag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CostManagementResource(_Model): + """The Resource model definition. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the resource. + :vartype location: str + :ivar sku: SKU of the resource. + :vartype sku: str + :ivar e_tag: ETag of the resource. + :vartype e_tag: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Resource Id.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Resource name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type.""" + location: Optional[str] = rest_field(visibility=["read"]) + """Location of the resource.""" + sku: Optional[str] = rest_field(visibility=["read"]) + """SKU of the resource.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) + """ETag of the resource.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read"]) + """Resource tags.""" + + +class CurrentSpend(_Model): + """The current amount of cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost. + + :ivar amount: The total amount of cost which is being tracked by the budget. + :vartype amount: float + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + amount: Optional[float] = rest_field(visibility=["read"]) + """The total amount of cost which is being tracked by the budget.""" + unit: Optional[str] = rest_field(visibility=["read"]) + """The unit of measure for the budget amount.""" + + +class Dimension(CostManagementResource): + """List of Dimension. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the resource. + :vartype location: str + :ivar sku: SKU of the resource. + :vartype sku: str + :ivar e_tag: ETag of the resource. + :vartype e_tag: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Dimension properties. + :vartype properties: ~azure.mgmt.costmanagement.models.DimensionProperties + """ + + properties: Optional["_models.DimensionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Dimension properties.""" + + __flattened_items = [ + "description", + "filter_enabled", + "grouping_enabled", + "data", + "total", + "category", + "usage_start", + "usage_end", + "next_link", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DimensionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DimensionProperties(_Model): + """Dimension properties. + + :ivar description: Dimension description. + :vartype description: str + :ivar filter_enabled: Filter enabled. + :vartype filter_enabled: bool + :ivar grouping_enabled: Grouping enabled. + :vartype grouping_enabled: bool + :ivar data: Dimension data. + :vartype data: list[str] + :ivar total: Total number of data for the dimension. + :vartype total: int + :ivar category: Dimension category. + :vartype category: str + :ivar usage_start: Usage start. + :vartype usage_start: ~datetime.datetime + :ivar usage_end: Usage end. + :vartype usage_end: ~datetime.datetime + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + description: Optional[str] = rest_field(visibility=["read"]) + """Dimension description.""" + filter_enabled: Optional[bool] = rest_field(name="filterEnabled", visibility=["read"]) + """Filter enabled.""" + grouping_enabled: Optional[bool] = rest_field(name="groupingEnabled", visibility=["read"]) + """Grouping enabled.""" + data: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Dimension data.""" + total: Optional[int] = rest_field(visibility=["read"]) + """Total number of data for the dimension.""" + category: Optional[str] = rest_field(visibility=["read"]) + """Dimension category.""" + usage_start: Optional[datetime.datetime] = rest_field(name="usageStart", visibility=["read"], format="rfc3339") + """Usage start.""" + usage_end: Optional[datetime.datetime] = rest_field(name="usageEnd", visibility=["read"], format="rfc3339") + """Usage end.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read"]) + """The link (url) to the next page of results.""" + + @overload + def __init__( + self, + *, + data: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DismissAlertPayload(_Model): + """The request payload to update an alert. + + :ivar properties: Alert properties. + :vartype properties: ~azure.mgmt.costmanagement.models.AlertProperties + """ + + properties: Optional["_models.AlertProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Alert properties.""" + + __flattened_items = [ + "definition", + "description", + "source", + "details", + "cost_entity_id", + "status", + "creation_time", + "close_time", + "modification_time", + "status_modification_user_name", + "status_modification_time", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AlertProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DownloadURL(_Model): + """The URL to download the generated report. + + :ivar expiry_time: The time at which report URL becomes invalid/expires in UTC e.g. + 2020-12-08T05:55:59.4394737Z. + :vartype expiry_time: ~datetime.datetime + :ivar valid_till: The time at which report URL becomes invalid/expires in UTC e.g. + 2020-12-08T05:55:59.4394737Z. + :vartype valid_till: ~datetime.datetime + :ivar download_url: The URL to download the generated report. + :vartype download_url: str + """ + + expiry_time: Optional[datetime.datetime] = rest_field(name="expiryTime", visibility=["read"], format="rfc3339") + """The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.""" + valid_till: Optional[datetime.datetime] = rest_field( + name="validTill", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.""" + download_url: Optional[str] = rest_field( + name="downloadUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """The URL to download the generated report.""" + + @overload + def __init__( + self, + *, + valid_till: Optional[datetime.datetime] = None, + download_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorAdditionalInfo(_Model): + """The resource management error additional info. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """The additional info type.""" + info: Optional[Any] = rest_field(visibility=["read"]) + """The additional info.""" + + +class ErrorDetail(_Model): + """The error detail. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.costmanagement.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.costmanagement.models.ErrorAdditionalInfo] + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """The error code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The error message.""" + target: Optional[str] = rest_field(visibility=["read"]) + """The error target.""" + details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"]) + """The error details.""" + additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field( + name="additionalInfo", visibility=["read"] + ) + """The error additional info.""" + + +class ErrorDetails(_Model): + """The details of the error. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """Error code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """Error message indicating why the operation failed.""" + + +class ErrorDetailsWithNestedDetails(ErrorDetails): + """The details of the error. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + :ivar details: The additional details of the error. + :vartype details: list[~azure.mgmt.costmanagement.models.ErrorDetailsWithNestedDetails] + """ + + details: Optional[list["_models.ErrorDetailsWithNestedDetails"]] = rest_field(visibility=["read"]) + """The additional details of the error.""" + + +class ErrorResponse(_Model): + """Error response indicates that the service is not able to process the incoming request. The + reason is provided in the error message. \\n\\nSome Error responses: \\n\\n * 429 + TooManyRequests - Request is throttled. Retry after waiting for the time specified in the + \\"x-ms-ratelimit-microsoft.consumption-retry-after\\" header. \\n\\n * 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 + """ + + error: Optional["_models.ErrorDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The details of the error.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorResponseWithNestedDetails(_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.ErrorDetailsWithNestedDetails + """ + + error: Optional["_models.ErrorDetailsWithNestedDetails"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The details of the error.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetailsWithNestedDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Export(ExtensionResource): + """An export resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: The properties of the export. + :vartype properties: ~azure.mgmt.costmanagement.models.ExportProperties + :ivar identity: The managed identity associated with Export. + :vartype identity: ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity + :ivar location: The location of the Export's managed identity. Only required when utilizing + managed identity. + :vartype location: str + :ivar e_tag: 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. + :vartype e_tag: str + """ + + properties: Optional["_models.ExportProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the export.""" + identity: Optional["_models.SystemAssignedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed identity associated with Export.""" + location: Optional[str] = rest_field(visibility=["read", "create"]) + """The location of the Export's managed identity. Only required when utilizing managed identity.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + __flattened_items = [ + "format", + "delivery_info", + "definition", + "run_history", + "partition_data", + "data_overwrite_behavior", + "compression_mode", + "export_description", + "next_run_time_estimate", + "system_suspension_context", + "schedule", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ExportProperties"] = None, + identity: Optional["_models.SystemAssignedServiceIdentity"] = None, + location: Optional[str] = None, + e_tag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ExportDataset(_Model): + """The definition for data in the export. + + :ivar granularity: The granularity of rows in the export. Currently 'Daily' is supported for + most cases. Known values are: "Daily" and "Monthly". + :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType + :ivar configuration: The export dataset configuration. + :vartype configuration: ~azure.mgmt.costmanagement.models.ExportDatasetConfiguration + """ + + granularity: Optional[Union[str, "_models.GranularityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The granularity of rows in the export. Currently 'Daily' is supported for most cases. Known + values are: \"Daily\" and \"Monthly\".""" + configuration: Optional["_models.ExportDatasetConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The export dataset configuration.""" + + @overload + def __init__( + self, + *, + granularity: Optional[Union[str, "_models.GranularityType"]] = None, + configuration: Optional["_models.ExportDatasetConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportDatasetConfiguration(_Model): + """This is on path to deprecation and will not be supported going forward. + + :ivar columns: 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). + :vartype columns: list[str] + :ivar data_version: The data version for the selected for the export. If not provided then the + export will default to latest data version. + :vartype data_version: str + :ivar filters: Filters associated with the data sets. + :vartype filters: list[~azure.mgmt.costmanagement.models.FilterItems] + """ + + columns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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).""" + data_version: Optional[str] = rest_field( + name="dataVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The data version for the selected for the export. If not provided then the export will default + to latest data version.""" + filters: Optional[list["_models.FilterItems"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Filters associated with the data sets.""" + + @overload + def __init__( + self, + *, + columns: Optional[list[str]] = None, + data_version: Optional[str] = None, + filters: Optional[list["_models.FilterItems"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportDefinition(_Model): + """The definition of an export. + + :ivar type: 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", "AmortizedCost", "FocusCost", + "PriceSheet", "ReservationTransactions", "ReservationRecommendations", and + "ReservationDetails". + :vartype type: str or ~azure.mgmt.costmanagement.models.ExportType + :ivar timeframe: 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", "Custom", and "TheCurrentMonth". + :vartype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :ivar time_period: Has time period for pulling data for the export. + :vartype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod + :ivar data_set: The definition for data in the export. + :vartype data_set: ~azure.mgmt.costmanagement.models.ExportDataset + """ + + type: Union[str, "_models.ExportType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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\", \"AmortizedCost\", \"FocusCost\", + \"PriceSheet\", \"ReservationTransactions\", \"ReservationRecommendations\", and + \"ReservationDetails\".""" + timeframe: Union[str, "_models.TimeframeType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """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\", \"Custom\", and \"TheCurrentMonth\".""" + time_period: Optional["_models.ExportTimePeriod"] = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """Has time period for pulling data for the export.""" + data_set: Optional["_models.ExportDataset"] = rest_field( + name="dataSet", visibility=["read", "create", "update", "delete", "query"] + ) + """The definition for data in the export.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ExportType"], + timeframe: Union[str, "_models.TimeframeType"], + time_period: Optional["_models.ExportTimePeriod"] = None, + data_set: Optional["_models.ExportDataset"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportDeliveryDestination(_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 + `_ + ). + + :ivar type: The export delivery destination type. Currently only 'AzureBlob' is supported. + "AzureBlob" + :vartype type: str or ~azure.mgmt.costmanagement.models.DestinationType + :ivar resource_id: The resource id of the storage account where exports will be delivered. This + is not required if a sasToken and storageAccount are specified. + :vartype resource_id: str + :ivar container: The name of the container where exports will be uploaded. If the container + does not exist it will be created. Required. + :vartype container: str + :ivar root_folder_path: The name of the directory where exports will be uploaded. + :vartype root_folder_path: str + :ivar sas_token: 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. + :vartype sas_token: str + :ivar storage_account: 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. + :vartype storage_account: str + """ + + type: Optional[Union[str, "_models.DestinationType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The export delivery destination type. Currently only 'AzureBlob' is supported. \"AzureBlob\"""" + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """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 = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the container where exports will be uploaded. If the container does not exist it + will be created. Required.""" + root_folder_path: Optional[str] = rest_field( + name="rootFolderPath", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the directory where exports will be uploaded.""" + sas_token: Optional[str] = rest_field(name="sasToken", visibility=["read", "create", "update", "delete", "query"]) + """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: Optional[str] = rest_field( + name="storageAccount", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + + @overload + def __init__( + self, + *, + container: str, + type: Optional[Union[str, "_models.DestinationType"]] = None, + resource_id: Optional[str] = None, + root_folder_path: Optional[str] = None, + sas_token: Optional[str] = None, + storage_account: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportDeliveryInfo(_Model): + """The delivery information associated with a export. + + :ivar destination: Has destination for the export being delivered. Required. + :vartype destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + """ + + destination: "_models.ExportDeliveryDestination" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has destination for the export being delivered. Required.""" + + @overload + def __init__( + self, + *, + destination: "_models.ExportDeliveryDestination", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportExecutionListResult(_Model): + """Result of listing the run history of an export. + + :ivar value: A list of export runs. + :vartype value: list[~azure.mgmt.costmanagement.models.ExportRun] + """ + + value: Optional[list["_models.ExportRun"]] = rest_field(visibility=["read"]) + """A list of export runs.""" + + +class ExportListResult(_Model): + """Result of listing exports. It contains a list of available exports in the scope provided. + + :ivar value: The list of exports. + :vartype value: list[~azure.mgmt.costmanagement.models.Export] + """ + + value: Optional[list["_models.Export"]] = rest_field(visibility=["read"]) + """The list of exports.""" + + +class ExportProperties(CommonExportProperties): + """The properties of the export. + + :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". + :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType + :ivar delivery_info: Has delivery information for the export. Required. + :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :ivar definition: Has the definition for the export. Required. + :vartype definition: ~azure.mgmt.costmanagement.models.ExportDefinition + :ivar run_history: If requested, has the most recent run history for the export. + :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :ivar partition_data: If set to true, exported data will be partitioned by size and placed in a + blob directory together with a manifest file. + :vartype partition_data: bool + :ivar data_overwrite_behavior: Allow customers to select overwrite + data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same + month in customer storage account. By default set to CreateNewReport. Known values are: + "OverwritePreviousReport" and "CreateNewReport". + :vartype data_overwrite_behavior: str or + ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType + :ivar compression_mode: Allow customers to select compress data for exports. This setting will + enable destination file compression scheme at runtime. By default set to None. Gzip is for csv + and snappy for parquet. Known values are: "gzip", "snappy", and "none". + :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType + :ivar export_description: The export description set by customer at time of export + creation/update. + :vartype export_description: str + :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the + next run time. + :vartype next_run_time_estimate: ~datetime.datetime + :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended + state. This is not populated currently. + :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext + :ivar schedule: Has schedule information for the export. + :vartype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule + """ + + schedule: Optional["_models.ExportSchedule"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has schedule information for the export.""" + + @overload + def __init__( + self, + *, + 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, + data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, + compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, + export_description: Optional[str] = None, + schedule: Optional["_models.ExportSchedule"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportRecurrencePeriod(_Model): + """The start and end date for recurrence schedule. + + :ivar from_property: The start date of recurrence. Required. + :vartype from_property: ~datetime.datetime + :ivar to: The end date of recurrence. + :vartype to: ~datetime.datetime + """ + + from_property: datetime.datetime = rest_field( + name="from", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date of recurrence. Required.""" + to: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end date of recurrence.""" + + @overload + def __init__( + self, + *, + from_property: datetime.datetime, + to: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportRun(CostManagementProxyResource): + """An export run. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar e_tag: 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. + :vartype e_tag: str + :ivar properties: The properties of the export run. + :vartype properties: ~azure.mgmt.costmanagement.models.ExportRunProperties + """ + + properties: Optional["_models.ExportRunProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the export run.""" + + __flattened_items = [ + "execution_type", + "status", + "submitted_by", + "submitted_time", + "processing_start_time", + "processing_end_time", + "start_date", + "end_date", + "file_name", + "manifest_file", + "run_settings", + "error", + ] + + @overload + def __init__( + self, + *, + e_tag: Optional[str] = None, + properties: Optional["_models.ExportRunProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ExportRunProperties(_Model): + """The properties of the export run. + + :ivar execution_type: The type of the export run. Known values are: "OnDemand" and "Scheduled". + :vartype execution_type: str or ~azure.mgmt.costmanagement.models.ExecutionType + :ivar status: The last known status of the export run. Known values are: "Queued", + "InProgress", "Completed", "Failed", "Timeout", "NewDataNotAvailable", and "DataNotAvailable". + :vartype status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus + :ivar submitted_by: The identifier for the entity that triggered the export. For on-demand runs + it is the user email. For scheduled runs it is 'System'. + :vartype submitted_by: str + :ivar submitted_time: The time when export was queued to be run. + :vartype submitted_time: ~datetime.datetime + :ivar processing_start_time: The time when export was picked up to be run. + :vartype processing_start_time: ~datetime.datetime + :ivar processing_end_time: The time when the export run finished. + :vartype processing_end_time: ~datetime.datetime + :ivar start_date: The start datetime for the export. + :vartype start_date: ~datetime.datetime + :ivar end_date: The end datetime for the export. + :vartype end_date: ~datetime.datetime + :ivar file_name: The name of the exported file. + :vartype file_name: str + :ivar manifest_file: The manifest file location(URI location) for the exported files. + :vartype manifest_file: str + :ivar run_settings: The export settings that were in effect for this run. + :vartype run_settings: ~azure.mgmt.costmanagement.models.CommonExportProperties + :ivar error: The details of any error. + :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetails + """ + + execution_type: Optional[Union[str, "_models.ExecutionType"]] = rest_field( + name="executionType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of the export run. Known values are: \"OnDemand\" and \"Scheduled\".""" + status: Optional[Union[str, "_models.ExecutionStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The last known status of the export run. Known values are: \"Queued\", \"InProgress\", + \"Completed\", \"Failed\", \"Timeout\", \"NewDataNotAvailable\", and \"DataNotAvailable\".""" + submitted_by: Optional[str] = rest_field( + name="submittedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[datetime.datetime] = rest_field( + name="submittedTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time when export was queued to be run.""" + processing_start_time: Optional[datetime.datetime] = rest_field( + name="processingStartTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time when export was picked up to be run.""" + processing_end_time: Optional[datetime.datetime] = rest_field( + name="processingEndTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time when the export run finished.""" + start_date: Optional[datetime.datetime] = rest_field( + name="startDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start datetime for the export.""" + end_date: Optional[datetime.datetime] = rest_field( + name="endDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end datetime for the export.""" + file_name: Optional[str] = rest_field(name="fileName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the exported file.""" + manifest_file: Optional[str] = rest_field( + name="manifestFile", visibility=["read", "create", "update", "delete", "query"] + ) + """The manifest file location(URI location) for the exported files.""" + run_settings: Optional["_models.CommonExportProperties"] = rest_field( + name="runSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The export settings that were in effect for this run.""" + error: Optional["_models.ErrorDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The details of any error.""" + + @overload + def __init__( + self, + *, + 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, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + file_name: Optional[str] = None, + manifest_file: Optional[str] = None, + run_settings: Optional["_models.CommonExportProperties"] = None, + error: Optional["_models.ErrorDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportRunRequest(_Model): + """The export run request. + + :ivar time_period: Has time period for pulling data for the export. + :vartype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod + """ + + time_period: Optional["_models.ExportTimePeriod"] = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """Has time period for pulling data for the export.""" + + @overload + def __init__( + self, + *, + time_period: Optional["_models.ExportTimePeriod"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportSchedule(_Model): + """The schedule associated with the export. + + :ivar status: The status of the export's schedule. If 'Inactive', the export's schedule is + paused. To enable export set the status to be Active and then make a PUT request. Known values + are: "Active" and "Inactive". + :vartype status: str or ~azure.mgmt.costmanagement.models.StatusType + :ivar recurrence: The schedule recurrence. Known values are: "Daily", "Weekly", "Monthly", and + "Annually". + :vartype recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :ivar recurrence_period: 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. + :vartype recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + """ + + status: Optional[Union[str, "_models.StatusType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the export's schedule. If 'Inactive', the export's schedule is paused. To enable + export set the status to be Active and then make a PUT request. Known values are: \"Active\" + and \"Inactive\".""" + recurrence: Optional[Union[str, "_models.RecurrenceType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The schedule recurrence. Known values are: \"Daily\", \"Weekly\", \"Monthly\", and + \"Annually\".""" + recurrence_period: Optional["_models.ExportRecurrencePeriod"] = rest_field( + name="recurrencePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + + @overload + def __init__( + self, + *, + status: Optional[Union[str, "_models.StatusType"]] = None, + recurrence: Optional[Union[str, "_models.RecurrenceType"]] = None, + recurrence_period: Optional["_models.ExportRecurrencePeriod"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportSuspensionContext(_Model): + """The properties of the export run. This is not populated currently. + + :ivar suspension_code: The code for export suspension. + :vartype suspension_code: str + :ivar suspension_reason: The detailed reason for export suspension. + :vartype suspension_reason: str + :ivar suspension_time: The time when the export was suspended. + :vartype suspension_time: ~datetime.datetime + """ + + suspension_code: Optional[str] = rest_field( + name="suspensionCode", visibility=["read", "create", "update", "delete", "query"] + ) + """The code for export suspension.""" + suspension_reason: Optional[str] = rest_field( + name="suspensionReason", visibility=["read", "create", "update", "delete", "query"] + ) + """The detailed reason for export suspension.""" + suspension_time: Optional[datetime.datetime] = rest_field( + name="suspensionTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time when the export was suspended.""" + + @overload + def __init__( + self, + *, + suspension_code: Optional[str] = None, + suspension_reason: Optional[str] = None, + suspension_time: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportTimePeriod(_Model): + """The date range for data in the export. This should only be specified with timeFrame set to + 'Custom'. The maximum date range is 1 calendar month. + + :ivar from_property: The start date for export data. Required. + :vartype from_property: ~datetime.datetime + :ivar to: The end date for export data. Required. + :vartype to: ~datetime.datetime + """ + + from_property: datetime.datetime = rest_field( + name="from", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date for export data. Required.""" + to: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """The end date for export data. Required.""" + + @overload + def __init__( + self, + *, + from_property: datetime.datetime, + to: datetime.datetime, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FileDestination(_Model): + """Destination of the view data. This is optional. Currently only CSV format is supported. + + :ivar file_formats: Destination of the view data. Currently only CSV format is supported. + :vartype file_formats: list[str or ~azure.mgmt.costmanagement.models.FileFormat] + """ + + file_formats: Optional[list[Union[str, "_models.FileFormat"]]] = rest_field( + name="fileFormats", visibility=["read", "create", "update", "delete", "query"] + ) + """Destination of the view data. Currently only CSV format is supported.""" + + @overload + def __init__( + self, + *, + file_formats: Optional[list[Union[str, "_models.FileFormat"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FilterItems(_Model): + """Will contain the filter name and value to operate on. This is currently only supported for + Export Definition type of ReservationRecommendations. + + :ivar name: The name of the filter. This is currently only supported for Export Definition type + of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', + 'ResourceType']. Known values are: "ReservationScope", "ResourceType", and "LookBackPeriod". + :vartype name: str or ~azure.mgmt.costmanagement.models.FilterItemNames + :ivar value: Value to filter by. Currently values supported per name are, for + 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported + values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values + are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', + 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', + 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. + :vartype value: str + """ + + name: Optional[Union[str, "_models.FilterItemNames"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the filter. This is currently only supported for Export Definition type of + ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', + 'ResourceType']. Known values are: \"ReservationScope\", \"ResourceType\", and + \"LookBackPeriod\".""" + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Value to filter by. Currently values supported per name are, for 'ReservationScope' supported + values are ['Single', 'Shared'], for 'LookBackPeriod' supported values are ['Last7Days', + 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values are ['VirtualMachines', + 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', + 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', + 'VMwareCloudSimple'].""" + + @overload + def __init__( + self, + *, + name: Optional[Union[str, "_models.FilterItemNames"]] = None, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastAggregation(_Model): + """The aggregation expression to be used in the forecast. + + :ivar name: The name of the column to aggregate. Required. Known values are: "PreTaxCostUSD", + "Cost", "CostUSD", and "PreTaxCost". + :vartype name: str or ~azure.mgmt.costmanagement.models.FunctionName + :ivar function: The name of the aggregation function to use. Required. "Sum" + :vartype function: str or ~azure.mgmt.costmanagement.models.FunctionType + """ + + name: Union[str, "_models.FunctionName"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to aggregate. Required. Known values are: \"PreTaxCostUSD\", \"Cost\", + \"CostUSD\", and \"PreTaxCost\".""" + function: Union[str, "_models.FunctionType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the aggregation function to use. Required. \"Sum\"""" + + @overload + def __init__( + self, + *, + name: Union[str, "_models.FunctionName"], + function: Union[str, "_models.FunctionType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastColumn(_Model): + """Forecast column properties. + + :ivar name: The name of column. + :vartype name: str + :ivar type: The type of column. + :vartype type: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of column.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of column.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastComparisonExpression(_Model): + """The comparison expression to be used in the forecast. + + :ivar name: The name of the column to use in comparison. Required. + :vartype name: str + :ivar operator: The operator to use for comparison. Required. "In" + :vartype operator: str or ~azure.mgmt.costmanagement.models.ForecastOperatorType + :ivar values_property: Array of values to use for comparison. Required. + :vartype values_property: list[str] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to use in comparison. Required.""" + operator: Union[str, "_models.ForecastOperatorType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operator to use for comparison. Required. \"In\"""" + values_property: list[str] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Array of values to use for comparison. Required.""" + + @overload + def __init__( + self, + *, + name: str, + operator: Union[str, "_models.ForecastOperatorType"], + values_property: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastDataset(_Model): + """The definition of data present in the forecast. + + :ivar granularity: The granularity of rows in the forecast. Known values are: "Daily" and + "Monthly". + :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType + :ivar configuration: Has configuration information for the data in the export. The + configuration will be ignored if aggregation and grouping are provided. + :vartype configuration: ~azure.mgmt.costmanagement.models.ForecastDatasetConfiguration + :ivar aggregation: 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. + :vartype aggregation: dict[str, ~azure.mgmt.costmanagement.models.ForecastAggregation] + :ivar filter: Has filter expression to use in the forecast. + :vartype filter: ~azure.mgmt.costmanagement.models.ForecastFilter + """ + + granularity: Optional[Union[str, "_models.GranularityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The granularity of rows in the forecast. Known values are: \"Daily\" and \"Monthly\".""" + configuration: Optional["_models.ForecastDatasetConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has configuration information for the data in the export. The configuration will be ignored if + aggregation and grouping are provided.""" + aggregation: dict[str, "_models.ForecastAggregation"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional["_models.ForecastFilter"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Has filter expression to use in the forecast.""" + + @overload + def __init__( + self, + *, + aggregation: dict[str, "_models.ForecastAggregation"], + granularity: Optional[Union[str, "_models.GranularityType"]] = None, + configuration: Optional["_models.ForecastDatasetConfiguration"] = None, + filter: Optional["_models.ForecastFilter"] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastDatasetConfiguration(_Model): + """The configuration of dataset in the forecast. + + :ivar columns: 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. + :vartype columns: list[str] + """ + + columns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + @overload + def __init__( + self, + *, + columns: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastDefinition(_Model): + """The definition of a forecast. + + :ivar type: The type of the forecast. Required. Known values are: "Usage", "ActualCost", and + "AmortizedCost". + :vartype type: str or ~azure.mgmt.costmanagement.models.ForecastType + :ivar timeframe: The time frame for pulling data for the forecast. If custom, then a specific + time period must be provided. Required. "Custom" + :vartype timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframe + :ivar time_period: Has time period for pulling data for the forecast. + :vartype time_period: ~azure.mgmt.costmanagement.models.ForecastTimePeriod + :ivar dataset: Has definition for data in this forecast. Required. + :vartype dataset: ~azure.mgmt.costmanagement.models.ForecastDataset + :ivar include_actual_cost: A boolean determining if actualCost will be included. + :vartype include_actual_cost: bool + :ivar include_fresh_partial_cost: A boolean determining if FreshPartialCost will be included. + :vartype include_fresh_partial_cost: bool + """ + + type: Union[str, "_models.ForecastType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of the forecast. Required. Known values are: \"Usage\", \"ActualCost\", and + \"AmortizedCost\".""" + timeframe: Union[str, "_models.ForecastTimeframe"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The time frame for pulling data for the forecast. If custom, then a specific time period must + be provided. Required. \"Custom\"""" + time_period: Optional["_models.ForecastTimePeriod"] = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """Has time period for pulling data for the forecast.""" + dataset: "_models.ForecastDataset" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Has definition for data in this forecast. Required.""" + include_actual_cost: Optional[bool] = rest_field( + name="includeActualCost", visibility=["read", "create", "update", "delete", "query"] + ) + """A boolean determining if actualCost will be included.""" + include_fresh_partial_cost: Optional[bool] = rest_field( + name="includeFreshPartialCost", visibility=["read", "create", "update", "delete", "query"] + ) + """A boolean determining if FreshPartialCost will be included.""" + + @overload + def __init__( + self, + *, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastFilter(_Model): + """The filter expression to be used in the export. + + :ivar and_property: The logical "AND" expression. Must have at least 2 items. + :vartype and_property: list[~azure.mgmt.costmanagement.models.ForecastFilter] + :ivar or_property: The logical "OR" expression. Must have at least 2 items. + :vartype or_property: list[~azure.mgmt.costmanagement.models.ForecastFilter] + :ivar dimensions: Has comparison expression for a dimension. + :vartype dimensions: ~azure.mgmt.costmanagement.models.ForecastComparisonExpression + :ivar tags: Has comparison expression for a tag. + :vartype tags: ~azure.mgmt.costmanagement.models.ForecastComparisonExpression + """ + + and_property: Optional[list["_models.ForecastFilter"]] = rest_field( + name="and", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical \"AND\" expression. Must have at least 2 items.""" + or_property: Optional[list["_models.ForecastFilter"]] = rest_field( + name="or", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical \"OR\" expression. Must have at least 2 items.""" + dimensions: Optional["_models.ForecastComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a dimension.""" + tags: Optional["_models.ForecastComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a tag.""" + + @overload + def __init__( + self, + *, + and_property: Optional[list["_models.ForecastFilter"]] = None, + or_property: Optional[list["_models.ForecastFilter"]] = None, + dimensions: Optional["_models.ForecastComparisonExpression"] = None, + tags: Optional["_models.ForecastComparisonExpression"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastProperties(_Model): + """Forecast properties. + + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + :ivar columns: Array of columns. + :vartype columns: list[~azure.mgmt.costmanagement.models.ForecastColumn] + :ivar rows: Array of rows. + :vartype rows: list[list[any]] + """ + + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """The link (url) to the next page of results.""" + columns: Optional[list["_models.ForecastColumn"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Array of columns.""" + rows: Optional[list[list[Any]]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Array of rows.""" + + @overload + def __init__( + self, + *, + next_link: Optional[str] = None, + columns: Optional[list["_models.ForecastColumn"]] = None, + rows: Optional[list[list[Any]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ForecastResult(CostManagementResource): + """Result of forecast. It contains all columns listed under groupings and aggregation. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the resource. + :vartype location: str + :ivar sku: SKU of the resource. + :vartype sku: str + :ivar e_tag: ETag of the resource. + :vartype e_tag: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Forecast properties. + :vartype properties: ~azure.mgmt.costmanagement.models.ForecastProperties + """ + + properties: Optional["_models.ForecastProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Forecast properties.""" + + __flattened_items = ["next_link", "columns", "rows"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ForecastProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ForecastSpend(_Model): + """The forecasted cost which is being tracked for a budget. + + Supported for CategoryType(s): Cost. + + :ivar amount: The forecasted cost for the total time period which is being tracked by the + budget. This value is only provided if the budget contains a forecast alert type. + :vartype amount: float + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + amount: Optional[float] = rest_field(visibility=["read"]) + """The forecasted cost for the total time period which is being tracked by the budget. This value + is only provided if the budget contains a forecast alert type.""" + unit: Optional[str] = rest_field(visibility=["read"]) + """The unit of measure for the budget amount.""" + + +class ForecastTimePeriod(_Model): + """Has time period for pulling data for the forecast. + + :ivar from_property: The start date to pull data from. Required. + :vartype from_property: ~datetime.datetime + :ivar to: The end date to pull data to. Required. + :vartype to: ~datetime.datetime + """ + + from_property: datetime.datetime = rest_field( + name="from", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date to pull data from. Required.""" + to: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """The end date to pull data to. Required.""" + + @overload + def __init__( + self, + *, + from_property: datetime.datetime, + to: datetime.datetime, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GenerateCostDetailsReportErrorResponse(_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 + """ + + error: Optional["_models.ErrorDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The details of the error.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GenerateCostDetailsReportRequestDefinition(_Model): # pylint: disable=name-too-long + """The definition of a cost detailed report. + + :ivar metric: The type of the detailed report. By default ActualCost is provided. Known values + are: "ActualCost" and "AmortizedCost". + :vartype metric: str or ~azure.mgmt.costmanagement.models.CostDetailsMetricType + :ivar time_period: 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. + :vartype time_period: ~azure.mgmt.costmanagement.models.CostDetailsTimePeriod + :ivar billing_period: 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. + :vartype billing_period: str + :ivar invoice_id: 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. + :vartype invoice_id: str + """ + + metric: Optional[Union[str, "_models.CostDetailsMetricType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of the detailed report. By default ActualCost is provided. Known values are: + \"ActualCost\" and \"AmortizedCost\".""" + time_period: Optional["_models.CostDetailsTimePeriod"] = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[str] = rest_field( + name="billingPeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[str] = rest_field(name="invoiceId", visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + @overload + def __init__( + self, + *, + metric: Optional[Union[str, "_models.CostDetailsMetricType"]] = None, + time_period: Optional["_models.CostDetailsTimePeriod"] = None, + billing_period: Optional[str] = None, + invoice_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GenerateDetailedCostReportDefinition(_Model): + """The definition of a cost detailed report. + + :ivar metric: The type of the detailed report. By default ActualCost is provided. Known values + are: "ActualCost" and "AmortizedCost". + :vartype metric: str or ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportMetricType + :ivar time_period: 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. + :vartype time_period: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportTimePeriod + :ivar billing_period: 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. + :vartype billing_period: str + :ivar invoice_id: 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. + :vartype invoice_id: str + :ivar customer_id: Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also + required for this). + :vartype customer_id: str + """ + + metric: Optional[Union[str, "_models.GenerateDetailedCostReportMetricType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of the detailed report. By default ActualCost is provided. Known values are: + \"ActualCost\" and \"AmortizedCost\".""" + time_period: Optional["_models.GenerateDetailedCostReportTimePeriod"] = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[str] = rest_field( + name="billingPeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[str] = rest_field(name="invoiceId", visibility=["read", "create", "update", "delete", "query"]) + """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: Optional[str] = rest_field( + name="customerId", visibility=["read", "create", "update", "delete", "query"] + ) + """Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also required for this).""" + + @overload + def __init__( + self, + *, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GenerateDetailedCostReportErrorResponse(_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 + """ + + error: Optional["_models.ErrorDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The details of the error.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GenerateDetailedCostReportOperationResult(ExtensionResource): # pylint: disable=name-too-long + """The result of the long running operation for cost detailed report. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: The properties of the resource generated. + :vartype properties: ~azure.mgmt.costmanagement.models.DownloadURL + """ + + properties: Optional["_models.DownloadURL"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The properties of the resource generated.""" + + __flattened_items = ["expiry_time", "valid_till", "download_url"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DownloadURL"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GenerateDetailedCostReportOperationStatuses(ExtensionResource): # pylint: disable=name-too-long + """The status of the long running operation for cost detailed report. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: The properties of the usage file generated. + :vartype properties: ~azure.mgmt.costmanagement.models.DownloadURL + :ivar status: The status of the long running operation. + :vartype status: ~azure.mgmt.costmanagement.models.Status + :ivar start_time: The startTime of the operation. + :vartype start_time: str + :ivar end_time: The endTime of the operation. + :vartype end_time: str + :ivar error: The details of the error. + :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetails + """ + + properties: Optional["_models.DownloadURL"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The properties of the usage file generated.""" + status: Optional["_models.Status"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The status of the long running operation.""" + start_time: Optional[str] = rest_field(name="startTime", visibility=["read", "create", "update", "delete", "query"]) + """The startTime of the operation.""" + end_time: Optional[str] = rest_field(name="endTime", visibility=["read", "create", "update", "delete", "query"]) + """The endTime of the operation.""" + error: Optional["_models.ErrorDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The details of the error.""" + + __flattened_items = ["expiry_time", "valid_till", "download_url"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DownloadURL"] = None, + status: Optional["_models.Status"] = None, + start_time: Optional[str] = None, + end_time: Optional[str] = None, + error: Optional["_models.ErrorDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class GenerateDetailedCostReportTimePeriod(_Model): + """The start and end date for pulling data for the cost detailed report. + + :ivar start: The start date to pull data from. example format 2020-03-15. Required. + :vartype start: str + :ivar end: The end date to pull data to. example format 2020-03-15. Required. + :vartype end: str + """ + + start: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The start date to pull data from. example format 2020-03-15. Required.""" + end: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The end date to pull data to. example format 2020-03-15. Required.""" + + @overload + def __init__( + self, + *, + start: str, + end: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IncludedQuantityUtilizationSummary(BenefitUtilizationSummary, discriminator="IncludedQuantity"): + """Included Quantity utilization summary resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: Included Quantity utilization summary properties. + :vartype properties: + ~azure.mgmt.costmanagement.models.IncludedQuantityUtilizationSummaryProperties + :ivar kind: Supported values: 'SavingsPlan'. Required. Benefit is IncludedQuantity. + :vartype kind: str or ~azure.mgmt.costmanagement.models.INCLUDED_QUANTITY + """ + + properties: Optional["_models.IncludedQuantityUtilizationSummaryProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Included Quantity utilization summary properties.""" + kind: Literal[BenefitKind.INCLUDED_QUANTITY] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Supported values: 'SavingsPlan'. Required. Benefit is IncludedQuantity.""" + + __flattened_items = [ + "arm_sku_name", + "benefit_id", + "benefit_order_id", + "benefit_type", + "usage_date", + "utilization_percentage", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IncludedQuantityUtilizationSummaryProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IncludedQuantityUtilizationSummaryProperties( + BenefitUtilizationSummaryProperties +): # pylint: disable=name-too-long + """Included Quantity utilization summary properties. + + :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. + :vartype arm_sku_name: str + :ivar benefit_id: The benefit ID is the identifier of the benefit. + :vartype benefit_id: str + :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. + :vartype benefit_order_id: str + :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: + "IncludedQuantity", "Reservation", and "SavingsPlan". + :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind + :ivar usage_date: 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. + :vartype usage_date: ~datetime.datetime + :ivar utilization_percentage: This is the utilized percentage for the benefit ID. + :vartype utilization_percentage: ~decimal.Decimal + """ + + utilization_percentage: Optional[decimal.Decimal] = rest_field(name="utilizationPercentage", visibility=["read"]) + """This is the utilized percentage for the benefit ID.""" + + @overload + def __init__( + self, + *, + benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KpiProperties(_Model): + """Each KPI must contain a 'type' and 'enabled' key. + + :ivar type: KPI type (Forecast, Budget). Known values are: "Forecast" and "Budget". + :vartype type: str or ~azure.mgmt.costmanagement.models.KpiTypeType + :ivar id: ID of resource related to metric (budget). + :vartype id: str + :ivar enabled: show the KPI in the UI?. + :vartype enabled: bool + """ + + type: Optional[Union[str, "_models.KpiTypeType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """KPI type (Forecast, Budget). Known values are: \"Forecast\" and \"Budget\".""" + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """ID of resource related to metric (budget).""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """show the KPI in the UI?.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.KpiTypeType"]] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MCAPriceSheetProperties(_Model): + """The properties of the price sheet. + + :ivar billing_account_id: Unique identifier for the billing account. + :vartype billing_account_id: str + :ivar billing_account_name: Name of the billing profile that is set up to receive invoices. The + prices in the price sheet are associated with this billing profile. + :vartype billing_account_name: str + :ivar billing_profile_id: Unique identifier for the billing profile. + :vartype billing_profile_id: str + :ivar billing_profile_name: Name of the billing profile that is set up to receive invoices. The + prices in the price sheet are associated with this billing profile. + :vartype billing_profile_name: str + :ivar product_order_name: Name of the purchased product plan. Indicates if this pricing is + standard Azure Plan pricing, Dev/Test pricing etc. + + Currently unavailable for Azure 3rd party and ReservedInstance meters. + :vartype product_order_name: str + :ivar service_family: Type of Azure service. For example, Compute, Analytics, and Security. + :vartype service_family: float + :ivar product: Name of the product accruing the charges. + :vartype product: str + :ivar product_id: Unique identifier for the product whose meter is consumed. + :vartype product_id: str + :ivar sku_id: Unique identifier of the SKU. + :vartype sku_id: str + :ivar unit_of_measure: How usage is measured for the service. + :vartype unit_of_measure: str + :ivar meter_id: Unique identifier of the meter. + :vartype meter_id: str + :ivar meter_name: Name of the meter. The meter represents the deployable resource of an Azure + service. + :vartype meter_name: str + :ivar meter_type: Name of the meter type. + :vartype meter_type: str + :ivar meter_category: Name of the classification category for the meter. For example, Cloud + services, Networking, etc. + :vartype meter_category: str + :ivar meter_sub_category: Name of the meter subclassification category. + :vartype meter_sub_category: str + :ivar meter_region: Name of the Azure region where the meter for the service is available. + :vartype meter_region: str + :ivar tier_minimum_units: Defines the lower bound of the tier range for which prices are + defined. For example, if the range is 0 to 100, tierMinimumUnits would be 0. + :vartype tier_minimum_units: str + :ivar effective_start_date: Effective start date of the Price Sheet billing period. + :vartype effective_start_date: ~datetime.datetime + :ivar effective_end_date: Effective end date of the Price Sheet billing period. + :vartype effective_end_date: ~datetime.datetime + :ivar unit_price: The per-unit price at the time of billing for a given product or service, + inclusive of any negotiated discounts on top of the market price. + + For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year + commitment including discounts. + + Note: The unit price isn't the same as the effective price in usage details downloads when + services have differential prices across tiers. + + If services have multi-tiered pricing, the effective price is a blended rate across the tiers + and doesn't show a tier-specific unit price. The blended price or effective price is the net + price for the consumed quantity spanning across the multiple tiers (where each tier has a + specific unit price). + :vartype unit_price: str + :ivar base_price: The unit price at the time the customer signs on or the unit price at the + time of service meter GA launch if it is after sign-on. + + This is applicable for Enterprise Agreement users. + :vartype base_price: str + :ivar market_price: The current list price for a given product or service. This price is + without any negotiations and is based on your Microsoft Agreement type. + + For PriceType Consumption, market price is reflected as the pay-as-you-go price. + + For PriceType Savings Plan, market price reflects the Savings plan benefit on top of + pay-as-you-go price for the corresponding commitment term. + + For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year + commitment. + :vartype market_price: str + :ivar currency: Currency in which all the prices are reflected. + :vartype currency: str + :ivar billing_currency: Currency in which charges are posted. + :vartype billing_currency: str + :ivar term: Term length for Azure Savings Plan or Reservation term – one year or three years + (P1Y or P3Y). + :vartype term: str + :ivar price_type: Price type for a product. For example, an Azure resource with a pay-as-you-go + rate with priceType as Consumption. Other price types include ReservedInstance and Savings + Plan. + :vartype price_type: str + """ + + billing_account_id: Optional[str] = rest_field(name="billingAccountID", visibility=["read"]) + """Unique identifier for the billing account.""" + billing_account_name: Optional[str] = rest_field(name="billingAccountName", visibility=["read"]) + """Name of the billing profile that is set up to receive invoices. The prices in the price sheet + are associated with this billing profile.""" + billing_profile_id: Optional[str] = rest_field(name="billingProfileId", visibility=["read"]) + """Unique identifier for the billing profile.""" + billing_profile_name: Optional[str] = rest_field(name="billingProfileName", visibility=["read"]) + """Name of the billing profile that is set up to receive invoices. The prices in the price sheet + are associated with this billing profile.""" + product_order_name: Optional[str] = rest_field(name="productOrderName", visibility=["read"]) + """Name of the purchased product plan. Indicates if this pricing is standard Azure Plan pricing, + Dev/Test pricing etc. + + Currently unavailable for Azure 3rd party and ReservedInstance meters.""" + service_family: Optional[float] = rest_field(name="serviceFamily", visibility=["read"]) + """Type of Azure service. For example, Compute, Analytics, and Security.""" + product: Optional[str] = rest_field(visibility=["read"]) + """Name of the product accruing the charges.""" + product_id: Optional[str] = rest_field(name="productId", visibility=["read"]) + """Unique identifier for the product whose meter is consumed.""" + sku_id: Optional[str] = rest_field(name="skuId", visibility=["read"]) + """Unique identifier of the SKU.""" + unit_of_measure: Optional[str] = rest_field(name="unitOfMeasure", visibility=["read"]) + """How usage is measured for the service.""" + meter_id: Optional[str] = rest_field(name="meterId", visibility=["read"]) + """Unique identifier of the meter.""" + meter_name: Optional[str] = rest_field(name="meterName", visibility=["read"]) + """Name of the meter. The meter represents the deployable resource of an Azure service.""" + meter_type: Optional[str] = rest_field(name="meterType", visibility=["read"]) + """Name of the meter type.""" + meter_category: Optional[str] = rest_field(name="meterCategory", visibility=["read"]) + """Name of the classification category for the meter. For example, Cloud services, Networking, + etc.""" + meter_sub_category: Optional[str] = rest_field(name="meterSubCategory", visibility=["read"]) + """Name of the meter subclassification category.""" + meter_region: Optional[str] = rest_field(name="meterRegion", visibility=["read"]) + """Name of the Azure region where the meter for the service is available.""" + tier_minimum_units: Optional[str] = rest_field(name="tierMinimumUnits", visibility=["read"]) + """Defines the lower bound of the tier range for which prices are defined. For example, if the + range is 0 to 100, tierMinimumUnits would be 0.""" + effective_start_date: Optional[datetime.datetime] = rest_field( + name="effectiveStartDate", visibility=["read"], format="rfc3339" + ) + """Effective start date of the Price Sheet billing period.""" + effective_end_date: Optional[datetime.datetime] = rest_field( + name="effectiveEndDate", visibility=["read"], format="rfc3339" + ) + """Effective end date of the Price Sheet billing period.""" + unit_price: Optional[str] = rest_field(name="unitPrice", visibility=["read"]) + """The per-unit price at the time of billing for a given product or service, inclusive of any + negotiated discounts on top of the market price. + + For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year + commitment including discounts. + + Note: The unit price isn't the same as the effective price in usage details downloads when + services have differential prices across tiers. + + If services have multi-tiered pricing, the effective price is a blended rate across the tiers + and doesn't show a tier-specific unit price. The blended price or effective price is the net + price for the consumed quantity spanning across the multiple tiers (where each tier has a + specific unit price).""" + base_price: Optional[str] = rest_field(name="basePrice", visibility=["read"]) + """The unit price at the time the customer signs on or the unit price at the time of service meter + GA launch if it is after sign-on. + + This is applicable for Enterprise Agreement users.""" + market_price: Optional[str] = rest_field(name="marketPrice", visibility=["read"]) + """The current list price for a given product or service. This price is without any negotiations + and is based on your Microsoft Agreement type. + + For PriceType Consumption, market price is reflected as the pay-as-you-go price. + + For PriceType Savings Plan, market price reflects the Savings plan benefit on top of + pay-as-you-go price for the corresponding commitment term. + + For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year + commitment.""" + currency: Optional[str] = rest_field(visibility=["read"]) + """Currency in which all the prices are reflected.""" + billing_currency: Optional[str] = rest_field(name="billingCurrency", visibility=["read"]) + """Currency in which charges are posted.""" + term: Optional[str] = rest_field(visibility=["read"]) + """Term length for Azure Savings Plan or Reservation term – one year or three years (P1Y or P3Y).""" + price_type: Optional[str] = rest_field(name="priceType", visibility=["read"]) + """Price type for a product. For example, an Azure resource with a pay-as-you-go rate with + priceType as Consumption. Other price types include ReservedInstance and Savings Plan.""" + + +class Notification(_Model): + """The notification associated with a budget. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + :ivar enabled: The notification is enabled or not. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required. + :vartype enabled: bool + :ivar operator: The comparison operator. Supported for CategoryType(s): Cost, + ReservationUtilization. Supported operators for **CategoryType: Cost** + + * GreaterThan + * GreaterThanOrEqualTo + + Supported operators for **CategoryType: ReservationUtilization** + + * LessThan. Required. Known values are: "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", + and "LessThan". + :vartype operator: str or ~azure.mgmt.costmanagement.models.BudgetNotificationOperatorType + :ivar threshold: Threshold value associated with a notification. It is always percent with a + maximum of 2 decimal places. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + **CategoryType: Cost** - Must be between 0 and 1000. Notification is sent when the cost + exceeded the threshold. + + **CategoryType: ReservationUtilization** - Must be between 0 and 100. Notification is sent when + a reservation has a utilization percentage below the threshold. Required. + :vartype threshold: float + :ivar frequency: Frequency of a notification. Represents how long the notification will be + silent after triggering an alert for a threshold breach. If not specified, the frequency will + be set by default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when + timeGrain: Last30Days). + + Supported for CategoryType(s): ReservationUtilization. Known values are: "Daily", "Weekly", and + "Monthly". + :vartype frequency: str or ~azure.mgmt.costmanagement.models.Frequency + :ivar contact_emails: Email addresses to send the notification to when the threshold is + breached. Must have at least one contact email or contact group specified at the Subscription + or Resource Group scopes. All other scopes must have at least one contact email specified. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required. + :vartype contact_emails: list[str] + :ivar contact_roles: Subscription or Resource Group scopes only. Contact roles to send the + notification to when the threshold is breached. + + Supported for CategoryType(s): Cost. + :vartype contact_roles: list[str] + :ivar contact_groups: Subscription or Resource Group scopes only. Action groups to send the + notification to when the threshold is exceeded. Must be provided as a fully qualified Azure + resource id. + + Supported for CategoryType(s): Cost. + :vartype contact_groups: list[str] + :ivar threshold_type: The type of threshold. + + Supported for CategoryType(s): Cost. Known values are: "Actual" and "Forecasted". + :vartype threshold_type: str or ~azure.mgmt.costmanagement.models.ThresholdType + :ivar locale: Language in which the recipient will receive the notification, + + Supported for CategoryType(s): Cost, ReservationUtilization. Known values are: "en-us", + "ja-jp", "zh-cn", "de-de", "es-es", "fr-fr", "it-it", "ko-kr", "pt-br", "ru-ru", "zh-tw", + "cs-cz", "pl-pl", "tr-tr", "da-dk", "en-gb", "hu-hu", "nb-no", "nl-nl", "pt-pt", and "sv-se". + :vartype locale: str or ~azure.mgmt.costmanagement.models.CultureCode + """ + + enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The notification is enabled or not. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required.""" + operator: Union[str, "_models.BudgetNotificationOperatorType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The comparison operator. Supported for CategoryType(s): Cost, ReservationUtilization. Supported + operators for **CategoryType: Cost** + + * GreaterThan + * GreaterThanOrEqualTo + + Supported operators for **CategoryType: ReservationUtilization** + + * LessThan. Required. Known values are: \"EqualTo\", \"GreaterThan\", + \"GreaterThanOrEqualTo\", and \"LessThan\".""" + threshold: float = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Threshold value associated with a notification. It is always percent with a maximum of 2 + decimal places. + + Supported for CategoryType(s): Cost, ReservationUtilization. + + **CategoryType: Cost** - Must be between 0 and 1000. Notification is sent when the cost + exceeded the threshold. + + **CategoryType: ReservationUtilization** - Must be between 0 and 100. Notification is sent when + a reservation has a utilization percentage below the threshold. Required.""" + frequency: Optional[Union[str, "_models.Frequency"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Frequency of a notification. Represents how long the notification will be silent after + triggering an alert for a threshold breach. If not specified, the frequency will be set by + default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when timeGrain: + Last30Days). + + Supported for CategoryType(s): ReservationUtilization. Known values are: \"Daily\", \"Weekly\", + and \"Monthly\".""" + contact_emails: list[str] = rest_field( + name="contactEmails", visibility=["read", "create", "update", "delete", "query"] + ) + """Email addresses to send the notification to when the threshold is breached. Must have at least + one contact email or contact group specified at the Subscription or Resource Group scopes. All + other scopes must have at least one contact email specified. + + Supported for CategoryType(s): Cost, ReservationUtilization. Required.""" + contact_roles: Optional[list[str]] = rest_field( + name="contactRoles", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription or Resource Group scopes only. Contact roles to send the notification to when the + threshold is breached. + + Supported for CategoryType(s): Cost.""" + contact_groups: Optional[list[str]] = rest_field( + name="contactGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription or Resource Group scopes only. Action groups to send the notification to when the + threshold is exceeded. Must be provided as a fully qualified Azure resource id. + + Supported for CategoryType(s): Cost.""" + threshold_type: Optional[Union[str, "_models.ThresholdType"]] = rest_field( + name="thresholdType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of threshold. + + Supported for CategoryType(s): Cost. Known values are: \"Actual\" and \"Forecasted\".""" + locale: Optional[Union[str, "_models.CultureCode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Language in which the recipient will receive the notification, + + Supported for CategoryType(s): Cost, ReservationUtilization. Known values are: \"en-us\", + \"ja-jp\", \"zh-cn\", \"de-de\", \"es-es\", \"fr-fr\", \"it-it\", \"ko-kr\", \"pt-br\", + \"ru-ru\", \"zh-tw\", \"cs-cz\", \"pl-pl\", \"tr-tr\", \"da-dk\", \"en-gb\", \"hu-hu\", + \"nb-no\", \"nl-nl\", \"pt-pt\", and \"sv-se\".""" + + @overload + def __init__( + self, + *, + enabled: bool, + operator: Union[str, "_models.BudgetNotificationOperatorType"], + threshold: float, + contact_emails: list[str], + frequency: Optional[Union[str, "_models.Frequency"]] = None, + contact_roles: Optional[list[str]] = None, + contact_groups: Optional[list[str]] = None, + threshold_type: Optional[Union[str, "_models.ThresholdType"]] = None, + locale: Optional[Union[str, "_models.CultureCode"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NotificationProperties(_Model): + """The properties of the scheduled action notification. + + :ivar to: Array of email addresses. Required. + :vartype to: list[str] + :ivar language: Locale of the email. + :vartype language: str + :ivar message: Optional message to be added in the email. Length is limited to 250 characters. + :vartype message: str + :ivar regional_format: Regional format used for formatting date/time and currency values in the + email. + :vartype regional_format: str + :ivar subject: Subject of the email. Length is limited to 70 characters. Required. + :vartype subject: str + """ + + to: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Array of email addresses. Required.""" + language: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Locale of the email.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Optional message to be added in the email. Length is limited to 250 characters.""" + regional_format: Optional[str] = rest_field( + name="regionalFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """Regional format used for formatting date/time and currency values in the email.""" + subject: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Subject of the email. Length is limited to 70 characters. Required.""" + + @overload + def __init__( + self, + *, + to: list[str], + subject: str, + language: Optional[str] = None, + message: Optional[str] = None, + regional_format: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationDisplay(_Model): + """Localized display information for an operation. + + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read"]) + """The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring + Insights\" or \"Microsoft Compute\".""" + resource: Optional[str] = rest_field(visibility=["read"]) + """The localized friendly name of the resource type related to this operation. E.g. \"Virtual + Machines\" or \"Job Schedule Collections\".""" + operation: Optional[str] = rest_field(visibility=["read"]) + """The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create + or Update Virtual Machine\", \"Restart Virtual Machine\".""" + description: Optional[str] = rest_field(visibility=["read"]) + """The short, localized friendly description of the operation; suitable for tool tips and detailed + views.""" + + +class OperationStatus(_Model): + """The status of the long running operation. + + :ivar status: The status of the long running operation. Known values are: "Running", + "Completed", and "Failed". + :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType + :ivar properties: The properties of the resource generated. + :vartype properties: ~azure.mgmt.costmanagement.models.ReportURL + """ + + status: Optional[Union[str, "_models.OperationStatusType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the long running operation. Known values are: \"Running\", \"Completed\", and + \"Failed\".""" + properties: Optional["_models.ReportURL"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The properties of the resource generated.""" + + __flattened_items = ["report_url", "valid_until"] + + @overload + def __init__( + self, + *, + status: Optional[Union[str, "_models.OperationStatusType"]] = None, + properties: Optional["_models.ReportURL"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PivotProperties(_Model): + """Each pivot must contain a 'type' and 'name'. + + :ivar type: Data type to show in view. Known values are: "Dimension" and "TagKey". + :vartype type: str or ~azure.mgmt.costmanagement.models.PivotTypeType + :ivar name: Data field to show in view. + :vartype name: str + """ + + type: Optional[Union[str, "_models.PivotTypeType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Data type to show in view. Known values are: \"Dimension\" and \"TagKey\".""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Data field to show in view.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.PivotTypeType"]] = None, + name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PricesheetDownloadProperties(_Model): + """The URL to download the generated report. + + :ivar expiry_time: The time at which report URL becomes invalid/expires in UTC e.g. + 2020-12-08T05:55:59.4394737Z. + :vartype expiry_time: ~datetime.datetime + :ivar download_url: The URL to download the generated report. + :vartype download_url: str + :ivar download_file_properties: The properties in downloaded file. + :vartype download_file_properties: ~azure.mgmt.costmanagement.models.MCAPriceSheetProperties + """ + + expiry_time: Optional[datetime.datetime] = rest_field(name="expiryTime", visibility=["read"], format="rfc3339") + """The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.""" + download_url: Optional[str] = rest_field( + name="downloadUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """The URL to download the generated report.""" + download_file_properties: Optional["_models.MCAPriceSheetProperties"] = rest_field( + name="downloadFileProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """The properties in downloaded file.""" + + @overload + def __init__( + self, + *, + download_url: Optional[str] = None, + download_file_properties: Optional["_models.MCAPriceSheetProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryAggregation(_Model): + """The aggregation expression to be used in the query. + + :ivar name: The name of the column to aggregate. Required. + :vartype name: str + :ivar function: The name of the aggregation function to use. Required. "Sum" + :vartype function: str or ~azure.mgmt.costmanagement.models.FunctionType + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to aggregate. Required.""" + function: Union[str, "_models.FunctionType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the aggregation function to use. Required. \"Sum\"""" + + @overload + def __init__( + self, + *, + name: str, + function: Union[str, "_models.FunctionType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryColumn(_Model): + """QueryColumn properties. + + :ivar name: The name of column. + :vartype name: str + :ivar type: The type of column. + :vartype type: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of column.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of column.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryComparisonExpression(_Model): + """The comparison expression to be used in the query. + + :ivar name: The name of the column to use in comparison. Required. + :vartype name: str + :ivar operator: The operator to use for comparison. Required. "In" + :vartype operator: str or ~azure.mgmt.costmanagement.models.QueryOperatorType + :ivar values_property: Array of values to use for comparison. Required. + :vartype values_property: list[str] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to use in comparison. Required.""" + operator: Union[str, "_models.QueryOperatorType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operator to use for comparison. Required. \"In\"""" + values_property: list[str] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Array of values to use for comparison. Required.""" + + @overload + def __init__( + self, + *, + name: str, + operator: Union[str, "_models.QueryOperatorType"], + values_property: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryDataset(_Model): + """The definition of data present in the query. + + :ivar granularity: The granularity of rows in the query. Known values are: "Daily" and + "Monthly". + :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType + :ivar configuration: Has configuration information for the data in the export. The + configuration will be ignored if aggregation and grouping are provided. + :vartype configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :ivar aggregation: 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. + :vartype aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] + :ivar grouping: Array of group by expression to use in the query. Query can have up to 2 group + by clauses. + :vartype grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] + :ivar filter: The filter expression to use in the query. Please reference our Query API REST + documentation for how to properly format the filter. + :vartype filter: ~azure.mgmt.costmanagement.models.QueryFilter + """ + + granularity: Optional[Union[str, "_models.GranularityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The granularity of rows in the query. Known values are: \"Daily\" and \"Monthly\".""" + configuration: Optional["_models.QueryDatasetConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has configuration information for the data in the export. The configuration will be ignored if + aggregation and grouping are provided.""" + aggregation: Optional[dict[str, "_models.QueryAggregation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[list["_models.QueryGrouping"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Array of group by expression to use in the query. Query can have up to 2 group by clauses.""" + filter: Optional["_models.QueryFilter"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The filter expression to use in the query. Please reference our Query API REST documentation + for how to properly format the filter.""" + + @overload + def __init__( + self, + *, + 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, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryDatasetConfiguration(_Model): + """The configuration of dataset in the query. + + :ivar columns: 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. + :vartype columns: list[str] + """ + + columns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + @overload + def __init__( + self, + *, + columns: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryDefinition(_Model): + """The definition of a query. + + :ivar type: The type of the query. Required. Known values are: "Usage", "ActualCost", + "AmortizedCost", "FocusCost", "PriceSheet", "ReservationTransactions", + "ReservationRecommendations", and "ReservationDetails". + :vartype type: str or ~azure.mgmt.costmanagement.models.ExportType + :ivar timeframe: 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", "Custom", and "TheCurrentMonth". + :vartype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :ivar time_period: Has time period for pulling data for the query. + :vartype time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :ivar dataset: Has definition for data in this query. Required. + :vartype dataset: ~azure.mgmt.costmanagement.models.QueryDataset + """ + + type: Union[str, "_models.ExportType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of the query. Required. Known values are: \"Usage\", \"ActualCost\", + \"AmortizedCost\", \"FocusCost\", \"PriceSheet\", \"ReservationTransactions\", + \"ReservationRecommendations\", and \"ReservationDetails\".""" + timeframe: Union[str, "_models.TimeframeType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """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\", \"Custom\", and \"TheCurrentMonth\".""" + time_period: Optional["_models.QueryTimePeriod"] = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """Has time period for pulling data for the query.""" + dataset: "_models.QueryDataset" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Has definition for data in this query. Required.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ExportType"], + timeframe: Union[str, "_models.TimeframeType"], + dataset: "_models.QueryDataset", + time_period: Optional["_models.QueryTimePeriod"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryFilter(_Model): + """The filter expression to be used in the export. + + :ivar and_property: The logical "AND" expression. Must have at least 2 items. + :vartype and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :ivar or_property: The logical "OR" expression. Must have at least 2 items. + :vartype or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :ivar dimensions: Has comparison expression for a dimension. + :vartype dimensions: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + :ivar tags: Has comparison expression for a tag. + :vartype tags: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + """ + + and_property: Optional[list["_models.QueryFilter"]] = rest_field( + name="and", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical \"AND\" expression. Must have at least 2 items.""" + or_property: Optional[list["_models.QueryFilter"]] = rest_field( + name="or", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical \"OR\" expression. Must have at least 2 items.""" + dimensions: Optional["_models.QueryComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a dimension.""" + tags: Optional["_models.QueryComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a tag.""" + + @overload + def __init__( + self, + *, + and_property: Optional[list["_models.QueryFilter"]] = None, + or_property: Optional[list["_models.QueryFilter"]] = None, + dimensions: Optional["_models.QueryComparisonExpression"] = None, + tags: Optional["_models.QueryComparisonExpression"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryGrouping(_Model): + """The group by expression to be used in the query. + + :ivar type: Has type of the column to group. Required. Known values are: "TagKey" and + "Dimension". + :vartype type: str or ~azure.mgmt.costmanagement.models.QueryColumnType + :ivar name: The name of the column to group. Required. + :vartype name: str + """ + + type: Union[str, "_models.QueryColumnType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Has type of the column to group. Required. Known values are: \"TagKey\" and \"Dimension\".""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to group. Required.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.QueryColumnType"], + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryProperties(_Model): + """Query properties. + + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + :ivar columns: Array of columns. + :vartype columns: list[~azure.mgmt.costmanagement.models.QueryColumn] + :ivar rows: Array of rows. + :vartype rows: list[list[any]] + """ + + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """The link (url) to the next page of results.""" + columns: Optional[list["_models.QueryColumn"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Array of columns.""" + rows: Optional[list[list[Any]]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Array of rows.""" + + @overload + def __init__( + self, + *, + next_link: Optional[str] = None, + columns: Optional[list["_models.QueryColumn"]] = None, + rows: Optional[list[list[Any]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryResult(CostManagementResource): + """Result of query. It contains all columns listed under groupings and aggregation. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Location of the resource. + :vartype location: str + :ivar sku: SKU of the resource. + :vartype sku: str + :ivar e_tag: ETag of the resource. + :vartype e_tag: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Query properties. + :vartype properties: ~azure.mgmt.costmanagement.models.QueryProperties + """ + + properties: Optional["_models.QueryProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Query properties.""" + + __flattened_items = ["next_link", "columns", "rows"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.QueryProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class QueryTimePeriod(_Model): + """The start and end date for pulling data for the query. + + :ivar from_property: The start date to pull data from. Required. + :vartype from_property: ~datetime.datetime + :ivar to: The end date to pull data to. Required. + :vartype to: ~datetime.datetime + """ + + from_property: datetime.datetime = rest_field( + name="from", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date to pull data from. Required.""" + to: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """The end date to pull data to. Required.""" + + @overload + def __init__( + self, + *, + from_property: datetime.datetime, + to: datetime.datetime, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RecommendationUsageDetails(_Model): + """On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for + computing benefit recommendations. + + :ivar usage_grain: The grain of the usage. Supported values: 'Hourly'. Known values are: + "Hourly", "Daily", and "Monthly". + :vartype usage_grain: str or ~azure.mgmt.costmanagement.models.Grain + :ivar charges: On-demand charges for each hour between firstConsumptionDate and + lastConsumptionDate that were used for computing benefit recommendations. + :vartype charges: list[~decimal.Decimal] + """ + + usage_grain: Optional[Union[str, "_models.Grain"]] = rest_field( + name="usageGrain", visibility=["read", "create", "update", "delete", "query"] + ) + """The grain of the usage. Supported values: 'Hourly'. Known values are: \"Hourly\", \"Daily\", + and \"Monthly\".""" + charges: Optional[list[decimal.Decimal]] = rest_field(visibility=["read"]) + """On-demand charges for each hour between firstConsumptionDate and lastConsumptionDate that were + used for computing benefit recommendations.""" + + @overload + def __init__( + self, + *, + usage_grain: Optional[Union[str, "_models.Grain"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigAggregation(_Model): + """The aggregation expression to be used in the report. + + :ivar name: The name of the column to aggregate. Required. + :vartype name: str + :ivar function: The name of the aggregation function to use. Required. "Sum" + :vartype function: str or ~azure.mgmt.costmanagement.models.FunctionType + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to aggregate. Required.""" + function: Union[str, "_models.FunctionType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the aggregation function to use. Required. \"Sum\"""" + + @overload + def __init__( + self, + *, + name: str, + function: Union[str, "_models.FunctionType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigComparisonExpression(_Model): + """The comparison expression to be used in the report. + + :ivar name: The name of the column to use in comparison. Required. + :vartype name: str + :ivar operator: The operator to use for comparison. Required. Known values are: "In" and + "Contains". + :vartype operator: str or ~azure.mgmt.costmanagement.models.OperatorType + :ivar values_property: Array of values to use for comparison. Required. + :vartype values_property: list[str] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to use in comparison. Required.""" + operator: Union[str, "_models.OperatorType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operator to use for comparison. Required. Known values are: \"In\" and \"Contains\".""" + values_property: list[str] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Array of values to use for comparison. Required.""" + + @overload + def __init__( + self, + *, + name: str, + operator: Union[str, "_models.OperatorType"], + values_property: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigDataset(_Model): + """The definition of data present in the report. + + :ivar granularity: The granularity of rows in the report. Known values are: "Daily" and + "Monthly". + :vartype granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType + :ivar configuration: Has configuration information for the data in the report. The + configuration will be ignored if aggregation and grouping are provided. + :vartype configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration + :ivar aggregation: 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. + :vartype aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] + :ivar grouping: Array of group by expression to use in the report. Report can have up to 2 + group by clauses. + :vartype grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] + :ivar sorting: Array of order by expression to use in the report. + :vartype sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] + :ivar filter: Has filter expression to use in the report. + :vartype filter: ~azure.mgmt.costmanagement.models.ReportConfigFilter + """ + + granularity: Optional[Union[str, "_models.ReportGranularityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The granularity of rows in the report. Known values are: \"Daily\" and \"Monthly\".""" + configuration: Optional["_models.ReportConfigDatasetConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has configuration information for the data in the report. The configuration will be ignored if + aggregation and grouping are provided.""" + aggregation: Optional[dict[str, "_models.ReportConfigAggregation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[list["_models.ReportConfigGrouping"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Array of group by expression to use in the report. Report can have up to 2 group by clauses.""" + sorting: Optional[list["_models.ReportConfigSorting"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Array of order by expression to use in the report.""" + filter: Optional["_models.ReportConfigFilter"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has filter expression to use in the report.""" + + @overload + def __init__( + self, + *, + 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, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigDatasetConfiguration(_Model): + """The configuration of dataset in the report. + + :ivar columns: 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. + :vartype columns: list[str] + """ + + columns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + @overload + def __init__( + self, + *, + columns: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigDefinition(_Model): + """The definition of a report config. + + :ivar type: 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. Required. "Usage" + :vartype type: str or ~azure.mgmt.costmanagement.models.ReportType + :ivar timeframe: The time frame for pulling data for the report. If custom, then a specific + time period must be provided. Required. Known values are: "WeekToDate", "MonthToDate", + "YearToDate", and "Custom". + :vartype timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType + :ivar time_period: Has time period for pulling data for the report. + :vartype time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod + :ivar data_set: Has definition for data in this report config. + :vartype data_set: ~azure.mgmt.costmanagement.models.ReportConfigDataset + :ivar include_monetary_commitment: If true, report includes monetary commitment. + :vartype include_monetary_commitment: bool + """ + + type: Union[str, "_models.ReportType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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. Required. \"Usage\"""" + timeframe: Union[str, "_models.ReportTimeframeType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The time frame for pulling data for the report. If custom, then a specific time period must be + provided. Required. Known values are: \"WeekToDate\", \"MonthToDate\", \"YearToDate\", and + \"Custom\".""" + time_period: Optional["_models.ReportConfigTimePeriod"] = rest_field( + name="timePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """Has time period for pulling data for the report.""" + data_set: Optional["_models.ReportConfigDataset"] = rest_field( + name="dataSet", visibility=["read", "create", "update", "delete", "query"] + ) + """Has definition for data in this report config.""" + include_monetary_commitment: Optional[bool] = rest_field( + name="includeMonetaryCommitment", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, report includes monetary commitment.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ReportType"], + timeframe: Union[str, "_models.ReportTimeframeType"], + time_period: Optional["_models.ReportConfigTimePeriod"] = None, + data_set: Optional["_models.ReportConfigDataset"] = None, + include_monetary_commitment: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigFilter(_Model): + """The filter expression to be used in the report. + + :ivar and_property: The logical "AND" expression. Must have at least 2 items. + :vartype and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] + :ivar or_property: The logical "OR" expression. Must have at least 2 items. + :vartype or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] + :ivar dimensions: Has comparison expression for a dimension. + :vartype dimensions: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression + :ivar tags: Has comparison expression for a tag. + :vartype tags: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression + """ + + and_property: Optional[list["_models.ReportConfigFilter"]] = rest_field( + name="and", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical \"AND\" expression. Must have at least 2 items.""" + or_property: Optional[list["_models.ReportConfigFilter"]] = rest_field( + name="or", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical \"OR\" expression. Must have at least 2 items.""" + dimensions: Optional["_models.ReportConfigComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a dimension.""" + tags: Optional["_models.ReportConfigComparisonExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Has comparison expression for a tag.""" + + @overload + def __init__( + self, + *, + and_property: Optional[list["_models.ReportConfigFilter"]] = None, + or_property: Optional[list["_models.ReportConfigFilter"]] = None, + dimensions: Optional["_models.ReportConfigComparisonExpression"] = None, + tags: Optional["_models.ReportConfigComparisonExpression"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigGrouping(_Model): + """The group by expression to be used in the report. + + :ivar type: Has type of the column to group. Required. Known values are: "TagKey" and + "Dimension". + :vartype type: str or ~azure.mgmt.costmanagement.models.QueryColumnType + :ivar name: The name of the column to group. This version supports subscription lowest possible + grain. Required. + :vartype name: str + """ + + type: Union[str, "_models.QueryColumnType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Has type of the column to group. Required. Known values are: \"TagKey\" and \"Dimension\".""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to group. This version supports subscription lowest possible grain. + Required.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.QueryColumnType"], + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigSorting(_Model): + """The order by expression to be used in the report. + + :ivar direction: Direction of sort. Known values are: "Ascending" and "Descending". + :vartype direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingType + :ivar name: The name of the column to sort. Required. + :vartype name: str + """ + + direction: Optional[Union[str, "_models.ReportConfigSortingType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Direction of sort. Known values are: \"Ascending\" and \"Descending\".""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the column to sort. Required.""" + + @overload + def __init__( + self, + *, + name: str, + direction: Optional[Union[str, "_models.ReportConfigSortingType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportConfigTimePeriod(_Model): + """The start and end date for pulling data for the report. + + :ivar from_property: The start date to pull data from. Required. + :vartype from_property: ~datetime.datetime + :ivar to: The end date to pull data to. Required. + :vartype to: ~datetime.datetime + """ + + from_property: datetime.datetime = rest_field( + name="from", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date to pull data from. Required.""" + to: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """The end date to pull data to. Required.""" + + @overload + def __init__( + self, + *, + from_property: datetime.datetime, + to: datetime.datetime, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReportManifest(_Model): + """The manifest of the report generated by the operation. + + :ivar manifest_version: The Manifest version. + :vartype manifest_version: str + :ivar data_format: The data format of the report. "Csv" + :vartype data_format: str or ~azure.mgmt.costmanagement.models.CostDetailsDataFormat + :ivar byte_count: The total number of bytes in all blobs. + :vartype byte_count: int + :ivar blob_count: The total number of blobs. + :vartype blob_count: int + :ivar compress_data: Is the data in compressed format. + :vartype compress_data: bool + :ivar request_context: The context of the Cost Details request. + :vartype request_context: ~azure.mgmt.costmanagement.models.RequestContext + :ivar blobs: List of blob information generated by this operation. + :vartype blobs: list[~azure.mgmt.costmanagement.models.BlobInfo] + """ + + manifest_version: Optional[str] = rest_field( + name="manifestVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The Manifest version.""" + data_format: Optional[Union[str, "_models.CostDetailsDataFormat"]] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The data format of the report. \"Csv\"""" + byte_count: Optional[int] = rest_field(name="byteCount", visibility=["read", "create", "update", "delete", "query"]) + """The total number of bytes in all blobs.""" + blob_count: Optional[int] = rest_field(name="blobCount", visibility=["read", "create", "update", "delete", "query"]) + """The total number of blobs.""" + compress_data: Optional[bool] = rest_field( + name="compressData", visibility=["read", "create", "update", "delete", "query"] + ) + """Is the data in compressed format.""" + request_context: Optional["_models.RequestContext"] = rest_field( + name="requestContext", visibility=["read", "create", "update", "delete", "query"] + ) + """The context of the Cost Details request.""" + blobs: Optional[list["_models.BlobInfo"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of blob information generated by this operation.""" + + __flattened_items = ["request_scope", "request_body"] + + @overload + def __init__( + self, + *, + 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, + request_context: Optional["_models.RequestContext"] = None, + blobs: Optional[list["_models.BlobInfo"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.request_context is None: + return None + return getattr(self.request_context, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.request_context is None: + self.request_context = self._attr_to_rest_field["request_context"]._class_type() + setattr(self.request_context, key, value) + else: + super().__setattr__(key, value) + + +class ReportURL(_Model): + """The URL to download the generated report. + + :ivar report_url: 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". + :vartype report_url: str or ~azure.mgmt.costmanagement.models.ReservationReportSchema + :ivar valid_until: The time at which report URL becomes invalid. + :vartype valid_until: ~datetime.datetime + """ + + report_url: Optional[Union[str, "_models.ReservationReportSchema"]] = rest_field( + name="reportUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[datetime.datetime] = rest_field( + name="validUntil", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time at which report URL becomes invalid.""" + + @overload + def __init__( + self, + *, + report_url: Optional[Union[str, "_models.ReservationReportSchema"]] = None, + valid_until: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RequestContext(_Model): + """The context of the Cost Details request. + + :ivar request_scope: The request scope of the request. + :vartype request_scope: str + :ivar request_body: The request payload body provided in Cost Details call. + :vartype request_body: + ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition + """ + + request_scope: Optional[str] = rest_field( + name="requestScope", visibility=["read", "create", "update", "delete", "query"] + ) + """The request scope of the request.""" + request_body: Optional["_models.GenerateCostDetailsReportRequestDefinition"] = rest_field( + name="requestBody", visibility=["read", "create", "update", "delete", "query"] + ) + """The request payload body provided in Cost Details call.""" + + @overload + def __init__( + self, + *, + request_scope: Optional[str] = None, + request_body: Optional["_models.GenerateCostDetailsReportRequestDefinition"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SavingsPlanUtilizationSummary(BenefitUtilizationSummary, discriminator="SavingsPlan"): + """Savings plan utilization summary resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: Savings plan utilization summary properties. + :vartype properties: ~azure.mgmt.costmanagement.models.SavingsPlanUtilizationSummaryProperties + :ivar kind: Supported values: 'SavingsPlan'. Required. Benefit is SavingsPlan. + :vartype kind: str or ~azure.mgmt.costmanagement.models.SAVINGS_PLAN + """ + + properties: Optional["_models.SavingsPlanUtilizationSummaryProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Savings plan utilization summary properties.""" + kind: Literal[BenefitKind.SAVINGS_PLAN] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Supported values: 'SavingsPlan'. Required. Benefit is SavingsPlan.""" + + __flattened_items = [ + "arm_sku_name", + "benefit_id", + "benefit_order_id", + "benefit_type", + "usage_date", + "avg_utilization_percentage", + "min_utilization_percentage", + "max_utilization_percentage", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SavingsPlanUtilizationSummaryProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SavingsPlanUtilizationSummaryProperties(BenefitUtilizationSummaryProperties): + """Savings plan utilization summary properties. + + :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. + :vartype arm_sku_name: str + :ivar benefit_id: The benefit ID is the identifier of the benefit. + :vartype benefit_id: str + :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. + :vartype benefit_order_id: str + :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: + "IncludedQuantity", "Reservation", and "SavingsPlan". + :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind + :ivar usage_date: 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. + :vartype usage_date: ~datetime.datetime + :ivar avg_utilization_percentage: This is the average hourly utilization for each date range + that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > + 2025-03-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. + :vartype avg_utilization_percentage: ~decimal.Decimal + :ivar min_utilization_percentage: This is the minimum hourly utilization for each date range + that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > + 2025-03-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%. + :vartype min_utilization_percentage: ~decimal.Decimal + :ivar max_utilization_percentage: This is the maximum hourly utilization for each date range + that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > + 2025-03-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%. + :vartype max_utilization_percentage: ~decimal.Decimal + """ + + avg_utilization_percentage: Optional[decimal.Decimal] = rest_field( + name="avgUtilizationPercentage", visibility=["read"] + ) + """This is the average hourly utilization for each date range that corresponds to given grain + (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-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: Optional[decimal.Decimal] = rest_field( + name="minUtilizationPercentage", visibility=["read"] + ) + """This is the minimum hourly utilization for each date range that corresponds to given grain + (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-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: Optional[decimal.Decimal] = rest_field( + name="maxUtilizationPercentage", visibility=["read"] + ) + """This is the maximum hourly utilization for each date range that corresponds to given grain + (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-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%.""" + + @overload + def __init__( + self, + *, + benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledAction(ProxyResource): + """Scheduled action definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: The properties of the scheduled action. + :vartype properties: ~azure.mgmt.costmanagement.models.ScheduledActionProperties + :ivar e_tag: Resource Etag. For update calls, eTag is optional and can be specified to achieve + optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then + including the latest eTag as part of the request body or 'If-Match' header while performing the + update. For create calls, eTag is not required. + :vartype e_tag: str + :ivar kind: Kind of the scheduled action. Known values are: "Email" and "InsightAlert". + :vartype kind: str or ~azure.mgmt.costmanagement.models.ScheduledActionKind + """ + + properties: Optional["_models.ScheduledActionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the scheduled action.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read", "create", "update", "delete", "query"]) + """Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic + concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the + latest eTag as part of the request body or 'If-Match' header while performing the update. For + create calls, eTag is not required.""" + kind: Optional[Union[str, "_models.ScheduledActionKind"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Kind of the scheduled action. Known values are: \"Email\" and \"InsightAlert\".""" + + __flattened_items = [ + "display_name", + "file_destination", + "notification", + "notification_email", + "schedule", + "scope", + "status", + "view_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ScheduledActionProperties"] = None, + e_tag: Optional[str] = None, + kind: Optional[Union[str, "_models.ScheduledActionKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ScheduledActionProperties(_Model): + """The properties of the scheduled action. + + :ivar display_name: Scheduled action name. Required. + :vartype display_name: str + :ivar file_destination: Destination format of the view data. This is optional. + :vartype file_destination: ~azure.mgmt.costmanagement.models.FileDestination + :ivar notification: Notification properties based on scheduled action kind. Required. + :vartype notification: ~azure.mgmt.costmanagement.models.NotificationProperties + :ivar notification_email: Email address of the point of contact that should get the unsubscribe + requests and notification emails. + :vartype notification_email: str + :ivar schedule: Schedule of the scheduled action. Required. + :vartype schedule: ~azure.mgmt.costmanagement.models.ScheduleProperties + :ivar scope: For private scheduled action(Create or Update), scope will be empty.
For + shared scheduled action(Create or Update By Scope), Cost Management scope can be + '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. + :vartype scope: str + :ivar status: Status of the scheduled action. Required. Known values are: "Enabled", "Expired", + and "Disabled". + :vartype status: str or ~azure.mgmt.costmanagement.models.ScheduledActionStatus + :ivar view_id: Cost analysis viewId used for scheduled action. For example, + '/providers/Microsoft.CostManagement/views/swaggerExample'. Required. + :vartype view_id: str + """ + + display_name: str = rest_field(name="displayName", visibility=["read", "create", "update", "delete", "query"]) + """Scheduled action name. Required.""" + file_destination: Optional["_models.FileDestination"] = rest_field( + name="fileDestination", visibility=["read", "create", "update", "delete", "query"] + ) + """Destination format of the view data. This is optional.""" + notification: "_models.NotificationProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Notification properties based on scheduled action kind. Required.""" + notification_email: Optional[str] = rest_field( + name="notificationEmail", visibility=["read", "create", "update", "delete", "query"] + ) + """Email address of the point of contact that should get the unsubscribe requests and notification + emails.""" + schedule: "_models.ScheduleProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Schedule of the scheduled action. Required.""" + scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """For private scheduled action(Create or Update), scope will be empty.
For shared scheduled + action(Create or Update By Scope), Cost Management scope can be + '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: Union[str, "_models.ScheduledActionStatus"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Status of the scheduled action. Required. Known values are: \"Enabled\", \"Expired\", and + \"Disabled\".""" + view_id: str = rest_field(name="viewId", visibility=["read", "create", "update", "delete", "query"]) + """Cost analysis viewId used for scheduled action. For example, + '/providers/Microsoft.CostManagement/views/swaggerExample'. Required.""" + + @overload + def __init__( + self, + *, + display_name: str, + notification: "_models.NotificationProperties", + schedule: "_models.ScheduleProperties", + status: Union[str, "_models.ScheduledActionStatus"], + view_id: str, + file_destination: Optional["_models.FileDestination"] = None, + notification_email: Optional[str] = None, + scope: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduleProperties(_Model): + """The properties of the schedule. + + :ivar frequency: Frequency of the schedule. Required. Known values are: "Daily", "Weekly", and + "Monthly". + :vartype frequency: str or ~azure.mgmt.costmanagement.models.ScheduleFrequency + :ivar hour_of_day: UTC time at which cost analysis data will be emailed. + :vartype hour_of_day: int + :ivar days_of_week: Day names in english on which cost analysis data will be emailed. This + property is applicable when frequency is Weekly or Monthly. + :vartype days_of_week: list[str or ~azure.mgmt.costmanagement.models.DaysOfWeek] + :ivar weeks_of_month: Weeks in which cost analysis data will be emailed. This property is + applicable when frequency is Monthly and used in combination with daysOfWeek. + :vartype weeks_of_month: list[str or ~azure.mgmt.costmanagement.models.WeeksOfMonth] + :ivar day_of_month: 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. + :vartype day_of_month: int + :ivar start_date: The start date and time of the scheduled action (UTC). Required. + :vartype start_date: ~datetime.datetime + :ivar end_date: The end date and time of the scheduled action (UTC). Required. + :vartype end_date: ~datetime.datetime + """ + + frequency: Union[str, "_models.ScheduleFrequency"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Frequency of the schedule. Required. Known values are: \"Daily\", \"Weekly\", and \"Monthly\".""" + hour_of_day: Optional[int] = rest_field( + name="hourOfDay", visibility=["read", "create", "update", "delete", "query"] + ) + """UTC time at which cost analysis data will be emailed.""" + days_of_week: Optional[list[Union[str, "_models.DaysOfWeek"]]] = rest_field( + name="daysOfWeek", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[list[Union[str, "_models.WeeksOfMonth"]]] = rest_field( + name="weeksOfMonth", visibility=["read", "create", "update", "delete", "query"] + ) + """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: Optional[int] = rest_field( + name="dayOfMonth", visibility=["read", "create", "update", "delete", "query"] + ) + """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.datetime = rest_field( + name="startDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start date and time of the scheduled action (UTC). Required.""" + end_date: datetime.datetime = rest_field( + name="endDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end date and time of the scheduled action (UTC). Required.""" + + @overload + def __init__( + self, + *, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Setting(ProxyResource): + """Setting definition. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + TagInheritanceSetting + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. Required. "taginheritance" + :vartype kind: str or ~azure.mgmt.costmanagement.models.SettingsKind + """ + + __mapping__: dict[str, _Model] = {} + kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) + """Metadata used by portal/tooling/etc to render different UX experiences for resources of the + same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource + provider must validate and persist this value. Required. \"taginheritance\"""" + + @overload + def __init__( + self, + *, + kind: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SettingsListResult(_Model): + """Setting list result. It contains a list of settings. + + :ivar value: The list of settings. + :vartype value: list[~azure.mgmt.costmanagement.models.Setting] + """ + + value: Optional[list["_models.Setting"]] = rest_field(visibility=["read"]) + """The list of settings.""" + + +class SharedScopeBenefitRecommendationProperties( + BenefitRecommendationProperties, discriminator="Shared" +): # pylint: disable=name-too-long + """The properties of the benefit recommendation when scope is 'Shared'. + + :ivar first_consumption_date: The first usage date used for looking back for computing the + recommendations. + :vartype first_consumption_date: ~datetime.datetime + :ivar last_consumption_date: The last usage date used for looking back for computing the + recommendations. + :vartype last_consumption_date: ~datetime.datetime + :ivar look_back_period: The number of days of usage evaluated for computing the + recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". + :vartype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod + :ivar total_hours: The total hours for which the cost is covered. Its equal to number of + records in a property 'properties/usage/charges'. + :vartype total_hours: int + :ivar usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that were + used for computing benefit recommendations. + :vartype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails + :ivar arm_sku_name: ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan. + :vartype arm_sku_name: str + :ivar term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and + "P3Y". + :vartype term: str or ~azure.mgmt.costmanagement.models.Term + :ivar commitment_granularity: Grain of the proposed commitment amount. Supported values: + 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". + :vartype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain + :ivar currency_code: An ISO 4217 currency code identifier for the costs and savings amounts. + :vartype currency_code: str + :ivar cost_without_benefit: The current cost without benefit, corresponds to 'totalHours' in + the look-back period. + :vartype cost_without_benefit: ~decimal.Decimal + :ivar recommendation_details: The details of the proposed recommendation. + :vartype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails + :ivar all_recommendation_details: The list of all benefit recommendations with the + recommendation details. + :vartype all_recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsList + :ivar scope: Benefit scope. For example, Single or Shared. Required. Shared scope + recommendation. + :vartype scope: str or ~azure.mgmt.costmanagement.models.SHARED + """ + + scope: Literal[Scope.SHARED] = rest_discriminator(name="scope", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Benefit scope. For example, Single or Shared. Required. Shared scope recommendation.""" + + @overload + def __init__( + self, + *, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.scope = Scope.SHARED # type: ignore + + +class SingleScopeBenefitRecommendationProperties( + BenefitRecommendationProperties, discriminator="Single" +): # pylint: disable=name-too-long + """The properties of the benefit recommendations when scope is 'Single'. + + :ivar first_consumption_date: The first usage date used for looking back for computing the + recommendations. + :vartype first_consumption_date: ~datetime.datetime + :ivar last_consumption_date: The last usage date used for looking back for computing the + recommendations. + :vartype last_consumption_date: ~datetime.datetime + :ivar look_back_period: The number of days of usage evaluated for computing the + recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". + :vartype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod + :ivar total_hours: The total hours for which the cost is covered. Its equal to number of + records in a property 'properties/usage/charges'. + :vartype total_hours: int + :ivar usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that were + used for computing benefit recommendations. + :vartype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails + :ivar arm_sku_name: ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan. + :vartype arm_sku_name: str + :ivar term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and + "P3Y". + :vartype term: str or ~azure.mgmt.costmanagement.models.Term + :ivar commitment_granularity: Grain of the proposed commitment amount. Supported values: + 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". + :vartype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain + :ivar currency_code: An ISO 4217 currency code identifier for the costs and savings amounts. + :vartype currency_code: str + :ivar cost_without_benefit: The current cost without benefit, corresponds to 'totalHours' in + the look-back period. + :vartype cost_without_benefit: ~decimal.Decimal + :ivar recommendation_details: The details of the proposed recommendation. + :vartype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails + :ivar all_recommendation_details: The list of all benefit recommendations with the + recommendation details. + :vartype all_recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsList + :ivar subscription_id: The subscription ID that this single scope recommendation is for. + Applicable only if recommendation is for 'Single' scope. + :vartype subscription_id: str + :ivar resource_group: The resource group that this single scope recommendation is for. + Applicable only if recommendation is for 'Single' scope and 'ResourceGroup' request scope. + :vartype resource_group: str + :ivar scope: Benefit scope. For example, Single or Shared. Required. Single scope + recommendation. + :vartype scope: str or ~azure.mgmt.costmanagement.models.SINGLE + """ + + subscription_id: Optional[str] = rest_field(name="subscriptionId", visibility=["read"]) + """The subscription ID that this single scope recommendation is for. Applicable only if + recommendation is for 'Single' scope.""" + resource_group: Optional[str] = rest_field(name="resourceGroup", visibility=["read"]) + """The resource group that this single scope recommendation is for. Applicable only if + recommendation is for 'Single' scope and 'ResourceGroup' request scope.""" + scope: Literal[Scope.SINGLE] = rest_discriminator(name="scope", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Benefit scope. For example, Single or Shared. Required. Single scope recommendation.""" + + @overload + def __init__( + self, + *, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.scope = Scope.SINGLE # type: ignore + + +class SourceCostAllocationResource(CostAllocationResource): + """Source resources for cost allocation. + + :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known + values are: "Dimension" and "Tag". + :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :ivar name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :vartype name: str + :ivar values_property: Source Resources for cost allocation. This list cannot contain more than + 25 values. Required. + :vartype values_property: list[str] + """ + + values_property: list[str] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Source Resources for cost allocation. This list cannot contain more than 25 values. Required.""" + + @overload + def __init__( + self, + *, + resource_type: Union[str, "_models.CostAllocationResourceType"], + name: str, + values_property: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Status(_Model): + """The status of the long running operation. + + :ivar status: The status of the long running operation. Known values are: "InProgress", + "Completed", "Failed", "Queued", "NoDataFound", "ReadyToDownload", and "TimedOut". + :vartype status: str or ~azure.mgmt.costmanagement.models.ReportOperationStatusType + """ + + status: Optional[Union[str, "_models.ReportOperationStatusType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the long running operation. Known values are: \"InProgress\", \"Completed\", + \"Failed\", \"Queued\", \"NoDataFound\", \"ReadyToDownload\", and \"TimedOut\".""" + + @overload + def __init__( + self, + *, + status: Optional[Union[str, "_models.ReportOperationStatusType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SystemAssignedServiceIdentity(_Model): + """Managed service identity (either system assigned, or none). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None" and "SystemAssigned". + :vartype type: str or ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The service principal ID of the system assigned identity. This property will only be provided + for a system assigned identity.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """The tenant ID of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Union[str, "_models.SystemAssignedServiceIdentityType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity assigned to this resource. Required. Known values are: \"None\" + and \"SystemAssigned\".""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.SystemAssignedServiceIdentityType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.costmanagement.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.costmanagement.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagInheritanceProperties(_Model): + """The properties of the tag inheritance setting. + + :ivar prefer_container_tags: This property defines the behavior when an inherited tag being + applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to + true - when tags match, the highest scope tags will be applied. Billing profile is the highest + scope, followed by invoice sections, subscriptions and resource groups (allows overriding of + lower scope tag values). If set to false - when tags match, the lowest scope tags will be + applied. So, if a resource has the same tag as a subscription tag, the resource tag will be + applied (does not allow overriding of lower scope tag values). Required. + :vartype prefer_container_tags: bool + """ + + prefer_container_tags: bool = rest_field( + name="preferContainerTags", visibility=["read", "create", "update", "delete", "query"] + ) + """This property defines the behavior when an inherited tag being applied matches a lower scope + tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the + highest scope tags will be applied. Billing profile is the highest scope, followed by invoice + sections, subscriptions and resource groups (allows overriding of lower scope tag values). If + set to false - when tags match, the lowest scope tags will be applied. So, if a resource has + the same tag as a subscription tag, the resource tag will be applied (does not allow overriding + of lower scope tag values). Required.""" + + @overload + def __init__( + self, + *, + prefer_container_tags: bool, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagInheritanceSetting(Setting, discriminator="taginheritance"): + """Tag Inheritance Setting definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: The properties of the tag inheritance setting. + :vartype properties: ~azure.mgmt.costmanagement.models.TagInheritanceProperties + :ivar kind: Specifies the kind of settings. Required. TAGINHERITANCE. + :vartype kind: str or ~azure.mgmt.costmanagement.models.TAGINHERITANCE + """ + + properties: Optional["_models.TagInheritanceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the tag inheritance setting.""" + kind: Literal[SettingsKind.TAGINHERITANCE] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Specifies the kind of settings. Required. TAGINHERITANCE.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.TagInheritanceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.kind = SettingsKind.TAGINHERITANCE # type: ignore + + +class TargetCostAllocationResource(CostAllocationResource): + """Target resources for cost allocation. + + :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known + values are: "Dimension" and "Tag". + :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType + :ivar name: If resource type is dimension, this must be either ResourceGroupName or + SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. + :vartype name: str + :ivar values_property: Target resources for cost allocation. This list cannot contain more than + 25 values. Required. + :vartype values_property: list[~azure.mgmt.costmanagement.models.CostAllocationProportion] + :ivar policy_type: Method of cost allocation for the rule. Required. "FixedProportion" + :vartype policy_type: str or ~azure.mgmt.costmanagement.models.CostAllocationPolicyType + """ + + values_property: list["_models.CostAllocationProportion"] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Target resources for cost allocation. This list cannot contain more than 25 values. Required.""" + policy_type: Union[str, "_models.CostAllocationPolicyType"] = rest_field( + name="policyType", visibility=["read", "create", "update", "delete", "query"] + ) + """Method of cost allocation for the rule. Required. \"FixedProportion\"""" + + @overload + def __init__( + self, + *, + resource_type: Union[str, "_models.CostAllocationResourceType"], + name: str, + values_property: list["_models.CostAllocationProportion"], + policy_type: Union[str, "_models.CostAllocationPolicyType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class View(ProxyResource): + """States and configurations of Cost Analysis. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData + :ivar properties: The properties of the view. + :vartype properties: ~azure.mgmt.costmanagement.models.ViewProperties + :ivar e_tag: 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. + :vartype e_tag: str + """ + + properties: Optional["_models.ViewProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the view.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.ViewProperties"] = None, + e_tag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ViewProperties(_Model): + """The properties of the view. + + :ivar display_name: User input name of the view. Required. + :vartype display_name: str + :ivar scope: 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. + :vartype scope: str + :ivar created_on: Date the user created this view. + :vartype created_on: ~datetime.datetime + :ivar modified_on: Date when the user last modified this view. + :vartype modified_on: ~datetime.datetime + :ivar date_range: Date range of the current view. + :vartype date_range: str + :ivar currency: Currency of the current view. + :vartype currency: str + :ivar query: Query body configuration. Required. + :vartype query: ~azure.mgmt.costmanagement.models.ReportConfigDefinition + :ivar chart: Chart type of the main view in Cost Analysis. Required. Known values are: "Area", + "Line", "StackedColumn", "GroupedColumn", and "Table". + :vartype chart: str or ~azure.mgmt.costmanagement.models.ChartType + :ivar accumulated: Show costs accumulated over time. Known values are: "true" and "false". + :vartype accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType + :ivar metric: Metric to use when displaying costs. Known values are: "ActualCost", + "AmortizedCost", and "AHUB". + :vartype metric: str or ~azure.mgmt.costmanagement.models.MetricType + :ivar kpis: List of KPIs to show in Cost Analysis UI. + :vartype kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] + :ivar pivots: Configuration of 3 sub-views in the Cost Analysis UI. + :vartype pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] + """ + + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """User input name of the view. Required.""" + scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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: Optional[datetime.datetime] = rest_field(name="createdOn", visibility=["read"], format="rfc3339") + """Date the user created this view.""" + modified_on: Optional[datetime.datetime] = rest_field( + name="modifiedOn", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Date when the user last modified this view.""" + date_range: Optional[str] = rest_field(name="dateRange", visibility=["read", "create", "update", "delete", "query"]) + """Date range of the current view.""" + currency: Optional[str] = rest_field(visibility=["read"]) + """Currency of the current view.""" + query: Optional["_models.ReportConfigDefinition"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Query body configuration. Required.""" + chart: Optional[Union[str, "_models.ChartType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Chart type of the main view in Cost Analysis. Required. Known values are: \"Area\", \"Line\", + \"StackedColumn\", \"GroupedColumn\", and \"Table\".""" + accumulated: Optional[Union[str, "_models.AccumulatedType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Show costs accumulated over time. Known values are: \"true\" and \"false\".""" + metric: Optional[Union[str, "_models.MetricType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Metric to use when displaying costs. Known values are: \"ActualCost\", \"AmortizedCost\", and + \"AHUB\".""" + kpis: Optional[list["_models.KpiProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of KPIs to show in Cost Analysis UI.""" + pivots: Optional[list["_models.PivotProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration of 3 sub-views in the Cost Analysis UI.""" + + __flattened_items = ["type", "timeframe", "time_period", "data_set", "include_monetary_commitment"] + + @overload + def __init__( + self, + *, + display_name: Optional[str] = None, + scope: Optional[str] = None, + modified_on: Optional[datetime.datetime] = None, + date_range: Optional[str] = None, + query: Optional["_models.ReportConfigDefinition"] = 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.query is None: + return None + return getattr(self.query, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.query is None: + self.query = self._attr_to_rest_field["query"]._class_type() + setattr(self.query, key, value) + else: + super().__setattr__(key, value) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py deleted file mode 100644 index 5d7975e2e62b..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py +++ /dev/null @@ -1,7961 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from collections.abc import MutableMapping -import datetime -from typing import Any, Optional, TYPE_CHECKING, Union - -from .._utils import serialization as _serialization - -if TYPE_CHECKING: - from .. import models as _models -JSON = MutableMapping[str, Any] - - -class CostManagementProxyResource(_serialization.Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar e_tag: 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. - :vartype e_tag: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - } - - def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword e_tag: 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. - :paramtype e_tag: str - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.e_tag = e_tag - - -class Alert(CostManagementProxyResource): - """An individual alert. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar e_tag: 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. - :vartype e_tag: str - :ivar definition: defines the type of alert. - :vartype definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition - :ivar description: Alert description. - :vartype description: str - :ivar source: Source of alert. Known values are: "Preset" and "User". - :vartype source: str or ~azure.mgmt.costmanagement.models.AlertSource - :ivar details: Alert details. - :vartype details: ~azure.mgmt.costmanagement.models.AlertPropertiesDetails - :ivar cost_entity_id: related budget. - :vartype cost_entity_id: str - :ivar status: alert status. Known values are: "None", "Active", "Overridden", "Resolved", and - "Dismissed". - :vartype status: str or ~azure.mgmt.costmanagement.models.AlertStatus - :ivar creation_time: dateTime in which alert was created. - :vartype creation_time: str - :ivar close_time: dateTime in which alert was closed. - :vartype close_time: str - :ivar modification_time: dateTime in which alert was last modified. - :vartype modification_time: str - :ivar status_modification_user_name: User who last modified the alert. - :vartype status_modification_user_name: str - :ivar status_modification_time: dateTime in which the alert status was last modified. - :vartype status_modification_time: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "definition": {"key": "properties.definition", "type": "AlertPropertiesDefinition"}, - "description": {"key": "properties.description", "type": "str"}, - "source": {"key": "properties.source", "type": "str"}, - "details": {"key": "properties.details", "type": "AlertPropertiesDetails"}, - "cost_entity_id": {"key": "properties.costEntityId", "type": "str"}, - "status": {"key": "properties.status", "type": "str"}, - "creation_time": {"key": "properties.creationTime", "type": "str"}, - "close_time": {"key": "properties.closeTime", "type": "str"}, - "modification_time": {"key": "properties.modificationTime", "type": "str"}, - "status_modification_user_name": {"key": "properties.statusModificationUserName", "type": "str"}, - "status_modification_time": {"key": "properties.statusModificationTime", "type": "str"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword e_tag: 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. - :paramtype e_tag: str - :keyword definition: defines the type of alert. - :paramtype definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition - :keyword description: Alert description. - :paramtype description: str - :keyword source: Source of alert. Known values are: "Preset" and "User". - :paramtype source: str or ~azure.mgmt.costmanagement.models.AlertSource - :keyword details: Alert details. - :paramtype details: ~azure.mgmt.costmanagement.models.AlertPropertiesDetails - :keyword cost_entity_id: related budget. - :paramtype cost_entity_id: str - :keyword status: alert status. Known values are: "None", "Active", "Overridden", "Resolved", - and "Dismissed". - :paramtype status: str or ~azure.mgmt.costmanagement.models.AlertStatus - :keyword creation_time: dateTime in which alert was created. - :paramtype creation_time: str - :keyword close_time: dateTime in which alert was closed. - :paramtype close_time: str - :keyword modification_time: dateTime in which alert was last modified. - :paramtype modification_time: str - :keyword status_modification_user_name: User who last modified the alert. - :paramtype status_modification_user_name: str - :keyword status_modification_time: dateTime in which the alert status was last modified. - :paramtype status_modification_time: str - """ - super().__init__(e_tag=e_tag, **kwargs) - self.definition = definition - self.description = description - self.source = source - self.details = details - self.cost_entity_id = cost_entity_id - self.status = status - self.creation_time = creation_time - self.close_time = close_time - self.modification_time = modification_time - self.status_modification_user_name = status_modification_user_name - self.status_modification_time = status_modification_time - - -class AlertPropertiesDefinition(_serialization.Model): - """defines the type of alert. - - :ivar type: type of alert. Known values are: "Budget", "Invoice", "Credit", "Quota", "General", - "xCloud", and "BudgetForecast". - :vartype type: str or ~azure.mgmt.costmanagement.models.AlertType - :ivar category: Alert category. Known values are: "Cost", "Usage", "Billing", and "System". - :vartype category: str or ~azure.mgmt.costmanagement.models.AlertCategory - :ivar criteria: Criteria that triggered alert. Known values are: "CostThresholdExceeded", - "UsageThresholdExceeded", "CreditThresholdApproaching", "CreditThresholdReached", - "QuotaThresholdApproaching", "QuotaThresholdReached", "MultiCurrency", - "ForecastCostThresholdExceeded", "ForecastUsageThresholdExceeded", "InvoiceDueDateApproaching", - "InvoiceDueDateReached", "CrossCloudNewDataAvailable", "CrossCloudCollectionError", and - "GeneralThresholdError". - :vartype criteria: str or ~azure.mgmt.costmanagement.models.AlertCriteria - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "category": {"key": "category", "type": "str"}, - "criteria": {"key": "criteria", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.AlertType"]] = None, - category: Optional[Union[str, "_models.AlertCategory"]] = None, - criteria: Optional[Union[str, "_models.AlertCriteria"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: type of alert. Known values are: "Budget", "Invoice", "Credit", "Quota", - "General", "xCloud", and "BudgetForecast". - :paramtype type: str or ~azure.mgmt.costmanagement.models.AlertType - :keyword category: Alert category. Known values are: "Cost", "Usage", "Billing", and "System". - :paramtype category: str or ~azure.mgmt.costmanagement.models.AlertCategory - :keyword criteria: Criteria that triggered alert. Known values are: "CostThresholdExceeded", - "UsageThresholdExceeded", "CreditThresholdApproaching", "CreditThresholdReached", - "QuotaThresholdApproaching", "QuotaThresholdReached", "MultiCurrency", - "ForecastCostThresholdExceeded", "ForecastUsageThresholdExceeded", "InvoiceDueDateApproaching", - "InvoiceDueDateReached", "CrossCloudNewDataAvailable", "CrossCloudCollectionError", and - "GeneralThresholdError". - :paramtype criteria: str or ~azure.mgmt.costmanagement.models.AlertCriteria - """ - super().__init__(**kwargs) - self.type = type - self.category = category - self.criteria = criteria - - -class AlertPropertiesDetails(_serialization.Model): - """Alert details. - - :ivar time_grain_type: Type of timegrain cadence. Known values are: "None", "Monthly", - "Quarterly", "Annually", "BillingMonth", "BillingQuarter", and "BillingAnnual". - :vartype time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType - :ivar period_start_date: datetime of periodStartDate. - :vartype period_start_date: str - :ivar triggered_by: notificationId that triggered this alert. - :vartype triggered_by: str - :ivar resource_group_filter: array of resourceGroups to filter by. - :vartype resource_group_filter: list[any] - :ivar resource_filter: array of resources to filter by. - :vartype resource_filter: list[any] - :ivar meter_filter: array of meters to filter by. - :vartype meter_filter: list[any] - :ivar tag_filter: tags to filter by. - :vartype tag_filter: JSON - :ivar threshold: notification threshold percentage as a decimal which activated this alert. - :vartype threshold: float - :ivar operator: operator used to compare currentSpend with amount. Known values are: "None", - "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", "LessThan", and "LessThanOrEqualTo". - :vartype operator: str or ~azure.mgmt.costmanagement.models.AlertOperator - :ivar amount: budget threshold amount. - :vartype amount: float - :ivar unit: unit of currency being used. - :vartype unit: str - :ivar current_spend: current spend. - :vartype current_spend: float - :ivar contact_emails: list of emails to contact. - :vartype contact_emails: list[str] - :ivar contact_groups: list of action groups to broadcast to. - :vartype contact_groups: list[str] - :ivar contact_roles: list of contact roles. - :vartype contact_roles: list[str] - :ivar overriding_alert: overriding alert. - :vartype overriding_alert: str - :ivar department_name: department name. - :vartype department_name: str - :ivar company_name: company name. - :vartype company_name: str - :ivar enrollment_number: enrollment number. - :vartype enrollment_number: str - :ivar enrollment_start_date: datetime of enrollmentStartDate. - :vartype enrollment_start_date: str - :ivar enrollment_end_date: datetime of enrollmentEndDate. - :vartype enrollment_end_date: str - :ivar invoicing_threshold: invoicing threshold. - :vartype invoicing_threshold: float - """ - - _attribute_map = { - "time_grain_type": {"key": "timeGrainType", "type": "str"}, - "period_start_date": {"key": "periodStartDate", "type": "str"}, - "triggered_by": {"key": "triggeredBy", "type": "str"}, - "resource_group_filter": {"key": "resourceGroupFilter", "type": "[object]"}, - "resource_filter": {"key": "resourceFilter", "type": "[object]"}, - "meter_filter": {"key": "meterFilter", "type": "[object]"}, - "tag_filter": {"key": "tagFilter", "type": "object"}, - "threshold": {"key": "threshold", "type": "float"}, - "operator": {"key": "operator", "type": "str"}, - "amount": {"key": "amount", "type": "float"}, - "unit": {"key": "unit", "type": "str"}, - "current_spend": {"key": "currentSpend", "type": "float"}, - "contact_emails": {"key": "contactEmails", "type": "[str]"}, - "contact_groups": {"key": "contactGroups", "type": "[str]"}, - "contact_roles": {"key": "contactRoles", "type": "[str]"}, - "overriding_alert": {"key": "overridingAlert", "type": "str"}, - "department_name": {"key": "departmentName", "type": "str"}, - "company_name": {"key": "companyName", "type": "str"}, - "enrollment_number": {"key": "enrollmentNumber", "type": "str"}, - "enrollment_start_date": {"key": "enrollmentStartDate", "type": "str"}, - "enrollment_end_date": {"key": "enrollmentEndDate", "type": "str"}, - "invoicing_threshold": {"key": "invoicingThreshold", "type": "float"}, - } - - def __init__( - self, - *, - 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[JSON] = 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: Any - ) -> None: - """ - :keyword time_grain_type: Type of timegrain cadence. Known values are: "None", "Monthly", - "Quarterly", "Annually", "BillingMonth", "BillingQuarter", and "BillingAnnual". - :paramtype time_grain_type: str or ~azure.mgmt.costmanagement.models.AlertTimeGrainType - :keyword period_start_date: datetime of periodStartDate. - :paramtype period_start_date: str - :keyword triggered_by: notificationId that triggered this alert. - :paramtype triggered_by: str - :keyword resource_group_filter: array of resourceGroups to filter by. - :paramtype resource_group_filter: list[any] - :keyword resource_filter: array of resources to filter by. - :paramtype resource_filter: list[any] - :keyword meter_filter: array of meters to filter by. - :paramtype meter_filter: list[any] - :keyword tag_filter: tags to filter by. - :paramtype tag_filter: JSON - :keyword threshold: notification threshold percentage as a decimal which activated this alert. - :paramtype threshold: float - :keyword operator: operator used to compare currentSpend with amount. Known values are: "None", - "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", "LessThan", and "LessThanOrEqualTo". - :paramtype operator: str or ~azure.mgmt.costmanagement.models.AlertOperator - :keyword amount: budget threshold amount. - :paramtype amount: float - :keyword unit: unit of currency being used. - :paramtype unit: str - :keyword current_spend: current spend. - :paramtype current_spend: float - :keyword contact_emails: list of emails to contact. - :paramtype contact_emails: list[str] - :keyword contact_groups: list of action groups to broadcast to. - :paramtype contact_groups: list[str] - :keyword contact_roles: list of contact roles. - :paramtype contact_roles: list[str] - :keyword overriding_alert: overriding alert. - :paramtype overriding_alert: str - :keyword department_name: department name. - :paramtype department_name: str - :keyword company_name: company name. - :paramtype company_name: str - :keyword enrollment_number: enrollment number. - :paramtype enrollment_number: str - :keyword enrollment_start_date: datetime of enrollmentStartDate. - :paramtype enrollment_start_date: str - :keyword enrollment_end_date: datetime of enrollmentEndDate. - :paramtype enrollment_end_date: str - :keyword invoicing_threshold: invoicing threshold. - :paramtype invoicing_threshold: float - """ - super().__init__(**kwargs) - self.time_grain_type = time_grain_type - self.period_start_date = period_start_date - self.triggered_by = triggered_by - self.resource_group_filter = resource_group_filter - self.resource_filter = resource_filter - self.meter_filter = meter_filter - self.tag_filter = tag_filter - self.threshold = threshold - self.operator = operator - self.amount = amount - self.unit = unit - self.current_spend = current_spend - self.contact_emails = contact_emails - self.contact_groups = contact_groups - self.contact_roles = contact_roles - self.overriding_alert = overriding_alert - self.department_name = department_name - self.company_name = company_name - self.enrollment_number = enrollment_number - self.enrollment_start_date = enrollment_start_date - self.enrollment_end_date = enrollment_end_date - self.invoicing_threshold = invoicing_threshold - - -class AlertsResult(_serialization.Model): - """Result of alerts. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of alerts. - :vartype value: list[~azure.mgmt.costmanagement.models.Alert] - :ivar next_link: URL to get the next set of alerts results if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Alert]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Alert"]] = None - self.next_link: Optional[str] = None - - -class AllSavingsBenefitDetails(_serialization.Model): - """Benefit recommendation details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar overage_cost: The difference between total cost and benefit cost for the 'totalHours' in - the look-back period. - :vartype overage_cost: float - :ivar benefit_cost: The estimated cost with benefit for the 'totalHours' in the look-back - period. It's equal to (commitmentAmount * totalHours). - :vartype benefit_cost: float - :ivar total_cost: Total cost, which is sum of benefit cost and overage cost. - :vartype total_cost: float - :ivar savings_amount: The amount saved for the 'totalHours' in the look-back period, by - purchasing the recommended quantity of the benefit. - :vartype savings_amount: float - :ivar savings_percentage: The savings in percentage for the 'totalHours' in the look-back - period, by purchasing the recommended quantity of benefit. - :vartype savings_percentage: float - :ivar coverage_percentage: Estimated benefit coverage percentage for the 'totalHours' in the - look-back period, with this commitment. - :vartype coverage_percentage: float - :ivar commitment_amount: The commitment amount at the commitmentGranularity. - :vartype commitment_amount: float - :ivar average_utilization_percentage: Estimated average utilization percentage for the - 'totalHours' in the look-back period, with this commitment. - :vartype average_utilization_percentage: float - :ivar wastage_cost: Estimated unused portion of the 'benefitCost'. - :vartype wastage_cost: float - """ - - _validation = { - "overage_cost": {"readonly": True}, - "benefit_cost": {"readonly": True}, - "total_cost": {"readonly": True}, - "savings_amount": {"readonly": True}, - "savings_percentage": {"readonly": True}, - "coverage_percentage": {"readonly": True}, - "commitment_amount": {"readonly": True}, - "average_utilization_percentage": {"readonly": True}, - "wastage_cost": {"readonly": True}, - } - - _attribute_map = { - "overage_cost": {"key": "overageCost", "type": "float"}, - "benefit_cost": {"key": "benefitCost", "type": "float"}, - "total_cost": {"key": "totalCost", "type": "float"}, - "savings_amount": {"key": "savingsAmount", "type": "float"}, - "savings_percentage": {"key": "savingsPercentage", "type": "float"}, - "coverage_percentage": {"key": "coveragePercentage", "type": "float"}, - "commitment_amount": {"key": "commitmentAmount", "type": "float"}, - "average_utilization_percentage": {"key": "averageUtilizationPercentage", "type": "float"}, - "wastage_cost": {"key": "wastageCost", "type": "float"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.overage_cost: Optional[float] = None - self.benefit_cost: Optional[float] = None - self.total_cost: Optional[float] = None - self.savings_amount: Optional[float] = None - self.savings_percentage: Optional[float] = None - self.coverage_percentage: Optional[float] = None - self.commitment_amount: Optional[float] = None - self.average_utilization_percentage: Optional[float] = None - self.wastage_cost: Optional[float] = None - - -class AllSavingsList(_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. - - :ivar value: The list of benefit recommendations with the recommendation details.. - :vartype value: list[~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails] - :ivar next_link: The link (URL) to the next page of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[AllSavingsBenefitDetails]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.AllSavingsBenefitDetails"]] = None - self.next_link: Optional[str] = None - - -class AsyncOperationStatusProperties(_serialization.Model): - """Object representing the report url and valid until date of the async report generated. - - :ivar report_url: Sas url to the async benefit utilization summaries report. Will be empty if - the report is in Running or Failed state. Known values are: "Kind", "AvgUtilizationPercentage", - "BenefitOrderId", "BenefitId", "BenefitType", "MaxUtilizationPercentage", - "MinUtilizationPercentage", "UsageDate", and "UtilizedPercentage". - :vartype report_url: str or - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema - :ivar secondary_report_url: Sas url to async benefit utilization summaries report in secondary - storage in case of primary outage. Will be empty if the report is in Running or Failed state. - Known values are: "Kind", "AvgUtilizationPercentage", "BenefitOrderId", "BenefitId", - "BenefitType", "MaxUtilizationPercentage", "MinUtilizationPercentage", "UsageDate", and - "UtilizedPercentage". - :vartype secondary_report_url: str or - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema - :ivar valid_until: The date that the sas url provided in reportUrl expires. - :vartype valid_until: ~datetime.datetime - """ - - _attribute_map = { - "report_url": {"key": "reportUrl", "type": "str"}, - "secondary_report_url": {"key": "secondaryReportUrl", "type": "str"}, - "valid_until": {"key": "validUntil", "type": "iso-8601"}, - } - - def __init__( - self, - *, - report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = None, - secondary_report_url: Optional[Union[str, "_models.BenefitUtilizationSummaryReportSchema"]] = None, - valid_until: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword report_url: Sas url to the async benefit utilization summaries report. Will be empty - if the report is in Running or Failed state. Known values are: "Kind", - "AvgUtilizationPercentage", "BenefitOrderId", "BenefitId", "BenefitType", - "MaxUtilizationPercentage", "MinUtilizationPercentage", "UsageDate", and "UtilizedPercentage". - :paramtype report_url: str or - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema - :keyword secondary_report_url: Sas url to async benefit utilization summaries report in - secondary storage in case of primary outage. Will be empty if the report is in Running or - Failed state. Known values are: "Kind", "AvgUtilizationPercentage", "BenefitOrderId", - "BenefitId", "BenefitType", "MaxUtilizationPercentage", "MinUtilizationPercentage", - "UsageDate", and "UtilizedPercentage". - :paramtype secondary_report_url: str or - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummaryReportSchema - :keyword valid_until: The date that the sas url provided in reportUrl expires. - :paramtype valid_until: ~datetime.datetime - """ - super().__init__(**kwargs) - self.report_url = report_url - self.secondary_report_url = secondary_report_url - self.valid_until = valid_until - - -class Resource(_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. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - - -class BenefitResource(Resource): - """The benefit resource model definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar kind: Reservation or SavingsPlan. Known values are: "IncludedQuantity", "Reservation", - and "SavingsPlan". - :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - } - - def __init__(self, *, kind: Optional[Union[str, "_models.BenefitKind"]] = None, **kwargs: Any) -> None: - """ - :keyword kind: Reservation or SavingsPlan. Known values are: "IncludedQuantity", "Reservation", - and "SavingsPlan". - :paramtype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - super().__init__(**kwargs) - self.kind = kind - - -class BenefitRecommendationModel(BenefitResource): - """benefit plan recommendation details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar kind: Reservation or SavingsPlan. Known values are: "IncludedQuantity", "Reservation", - and "SavingsPlan". - :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar properties: The properties of the benefit recommendations. - :vartype properties: ~azure.mgmt.costmanagement.models.BenefitRecommendationProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "properties": {"key": "properties", "type": "BenefitRecommendationProperties"}, - } - - def __init__( - self, - *, - kind: Optional[Union[str, "_models.BenefitKind"]] = None, - properties: Optional["_models.BenefitRecommendationProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword kind: Reservation or SavingsPlan. Known values are: "IncludedQuantity", "Reservation", - and "SavingsPlan". - :paramtype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - :keyword properties: The properties of the benefit recommendations. - :paramtype properties: ~azure.mgmt.costmanagement.models.BenefitRecommendationProperties - """ - super().__init__(kind=kind, **kwargs) - self.properties = properties - - -class BenefitRecommendationProperties(_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 server. - - :ivar first_consumption_date: The first usage date used for looking back for computing the - recommendations. - :vartype first_consumption_date: ~datetime.datetime - :ivar last_consumption_date: The last usage date used for looking back for computing the - recommendations. - :vartype last_consumption_date: ~datetime.datetime - :ivar look_back_period: The number of days of usage evaluated for computing the - recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". - :vartype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod - :ivar total_hours: The total hours for which the cost is covered. Its equal to number of - records in a property 'properties/usage/charges'. - :vartype total_hours: int - :ivar usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that were - used for computing benefit recommendations. - :vartype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails - :ivar arm_sku_name: ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan. - :vartype arm_sku_name: str - :ivar term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and - "P3Y". - :vartype term: str or ~azure.mgmt.costmanagement.models.Term - :ivar commitment_granularity: Grain of the proposed commitment amount. Supported values: - 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". - :vartype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain - :ivar currency_code: An ISO 4217 currency code identifier for the costs and savings amounts. - :vartype currency_code: str - :ivar cost_without_benefit: The current cost without benefit, corresponds to 'totalHours' in - the look-back period. - :vartype cost_without_benefit: float - :ivar recommendation_details: The details of the proposed recommendation. - :vartype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails - :ivar all_recommendation_details: The list of all benefit recommendations with the - recommendation details. - :vartype all_recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsList - :ivar scope: Benefit scope. For example, Single or Shared. Required. Known values are: "Single" - and "Shared". - :vartype scope: str or ~azure.mgmt.costmanagement.models.Scope - """ - - _validation = { - "first_consumption_date": {"readonly": True}, - "last_consumption_date": {"readonly": True}, - "total_hours": {"readonly": True}, - "arm_sku_name": {"readonly": True}, - "currency_code": {"readonly": True}, - "cost_without_benefit": {"readonly": True}, - "all_recommendation_details": {"readonly": True}, - "scope": {"required": True}, - } - - _attribute_map = { - "first_consumption_date": {"key": "firstConsumptionDate", "type": "iso-8601"}, - "last_consumption_date": {"key": "lastConsumptionDate", "type": "iso-8601"}, - "look_back_period": {"key": "lookBackPeriod", "type": "str"}, - "total_hours": {"key": "totalHours", "type": "int"}, - "usage": {"key": "usage", "type": "RecommendationUsageDetails"}, - "arm_sku_name": {"key": "armSkuName", "type": "str"}, - "term": {"key": "term", "type": "str"}, - "commitment_granularity": {"key": "commitmentGranularity", "type": "str"}, - "currency_code": {"key": "currencyCode", "type": "str"}, - "cost_without_benefit": {"key": "costWithoutBenefit", "type": "float"}, - "recommendation_details": {"key": "recommendationDetails", "type": "AllSavingsBenefitDetails"}, - "all_recommendation_details": {"key": "allRecommendationDetails", "type": "AllSavingsList"}, - "scope": {"key": "scope", "type": "str"}, - } - - _subtype_map = { - "scope": { - "Shared": "SharedScopeBenefitRecommendationProperties", - "Single": "SingleScopeBenefitRecommendationProperties", - } - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword look_back_period: The number of days of usage evaluated for computing the - recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". - :paramtype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod - :keyword usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that - were used for computing benefit recommendations. - :paramtype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails - :keyword term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and - "P3Y". - :paramtype term: str or ~azure.mgmt.costmanagement.models.Term - :keyword commitment_granularity: Grain of the proposed commitment amount. Supported values: - 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". - :paramtype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain - :keyword recommendation_details: The details of the proposed recommendation. - :paramtype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails - """ - super().__init__(**kwargs) - self.first_consumption_date: Optional[datetime.datetime] = None - self.last_consumption_date: Optional[datetime.datetime] = None - self.look_back_period = look_back_period - self.total_hours: Optional[int] = None - self.usage = usage - self.arm_sku_name: Optional[str] = None - self.term = term - self.commitment_granularity = commitment_granularity - self.currency_code: Optional[str] = None - self.cost_without_benefit: Optional[float] = None - self.recommendation_details = recommendation_details - self.all_recommendation_details: Optional["_models.AllSavingsList"] = None - self.scope: Optional[str] = None - - -class BenefitRecommendationsListResult(_serialization.Model): - """Result of listing benefit recommendations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of benefit recommendations. - :vartype value: list[~azure.mgmt.costmanagement.models.BenefitRecommendationModel] - :ivar next_link: The link (URL) to the next page of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[BenefitRecommendationModel]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.BenefitRecommendationModel"]] = None - self.next_link: Optional[str] = None - - -class BenefitUtilizationSummariesListResult(_serialization.Model): - """List of benefit utilization summaries. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of benefit utilization summaries. - :vartype value: list[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :ivar next_link: The link (URL) to the next page of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[BenefitUtilizationSummary]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.BenefitUtilizationSummary"]] = None - self.next_link: Optional[str] = None - - -class BenefitUtilizationSummariesOperationStatus(_serialization.Model): # pylint: disable=name-too-long - """Status of a benefit utilization summaries report. Provides Async Benefit Utilization Summaries - Request input, status, and report sas url. - - :ivar input: Input given to create the benefit utilization summaries report. - :vartype input: ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :ivar status: The status of the creation of the benefit utilization summaries report. Known - values are: "Running", "Complete", "Failed", and "Completed". - :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType - :ivar properties: Contains sas url to the async benefit utilization summaries report and a date - that the url is valid until. These values will be empty if the report is in a Running or Failed - state. - :vartype properties: ~azure.mgmt.costmanagement.models.AsyncOperationStatusProperties - """ - - _attribute_map = { - "input": {"key": "input", "type": "BenefitUtilizationSummariesRequest"}, - "status": {"key": "status", "type": "str"}, - "properties": {"key": "properties", "type": "AsyncOperationStatusProperties"}, - } - - def __init__( - self, - *, - input: Optional["_models.BenefitUtilizationSummariesRequest"] = None, - status: Optional[Union[str, "_models.OperationStatusType"]] = None, - properties: Optional["_models.AsyncOperationStatusProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword input: Input given to create the benefit utilization summaries report. - :paramtype input: ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword status: The status of the creation of the benefit utilization summaries report. Known - values are: "Running", "Complete", "Failed", and "Completed". - :paramtype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType - :keyword properties: Contains sas url to the async benefit utilization summaries report and a - date that the url is valid until. These values will be empty if the report is in a Running or - Failed state. - :paramtype properties: ~azure.mgmt.costmanagement.models.AsyncOperationStatusProperties - """ - super().__init__(**kwargs) - self.input = input - self.status = status - self.properties = properties - - -class BenefitUtilizationSummariesRequest(_serialization.Model): - """Properties of an async benefit utilization summaries request. - - All required parameters must be populated in order to send to server. - - :ivar billing_account_id: Billing account the benefit utilization summaries report is for. - Required for billing account and billing profile scopes. Not supported for any benefit scopes. - :vartype billing_account_id: str - :ivar billing_profile_id: Billing profile id the benefit utilization summaries report is for. - Required for billing profile scope. Not supported for billing account or any benefit scopes. - :vartype billing_profile_id: str - :ivar benefit_order_id: Benefit order id the benefit utilization summaries report is for. - Required for benefit order and benefit id scopes. Not supported for any billing scopes. - :vartype benefit_order_id: str - :ivar benefit_id: Benefit id the benefit utilization summaries report is for. Required for - benefit id scope. Not supported for benefit order or any billing scopes. - :vartype benefit_id: str - :ivar grain: The grain the summaries data is served at in the report. Accepted values are - 'Daily' or 'Monthly'. Required. Known values are: "Hourly", "Daily", and "Monthly". - :vartype grain: str or ~azure.mgmt.costmanagement.models.Grain - :ivar start_date: The start date of the summaries data that will be served in the report. - Required. - :vartype start_date: ~datetime.datetime - :ivar end_date: The end date of the summaries data that will be served in the report. Required. - :vartype end_date: ~datetime.datetime - :ivar kind: The type of benefit data requested. Required for billing account and billing - profile scopes. Implied and not to be passed at benefit scopes. Supported values are - Reservation and SavingsPlan. Known values are: "IncludedQuantity", "Reservation", and - "SavingsPlan". - :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - - _validation = { - "grain": {"required": True}, - "start_date": {"required": True}, - "end_date": {"required": True}, - } - - _attribute_map = { - "billing_account_id": {"key": "billingAccountId", "type": "str"}, - "billing_profile_id": {"key": "billingProfileId", "type": "str"}, - "benefit_order_id": {"key": "benefitOrderId", "type": "str"}, - "benefit_id": {"key": "benefitId", "type": "str"}, - "grain": {"key": "grain", "type": "str"}, - "start_date": {"key": "startDate", "type": "iso-8601"}, - "end_date": {"key": "endDate", "type": "iso-8601"}, - "kind": {"key": "kind", "type": "str"}, - } - - def __init__( - self, - *, - grain: Union[str, "_models.Grain"], - start_date: datetime.datetime, - end_date: datetime.datetime, - billing_account_id: Optional[str] = None, - billing_profile_id: Optional[str] = None, - benefit_order_id: Optional[str] = None, - benefit_id: Optional[str] = None, - kind: Optional[Union[str, "_models.BenefitKind"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword billing_account_id: Billing account the benefit utilization summaries report is for. - Required for billing account and billing profile scopes. Not supported for any benefit scopes. - :paramtype billing_account_id: str - :keyword billing_profile_id: Billing profile id the benefit utilization summaries report is - for. Required for billing profile scope. Not supported for billing account or any benefit - scopes. - :paramtype billing_profile_id: str - :keyword benefit_order_id: Benefit order id the benefit utilization summaries report is for. - Required for benefit order and benefit id scopes. Not supported for any billing scopes. - :paramtype benefit_order_id: str - :keyword benefit_id: Benefit id the benefit utilization summaries report is for. Required for - benefit id scope. Not supported for benefit order or any billing scopes. - :paramtype benefit_id: str - :keyword grain: The grain the summaries data is served at in the report. Accepted values are - 'Daily' or 'Monthly'. Required. Known values are: "Hourly", "Daily", and "Monthly". - :paramtype grain: str or ~azure.mgmt.costmanagement.models.Grain - :keyword start_date: The start date of the summaries data that will be served in the report. - Required. - :paramtype start_date: ~datetime.datetime - :keyword end_date: The end date of the summaries data that will be served in the report. - Required. - :paramtype end_date: ~datetime.datetime - :keyword kind: The type of benefit data requested. Required for billing account and billing - profile scopes. Implied and not to be passed at benefit scopes. Supported values are - Reservation and SavingsPlan. Known values are: "IncludedQuantity", "Reservation", and - "SavingsPlan". - :paramtype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - super().__init__(**kwargs) - self.billing_account_id = billing_account_id - self.billing_profile_id = billing_profile_id - self.benefit_order_id = benefit_order_id - self.benefit_id = benefit_id - self.grain = grain - self.start_date = start_date - self.end_date = end_date - self.kind = kind - - -class BenefitUtilizationSummary(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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar kind: Supported values: 'SavingsPlan'. Required. Known values are: "IncludedQuantity", - "Reservation", and "SavingsPlan". - :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - } - - _subtype_map = { - "kind": { - "IncludedQuantity": "IncludedQuantityUtilizationSummary", - "SavingsPlan": "SavingsPlanUtilizationSummary", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.kind: Optional[str] = None - - -class BenefitUtilizationSummaryProperties(_serialization.Model): - """The properties of a benefit utilization summary. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. - :vartype arm_sku_name: str - :ivar benefit_id: The benefit ID is the identifier of the benefit. - :vartype benefit_id: str - :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. - :vartype benefit_order_id: str - :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar usage_date: 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. - :vartype usage_date: ~datetime.datetime - """ - - _validation = { - "arm_sku_name": {"readonly": True}, - "benefit_id": {"readonly": True}, - "benefit_order_id": {"readonly": True}, - "usage_date": {"readonly": True}, - } - - _attribute_map = { - "arm_sku_name": {"key": "armSkuName", "type": "str"}, - "benefit_id": {"key": "benefitId", "type": "str"}, - "benefit_order_id": {"key": "benefitOrderId", "type": "str"}, - "benefit_type": {"key": "benefitType", "type": "str"}, - "usage_date": {"key": "usageDate", "type": "iso-8601"}, - } - - def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, **kwargs: Any) -> None: - """ - :keyword benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - super().__init__(**kwargs) - self.arm_sku_name: Optional[str] = None - self.benefit_id: Optional[str] = None - self.benefit_order_id: Optional[str] = None - self.benefit_type = benefit_type - self.usage_date: Optional[datetime.datetime] = None - - -class BlobInfo(_serialization.Model): - """The blob information generated by this operation. - - :ivar blob_link: Link to the blob to download file. - :vartype blob_link: str - :ivar byte_count: Bytes in the blob. - :vartype byte_count: int - """ - - _attribute_map = { - "blob_link": {"key": "blobLink", "type": "str"}, - "byte_count": {"key": "byteCount", "type": "int"}, - } - - def __init__(self, *, blob_link: Optional[str] = None, byte_count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword blob_link: Link to the blob to download file. - :paramtype blob_link: str - :keyword byte_count: Bytes in the blob. - :paramtype byte_count: int - """ - super().__init__(**kwargs) - self.blob_link = blob_link - self.byte_count = byte_count - - -class Budget(CostManagementProxyResource): - """A budget resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar e_tag: 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. - :vartype e_tag: str - :ivar category: The category of the budget. - - * 'Cost' defines a Budget. - * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. Known values are: - "Cost" and "ReservationUtilization". - :vartype category: str or ~azure.mgmt.costmanagement.models.CategoryType - :ivar amount: The total amount of cost to track with the budget. - - Supported for CategoryType(s): Cost. - - Required for CategoryType(s): Cost. - :vartype amount: float - :ivar time_grain: The time covered by a budget. Tracking of the amount will be reset based on - the time grain. Supported for CategoryType(s): Cost, ReservationUtilization. Supported - timeGrainTypes for **CategoryType: Cost** - - * Monthly - * Quarterly - * Annually - * BillingMonth* - * BillingQuarter* - * - BillingAnnual* - - *only supported for Web Direct customers. - - Supported timeGrainTypes for **CategoryType: ReservationUtilization** - - * Last7Days - * - Last30Days - - Required for CategoryType(s): Cost, ReservationUtilization. Known values are: "Monthly", - "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual", "Last7Days", and - "Last30Days". - :vartype time_grain: str or ~azure.mgmt.costmanagement.models.TimeGrainType - :ivar time_period: The time period that defines the active period of the budget. The budget - will evaluate data on or after the startDate and will expire on the endDate. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - Required for CategoryType(s): Cost, ReservationUtilization. - :vartype time_period: ~azure.mgmt.costmanagement.models.BudgetTimePeriod - :ivar filter: May be used to filter budgets by user-specified dimensions and/or tags. - - Supported for CategoryType(s): Cost, ReservationUtilization. - :vartype filter: ~azure.mgmt.costmanagement.models.BudgetFilter - :ivar current_spend: The current amount of cost which is being tracked for a budget. - - Supported for CategoryType(s): Cost. - :vartype current_spend: ~azure.mgmt.costmanagement.models.CurrentSpend - :ivar notifications: Dictionary of notifications associated with the budget. Supported for - CategoryType(s): Cost, ReservationUtilization. - - * Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with - thresholdType: Actual and 5 notifications with thresholdType: Forecasted. - * Constraints for **CategoryType: ReservationUtilization** - Only one notification - allowed. thresholdType is not applicable. - :vartype notifications: dict[str, ~azure.mgmt.costmanagement.models.Notification] - :ivar forecast_spend: The forecasted cost which is being tracked for a budget. - - Supported for CategoryType(s): Cost. - :vartype forecast_spend: ~azure.mgmt.costmanagement.models.ForecastSpend - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "current_spend": {"readonly": True}, - "forecast_spend": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "category": {"key": "properties.category", "type": "str"}, - "amount": {"key": "properties.amount", "type": "float"}, - "time_grain": {"key": "properties.timeGrain", "type": "str"}, - "time_period": {"key": "properties.timePeriod", "type": "BudgetTimePeriod"}, - "filter": {"key": "properties.filter", "type": "BudgetFilter"}, - "current_spend": {"key": "properties.currentSpend", "type": "CurrentSpend"}, - "notifications": {"key": "properties.notifications", "type": "{Notification}"}, - "forecast_spend": {"key": "properties.forecastSpend", "type": "ForecastSpend"}, - } - - def __init__( - self, - *, - e_tag: Optional[str] = None, - category: Optional[Union[str, "_models.CategoryType"]] = None, - amount: Optional[float] = None, - time_grain: Optional[Union[str, "_models.TimeGrainType"]] = None, - time_period: Optional["_models.BudgetTimePeriod"] = None, - filter: Optional["_models.BudgetFilter"] = None, # pylint: disable=redefined-builtin - notifications: Optional[dict[str, "_models.Notification"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword e_tag: 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. - :paramtype e_tag: str - :keyword category: The category of the budget. - - * 'Cost' defines a Budget. - * 'ReservationUtilization' defines a Reservation Utilization Alert Rule. Known values - are: "Cost" and "ReservationUtilization". - :paramtype category: str or ~azure.mgmt.costmanagement.models.CategoryType - :keyword amount: The total amount of cost to track with the budget. - - Supported for CategoryType(s): Cost. - - Required for CategoryType(s): Cost. - :paramtype amount: float - :keyword time_grain: The time covered by a budget. Tracking of the amount will be reset based - on the time grain. Supported for CategoryType(s): Cost, ReservationUtilization. Supported - timeGrainTypes for **CategoryType: Cost** - - * Monthly - * Quarterly - * Annually - * BillingMonth* - * BillingQuarter* - * - BillingAnnual* - - *only supported for Web Direct customers. - - Supported timeGrainTypes for **CategoryType: ReservationUtilization** - - * Last7Days - * - Last30Days - - Required for CategoryType(s): Cost, ReservationUtilization. Known values are: - "Monthly", "Quarterly", "Annually", "BillingMonth", "BillingQuarter", "BillingAnnual", - "Last7Days", and "Last30Days". - :paramtype time_grain: str or ~azure.mgmt.costmanagement.models.TimeGrainType - :keyword time_period: The time period that defines the active period of the budget. The budget - will evaluate data on or after the startDate and will expire on the endDate. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - Required for CategoryType(s): Cost, ReservationUtilization. - :paramtype time_period: ~azure.mgmt.costmanagement.models.BudgetTimePeriod - :keyword filter: May be used to filter budgets by user-specified dimensions and/or tags. - - Supported for CategoryType(s): Cost, ReservationUtilization. - :paramtype filter: ~azure.mgmt.costmanagement.models.BudgetFilter - :keyword notifications: Dictionary of notifications associated with the budget. Supported for - CategoryType(s): Cost, ReservationUtilization. - - * Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with - thresholdType: Actual and 5 notifications with thresholdType: Forecasted. - * Constraints for **CategoryType: ReservationUtilization** - Only one notification - allowed. thresholdType is not applicable. - :paramtype notifications: dict[str, ~azure.mgmt.costmanagement.models.Notification] - """ - super().__init__(e_tag=e_tag, **kwargs) - self.category = category - self.amount = amount - self.time_grain = time_grain - self.time_period = time_period - self.filter = filter - self.current_spend: Optional["_models.CurrentSpend"] = None - self.notifications = notifications - self.forecast_spend: Optional["_models.ForecastSpend"] = None - - -class BudgetComparisonExpression(_serialization.Model): - """The comparison expression to be used in the budgets. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the column to use in comparison. Required. - :vartype name: str - :ivar operator: The operator to use for comparison. Required. "In" - :vartype operator: str or ~azure.mgmt.costmanagement.models.BudgetOperatorType - :ivar values: Array of values to use for comparison. Required. - :vartype values: list[str] - """ - - _validation = { - "name": {"required": True}, - "operator": {"required": True}, - "values": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "values": {"key": "values", "type": "[str]"}, - } - - def __init__( - self, *, name: str, operator: Union[str, "_models.BudgetOperatorType"], values: list[str], **kwargs: Any - ) -> None: - """ - :keyword name: The name of the column to use in comparison. Required. - :paramtype name: str - :keyword operator: The operator to use for comparison. Required. "In" - :paramtype operator: str or ~azure.mgmt.costmanagement.models.BudgetOperatorType - :keyword values: Array of values to use for comparison. Required. - :paramtype values: list[str] - """ - super().__init__(**kwargs) - self.name = name - self.operator = operator - self.values = values - - -class BudgetFilter(_serialization.Model): - """May be used to filter budgets by user-specified dimensions and/or tags. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - :ivar and_property: The logical "AND" expression. Must have at least 2 items. - - Supported for CategoryType(s): Cost. - :vartype and_property: list[~azure.mgmt.costmanagement.models.BudgetFilterProperties] - :ivar dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): - Cost, ReservationUtilization. Supported dimension names for **CategoryType: - ReservationUtilization** - - * ReservationId - * ReservedResourceType. - :vartype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - :ivar tags: Has comparison expression for a tag. - - Supported for CategoryType(s): Cost. - :vartype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - """ - - _attribute_map = { - "and_property": {"key": "and", "type": "[BudgetFilterProperties]"}, - "dimensions": {"key": "dimensions", "type": "BudgetComparisonExpression"}, - "tags": {"key": "tags", "type": "BudgetComparisonExpression"}, - } - - def __init__( - self, - *, - and_property: Optional[list["_models.BudgetFilterProperties"]] = None, - dimensions: Optional["_models.BudgetComparisonExpression"] = None, - tags: Optional["_models.BudgetComparisonExpression"] = None, - **kwargs: Any - ) -> None: - """ - :keyword and_property: The logical "AND" expression. Must have at least 2 items. - - Supported for CategoryType(s): Cost. - :paramtype and_property: list[~azure.mgmt.costmanagement.models.BudgetFilterProperties] - :keyword dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): - Cost, ReservationUtilization. Supported dimension names for **CategoryType: - ReservationUtilization** - - * ReservationId - * ReservedResourceType. - :paramtype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - :keyword tags: Has comparison expression for a tag. - - Supported for CategoryType(s): Cost. - :paramtype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - """ - super().__init__(**kwargs) - self.and_property = and_property - self.dimensions = dimensions - self.tags = tags - - -class BudgetFilterProperties(_serialization.Model): - """The Dimensions or Tags to filter a budget by. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - :ivar dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): - Cost, ReservationUtilization. Supported dimension names for **CategoryType: - ReservationUtilization** - - * ReservationId - * ReservedResourceType. - :vartype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - :ivar tags: Has comparison expression for a tag. - - Supported for CategoryType(s): Cost. - :vartype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - """ - - _attribute_map = { - "dimensions": {"key": "dimensions", "type": "BudgetComparisonExpression"}, - "tags": {"key": "tags", "type": "BudgetComparisonExpression"}, - } - - def __init__( - self, - *, - dimensions: Optional["_models.BudgetComparisonExpression"] = None, - tags: Optional["_models.BudgetComparisonExpression"] = None, - **kwargs: Any - ) -> None: - """ - :keyword dimensions: Has comparison expression for a dimension. Supported for CategoryType(s): - Cost, ReservationUtilization. Supported dimension names for **CategoryType: - ReservationUtilization** - - * ReservationId - * ReservedResourceType. - :paramtype dimensions: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - :keyword tags: Has comparison expression for a tag. - - Supported for CategoryType(s): Cost. - :paramtype tags: ~azure.mgmt.costmanagement.models.BudgetComparisonExpression - """ - super().__init__(**kwargs) - self.dimensions = dimensions - self.tags = tags - - -class BudgetsListResult(_serialization.Model): - """Result of listing budgets. It contains a list of available budgets in the scope provided. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of budgets. - :vartype value: list[~azure.mgmt.costmanagement.models.Budget] - :ivar next_link: The link (url) to the next page of results. It's null for now, added for - future use. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Budget]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Budget"]] = None - self.next_link: Optional[str] = None - - -class BudgetTimePeriod(_serialization.Model): - """The time period that defines the active period of the budget. The budget will evaluate data on - or after the startDate and will expire on the endDate. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - Required for CategoryType(s): Cost, ReservationUtilization. - - All required parameters must be populated in order to send to server. - - :ivar start_date: The start date for the budget. - - * - Constraints for **CategoryType: Cost** - Must be first of the month and should be less - than the end date. Budget start date must be on or after June 1, 2017. Future start date should - not be more than twelve months. Past start date should be selected within the timegrain - period. - - * - Constraints for **CategoryType: ReservationUtilization** - Must be on or after the current - date and less than the end date. Required. - :vartype start_date: ~datetime.datetime - :ivar end_date: The end date for the budget. - - * - Constraints for **CategoryType: Cost** - No constraints. If not provided, we default this - to 10 years from the start date. - - * - Constraints for **CategoryType: ReservationUtilization** - End date cannot be more than 3 - years after the start date. - :vartype end_date: ~datetime.datetime - """ - - _validation = { - "start_date": {"required": True}, - } - - _attribute_map = { - "start_date": {"key": "startDate", "type": "iso-8601"}, - "end_date": {"key": "endDate", "type": "iso-8601"}, - } - - def __init__( - self, *, start_date: datetime.datetime, end_date: Optional[datetime.datetime] = None, **kwargs: Any - ) -> None: - """ - :keyword start_date: The start date for the budget. - - * - Constraints for **CategoryType: Cost** - Must be first of the month and should be less - than the end date. Budget start date must be on or after June 1, 2017. Future start date should - not be more than twelve months. Past start date should be selected within the timegrain - period. - - * - Constraints for **CategoryType: ReservationUtilization** - Must be on or after the - current date and less than the end date. Required. - :paramtype start_date: ~datetime.datetime - :keyword end_date: The end date for the budget. - - * - Constraints for **CategoryType: Cost** - No constraints. If not provided, we default - this to 10 years from the start date. - - * - Constraints for **CategoryType: ReservationUtilization** - End date cannot be more - than 3 years after the start date. - :paramtype end_date: ~datetime.datetime - """ - super().__init__(**kwargs) - self.start_date = start_date - self.end_date = end_date - - -class CheckNameAvailabilityRequest(_serialization.Model): - """The check availability request body. - - :ivar name: The name of the resource for which availability needs to be checked. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: The name of the resource for which availability needs to be checked. - :paramtype name: str - :keyword type: The resource type. - :paramtype type: str - """ - super().__init__(**kwargs) - self.name = name - self.type = type - - -class CheckNameAvailabilityResponse(_serialization.Model): - """The check availability result. - - :ivar name_available: Indicates if the resource name is available. - :vartype name_available: bool - :ivar reason: The reason why the given name is not available. Known values are: "Invalid" and - "AlreadyExists". - :vartype reason: str or ~azure.mgmt.costmanagement.models.CheckNameAvailabilityReason - :ivar message: Detailed reason why the given name is available. - :vartype message: str - """ - - _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__( - self, - *, - name_available: Optional[bool] = None, - reason: Optional[Union[str, "_models.CheckNameAvailabilityReason"]] = None, - message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name_available: Indicates if the resource name is available. - :paramtype name_available: bool - :keyword reason: The reason why the given name is not available. Known values are: "Invalid" - and "AlreadyExists". - :paramtype reason: str or ~azure.mgmt.costmanagement.models.CheckNameAvailabilityReason - :keyword message: Detailed reason why the given name is available. - :paramtype message: str - """ - super().__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class CommonExportProperties(_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 server. - - :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". - :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType - :ivar delivery_info: Has delivery information for the export. Required. - :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :ivar definition: Has the definition for the export. Required. - :vartype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :ivar run_history: If requested, has the most recent run history for the export. - :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :ivar partition_data: If set to true, exported data will be partitioned by size and placed in a - blob directory together with a manifest file. - :vartype partition_data: bool - :ivar data_overwrite_behavior: Allow customers to select overwrite - data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same - month in customer storage account. By default set to CreateNewReport. Known values are: - "OverwritePreviousReport" and "CreateNewReport". - :vartype data_overwrite_behavior: str or - ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType - :ivar compression_mode: Allow customers to select compress data for exports. This setting will - enable destination file compression scheme at runtime. By default set to None. Gzip is for csv - and snappy for parquet. Known values are: "gzip", "snappy", and "none". - :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType - :ivar export_description: The export description set by customer at time of export - creation/update. - :vartype export_description: str - :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the - next run time. - :vartype next_run_time_estimate: ~datetime.datetime - :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended - state. This is not populated currently. - :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext - """ - - _validation = { - "delivery_info": {"required": True}, - "definition": {"required": True}, - "next_run_time_estimate": {"readonly": True}, - "system_suspension_context": {"readonly": True}, - } - - _attribute_map = { - "format": {"key": "format", "type": "str"}, - "delivery_info": {"key": "deliveryInfo", "type": "ExportDeliveryInfo"}, - "definition": {"key": "definition", "type": "ExportDefinition"}, - "run_history": {"key": "runHistory", "type": "ExportExecutionListResult"}, - "partition_data": {"key": "partitionData", "type": "bool"}, - "data_overwrite_behavior": {"key": "dataOverwriteBehavior", "type": "str"}, - "compression_mode": {"key": "compressionMode", "type": "str"}, - "export_description": {"key": "exportDescription", "type": "str"}, - "next_run_time_estimate": {"key": "nextRunTimeEstimate", "type": "iso-8601"}, - "system_suspension_context": {"key": "systemSuspensionContext", "type": "ExportSuspensionContext"}, - } - - def __init__( - self, - *, - 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, - data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, - compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, - export_description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword format: The format of the export being delivered. Known values are: "Csv" and - "Parquet". - :paramtype format: str or ~azure.mgmt.costmanagement.models.FormatType - :keyword delivery_info: Has delivery information for the export. Required. - :paramtype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :keyword definition: Has the definition for the export. Required. - :paramtype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :keyword run_history: If requested, has the most recent run history for the export. - :paramtype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :keyword partition_data: If set to true, exported data will be partitioned by size and placed - in a blob directory together with a manifest file. - :paramtype partition_data: bool - :keyword data_overwrite_behavior: Allow customers to select overwrite - data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same - month in customer storage account. By default set to CreateNewReport. Known values are: - "OverwritePreviousReport" and "CreateNewReport". - :paramtype data_overwrite_behavior: str or - ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType - :keyword compression_mode: Allow customers to select compress data for exports. This setting - will enable destination file compression scheme at runtime. By default set to None. Gzip is for - csv and snappy for parquet. Known values are: "gzip", "snappy", and "none". - :paramtype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType - :keyword export_description: The export description set by customer at time of export - creation/update. - :paramtype export_description: str - """ - super().__init__(**kwargs) - self.format = format - self.delivery_info = delivery_info - self.definition = definition - self.run_history = run_history - self.partition_data = partition_data - self.data_overwrite_behavior = data_overwrite_behavior - self.compression_mode = compression_mode - self.export_description = export_description - self.next_run_time_estimate: Optional[datetime.datetime] = None - self.system_suspension_context: Optional["_models.ExportSuspensionContext"] = None - - -class CostAllocationProportion(_serialization.Model): - """Target resources and allocation. - - All required parameters must be populated in order to send to server. - - :ivar name: Target resource for cost allocation. Required. - :vartype name: str - :ivar percentage: Percentage of source cost to allocate to this resource. This value can be - specified to two decimal places and the total percentage of all resources in this rule must sum - to 100.00. Required. - :vartype percentage: float - """ - - _validation = { - "name": {"required": True}, - "percentage": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "percentage": {"key": "percentage", "type": "float"}, - } - - def __init__(self, *, name: str, percentage: float, **kwargs: Any) -> None: - """ - :keyword name: Target resource for cost allocation. Required. - :paramtype name: str - :keyword percentage: Percentage of source cost to allocate to this resource. This value can be - specified to two decimal places and the total percentage of all resources in this rule must sum - to 100.00. Required. - :paramtype percentage: float - """ - super().__init__(**kwargs) - self.name = name - self.percentage = percentage - - -class CostAllocationResource(_serialization.Model): - """Common values for resources for cost allocation. - - All required parameters must be populated in order to send to server. - - :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known - values are: "Dimension" and "Tag". - :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType - :ivar name: If resource type is dimension, this must be either ResourceGroupName or - SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. - :vartype name: str - """ - - _validation = { - "resource_type": {"required": True}, - "name": {"required": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, *, resource_type: Union[str, "_models.CostAllocationResourceType"], name: str, **kwargs: Any - ) -> None: - """ - :keyword resource_type: Type of resources contained in this cost allocation rule. Required. - Known values are: "Dimension" and "Tag". - :paramtype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType - :keyword name: If resource type is dimension, this must be either ResourceGroupName or - SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.resource_type = resource_type - self.name = name - - -class CostAllocationRuleCheckNameAvailabilityRequest(_serialization.Model): # pylint: disable=name-too-long - """The cost allocation rule check name availability request. - - :ivar name: Rule name. - :vartype name: str - :ivar type: Resource type. This is expected to be Microsoft.CostManagement/costAllocationRules. - :vartype type: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: Rule name. - :paramtype name: str - :keyword type: Resource type. This is expected to be - Microsoft.CostManagement/costAllocationRules. - :paramtype type: str - """ - super().__init__(**kwargs) - self.name = name - self.type = type - - -class CostAllocationRuleCheckNameAvailabilityResponse(_serialization.Model): # pylint: disable=name-too-long - """The cost allocation rule check name availability response. - - :ivar name_available: Whether this rule name is available. - :vartype name_available: bool - :ivar reason: The reason this name is not available. Known values are: "Invalid", - "AlreadyExists", and "Valid". - :vartype reason: str or ~azure.mgmt.costmanagement.models.Reason - :ivar message: Error message if the name is not available. - :vartype message: str - """ - - _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__( - self, - *, - name_available: Optional[bool] = None, - reason: Optional[Union[str, "_models.Reason"]] = None, - message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name_available: Whether this rule name is available. - :paramtype name_available: bool - :keyword reason: The reason this name is not available. Known values are: "Invalid", - "AlreadyExists", and "Valid". - :paramtype reason: str or ~azure.mgmt.costmanagement.models.Reason - :keyword message: Error message if the name is not available. - :paramtype message: str - """ - super().__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class CostAllocationRuleDefinition(_serialization.Model): - """The cost allocation rule model definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Azure Resource Manager Id for the rule. This is a read ony value. - :vartype id: str - :ivar name: Name of the rule. This is a read only value. - :vartype name: str - :ivar type: Resource type of the rule. This is a read only value of - Microsoft.CostManagement/CostAllocationRule. - :vartype type: str - :ivar properties: Cost allocation rule properties. - :vartype properties: ~azure.mgmt.costmanagement.models.CostAllocationRuleProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "properties": {"key": "properties", "type": "CostAllocationRuleProperties"}, - } - - def __init__(self, *, properties: Optional["_models.CostAllocationRuleProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: Cost allocation rule properties. - :paramtype properties: ~azure.mgmt.costmanagement.models.CostAllocationRuleProperties - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.properties = properties - - -class CostAllocationRuleDetails(_serialization.Model): - """Resource details of the cost allocation rule. - - :ivar source_resources: Source resources for cost allocation. At this time, this list can - contain no more than one element. - :vartype source_resources: list[~azure.mgmt.costmanagement.models.SourceCostAllocationResource] - :ivar target_resources: Target resources for cost allocation. At this time, this list can - contain no more than one element. - :vartype target_resources: list[~azure.mgmt.costmanagement.models.TargetCostAllocationResource] - """ - - _attribute_map = { - "source_resources": {"key": "sourceResources", "type": "[SourceCostAllocationResource]"}, - "target_resources": {"key": "targetResources", "type": "[TargetCostAllocationResource]"}, - } - - def __init__( - self, - *, - source_resources: Optional[list["_models.SourceCostAllocationResource"]] = None, - target_resources: Optional[list["_models.TargetCostAllocationResource"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword source_resources: Source resources for cost allocation. At this time, this list can - contain no more than one element. - :paramtype source_resources: - list[~azure.mgmt.costmanagement.models.SourceCostAllocationResource] - :keyword target_resources: Target resources for cost allocation. At this time, this list can - contain no more than one element. - :paramtype target_resources: - list[~azure.mgmt.costmanagement.models.TargetCostAllocationResource] - """ - super().__init__(**kwargs) - self.source_resources = source_resources - self.target_resources = target_resources - - -class CostAllocationRuleList(_serialization.Model): - """Result of listing cost allocation rules. It contains a list of available rules in the billing - account or enterprise enrollment provided. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of cost allocation rules. - :vartype value: list[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] - :ivar next_link: URL to get the next set of rule list results if there are any. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[CostAllocationRuleDefinition]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.CostAllocationRuleDefinition"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of cost allocation rules. - :paramtype value: list[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class CostAllocationRuleProperties(_serialization.Model): - """The properties of a cost allocation rule. - - 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 server. - - :ivar description: Description of a cost allocation rule. - :vartype description: str - :ivar details: Resource information for the cost allocation rule. Required. - :vartype details: ~azure.mgmt.costmanagement.models.CostAllocationRuleDetails - :ivar status: Status of the rule. Required. Known values are: "NotActive", "Active", and - "Processing". - :vartype status: str or ~azure.mgmt.costmanagement.models.RuleStatus - :ivar created_date: Time at which the rule was created. Rules that change cost for the same - resource are applied in order of creation. - :vartype created_date: ~datetime.datetime - :ivar updated_date: Time at which the rule was last updated. - :vartype updated_date: ~datetime.datetime - """ - - _validation = { - "details": {"required": True}, - "status": {"required": True}, - "created_date": {"readonly": True}, - "updated_date": {"readonly": True}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "details": {"key": "details", "type": "CostAllocationRuleDetails"}, - "status": {"key": "status", "type": "str"}, - "created_date": {"key": "createdDate", "type": "iso-8601"}, - "updated_date": {"key": "updatedDate", "type": "iso-8601"}, - } - - def __init__( - self, - *, - details: "_models.CostAllocationRuleDetails", - status: Union[str, "_models.RuleStatus"], - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description of a cost allocation rule. - :paramtype description: str - :keyword details: Resource information for the cost allocation rule. Required. - :paramtype details: ~azure.mgmt.costmanagement.models.CostAllocationRuleDetails - :keyword status: Status of the rule. Required. Known values are: "NotActive", "Active", and - "Processing". - :paramtype status: str or ~azure.mgmt.costmanagement.models.RuleStatus - """ - super().__init__(**kwargs) - self.description = description - self.details = details - self.status = status - self.created_date: Optional[datetime.datetime] = None - self.updated_date: Optional[datetime.datetime] = None - - -class CostDetailsOperationResults(_serialization.Model): - """The result of the long running operation for cost details Api. - - :ivar id: The id of the long running operation. - :vartype id: str - :ivar name: The name of the long running operation. - :vartype name: str - :ivar type: The type of the long running operation. - :vartype type: str - :ivar status: The status of the cost details operation. Known values are: "Completed", - "NoDataFound", and "Failed". - :vartype status: str or ~azure.mgmt.costmanagement.models.CostDetailsStatusType - :ivar valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype valid_till: ~datetime.datetime - :ivar error: The details of the error. - :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetails - :ivar manifest_version: The Manifest version. - :vartype manifest_version: str - :ivar data_format: The data format of the report. "Csv" - :vartype data_format: str or ~azure.mgmt.costmanagement.models.CostDetailsDataFormat - :ivar byte_count: The total number of bytes in all blobs. - :vartype byte_count: int - :ivar blob_count: The total number of blobs. - :vartype blob_count: int - :ivar compress_data: Is the data in compressed format. - :vartype compress_data: bool - :ivar blobs: List of blob information generated by this operation. - :vartype blobs: list[~azure.mgmt.costmanagement.models.BlobInfo] - :ivar request_scope: The request scope of the request. - :vartype request_scope: str - :ivar request_body: The request payload body provided in Cost Details call. - :vartype request_body: - ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "status": {"key": "status", "type": "str"}, - "valid_till": {"key": "validTill", "type": "iso-8601"}, - "error": {"key": "error", "type": "ErrorDetails"}, - "manifest_version": {"key": "manifest.manifestVersion", "type": "str"}, - "data_format": {"key": "manifest.dataFormat", "type": "str"}, - "byte_count": {"key": "manifest.byteCount", "type": "int"}, - "blob_count": {"key": "manifest.blobCount", "type": "int"}, - "compress_data": {"key": "manifest.compressData", "type": "bool"}, - "blobs": {"key": "manifest.blobs", "type": "[BlobInfo]"}, - "request_scope": {"key": "manifest.requestContext.requestScope", "type": "str"}, - "request_body": { - "key": "manifest.requestContext.requestBody", - "type": "GenerateCostDetailsReportRequestDefinition", - }, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - 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: Any - ) -> None: - """ - :keyword id: The id of the long running operation. - :paramtype id: str - :keyword name: The name of the long running operation. - :paramtype name: str - :keyword type: The type of the long running operation. - :paramtype type: str - :keyword status: The status of the cost details operation. Known values are: "Completed", - "NoDataFound", and "Failed". - :paramtype status: str or ~azure.mgmt.costmanagement.models.CostDetailsStatusType - :keyword valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :paramtype valid_till: ~datetime.datetime - :keyword error: The details of the error. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetails - :keyword manifest_version: The Manifest version. - :paramtype manifest_version: str - :keyword data_format: The data format of the report. "Csv" - :paramtype data_format: str or ~azure.mgmt.costmanagement.models.CostDetailsDataFormat - :keyword byte_count: The total number of bytes in all blobs. - :paramtype byte_count: int - :keyword blob_count: The total number of blobs. - :paramtype blob_count: int - :keyword compress_data: Is the data in compressed format. - :paramtype compress_data: bool - :keyword blobs: List of blob information generated by this operation. - :paramtype blobs: list[~azure.mgmt.costmanagement.models.BlobInfo] - :keyword request_scope: The request scope of the request. - :paramtype request_scope: str - :keyword request_body: The request payload body provided in Cost Details call. - :paramtype request_body: - ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.status = status - self.valid_till = valid_till - self.error = error - self.manifest_version = manifest_version - self.data_format = data_format - self.byte_count = byte_count - self.blob_count = blob_count - self.compress_data = compress_data - self.blobs = blobs - self.request_scope = request_scope - self.request_body = request_body - - -class CostDetailsTimePeriod(_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 server. - - :ivar start: The start date to pull data from. example format 2020-03-15. Required. - :vartype start: str - :ivar end: The end date to pull data to. example format 2020-03-15. Required. - :vartype end: str - """ - - _validation = { - "start": {"required": True}, - "end": {"required": True}, - } - - _attribute_map = { - "start": {"key": "start", "type": "str"}, - "end": {"key": "end", "type": "str"}, - } - - def __init__(self, *, start: str, end: str, **kwargs: Any) -> None: - """ - :keyword start: The start date to pull data from. example format 2020-03-15. Required. - :paramtype start: str - :keyword end: The end date to pull data to. example format 2020-03-15. Required. - :paramtype end: str - """ - super().__init__(**kwargs) - self.start = start - self.end = end - - -class Operation(_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. - - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for - data-plane operations and "false" for ARM/control-plane operations. - :vartype is_data_action: bool - :ivar display: Localized display information for this particular operation. - :vartype display: ~azure.mgmt.costmanagement.models.OperationDisplay - :ivar 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". - :vartype origin: str or ~azure.mgmt.costmanagement.models.Origin - :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for - internal only APIs. "Internal" - :vartype action_type: str or ~azure.mgmt.costmanagement.models.ActionType - """ - - _validation = { - "name": {"readonly": True}, - "is_data_action": {"readonly": True}, - "origin": {"readonly": True}, - "action_type": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "is_data_action": {"key": "isDataAction", "type": "bool"}, - "display": {"key": "display", "type": "OperationDisplay"}, - "origin": {"key": "origin", "type": "str"}, - "action_type": {"key": "actionType", "type": "str"}, - } - - def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: - """ - :keyword display: Localized display information for this particular operation. - :paramtype display: ~azure.mgmt.costmanagement.models.OperationDisplay - """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.is_data_action: Optional[bool] = None - self.display = display - self.origin: Optional[Union[str, "_models.Origin"]] = None - self.action_type: Optional[Union[str, "_models.ActionType"]] = None - - -class CostManagementOperation(Operation): - """A Cost management REST API operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for - data-plane operations and "false" for ARM/control-plane operations. - :vartype is_data_action: bool - :ivar display: Localized display information for this particular operation. - :vartype display: ~azure.mgmt.costmanagement.models.OperationDisplay - :ivar 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". - :vartype origin: str or ~azure.mgmt.costmanagement.models.Origin - :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for - internal only APIs. "Internal" - :vartype action_type: str or ~azure.mgmt.costmanagement.models.ActionType - :ivar id: Operation id: {provider}/{resource}/{operation}. - :vartype id: str - """ - - _validation = { - "name": {"readonly": True}, - "is_data_action": {"readonly": True}, - "origin": {"readonly": True}, - "action_type": {"readonly": True}, - "id": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "is_data_action": {"key": "isDataAction", "type": "bool"}, - "display": {"key": "display", "type": "OperationDisplay"}, - "origin": {"key": "origin", "type": "str"}, - "action_type": {"key": "actionType", "type": "str"}, - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: - """ - :keyword display: Localized display information for this particular operation. - :paramtype display: ~azure.mgmt.costmanagement.models.OperationDisplay - """ - super().__init__(display=display, **kwargs) - self.id: Optional[str] = None - - -class CostManagementResource(_serialization.Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the resource. - :vartype location: str - :ivar sku: SKU of the resource. - :vartype sku: str - :ivar e_tag: ETag of the resource. - :vartype e_tag: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "location": {"readonly": True}, - "sku": {"readonly": True}, - "e_tag": {"readonly": True}, - "tags": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "sku": {"key": "sku", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.location: Optional[str] = None - self.sku: Optional[str] = None - self.e_tag: Optional[str] = None - self.tags: Optional[dict[str, str]] = None - - -class CurrentSpend(_serialization.Model): - """The current amount of cost which is being tracked for a budget. - - Supported for CategoryType(s): Cost. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar amount: The total amount of cost which is being tracked by the budget. - :vartype amount: float - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str - """ - - _validation = { - "amount": {"readonly": True}, - "unit": {"readonly": True}, - } - - _attribute_map = { - "amount": {"key": "amount", "type": "float"}, - "unit": {"key": "unit", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.amount: Optional[float] = None - self.unit: Optional[str] = None - - -class Dimension(CostManagementResource): - """List of Dimension. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the resource. - :vartype location: str - :ivar sku: SKU of the resource. - :vartype sku: str - :ivar e_tag: ETag of the resource. - :vartype e_tag: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar description: Dimension description. - :vartype description: str - :ivar filter_enabled: Filter enabled. - :vartype filter_enabled: bool - :ivar grouping_enabled: Grouping enabled. - :vartype grouping_enabled: bool - :ivar data: Dimension data. - :vartype data: list[str] - :ivar total: Total number of data for the dimension. - :vartype total: int - :ivar category: Dimension category. - :vartype category: str - :ivar usage_start: Usage start. - :vartype usage_start: ~datetime.datetime - :ivar usage_end: Usage end. - :vartype usage_end: ~datetime.datetime - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "location": {"readonly": True}, - "sku": {"readonly": True}, - "e_tag": {"readonly": True}, - "tags": {"readonly": True}, - "description": {"readonly": True}, - "filter_enabled": {"readonly": True}, - "grouping_enabled": {"readonly": True}, - "total": {"readonly": True}, - "category": {"readonly": True}, - "usage_start": {"readonly": True}, - "usage_end": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "sku": {"key": "sku", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "description": {"key": "properties.description", "type": "str"}, - "filter_enabled": {"key": "properties.filterEnabled", "type": "bool"}, - "grouping_enabled": {"key": "properties.groupingEnabled", "type": "bool"}, - "data": {"key": "properties.data", "type": "[str]"}, - "total": {"key": "properties.total", "type": "int"}, - "category": {"key": "properties.category", "type": "str"}, - "usage_start": {"key": "properties.usageStart", "type": "iso-8601"}, - "usage_end": {"key": "properties.usageEnd", "type": "iso-8601"}, - "next_link": {"key": "properties.nextLink", "type": "str"}, - } - - def __init__(self, *, data: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword data: Dimension data. - :paramtype data: list[str] - """ - super().__init__(**kwargs) - self.description: Optional[str] = None - self.filter_enabled: Optional[bool] = None - self.grouping_enabled: Optional[bool] = None - self.data = data - self.total: Optional[int] = None - self.category: Optional[str] = None - self.usage_start: Optional[datetime.datetime] = None - self.usage_end: Optional[datetime.datetime] = None - self.next_link: Optional[str] = None - - -class DimensionsListResult(_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. - - :ivar value: The list of dimensions. - :vartype value: list[~azure.mgmt.costmanagement.models.Dimension] - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Dimension]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Dimension"]] = None - - -class DismissAlertPayload(_serialization.Model): - """The request payload to update an alert. - - :ivar definition: defines the type of alert. - :vartype definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition - :ivar description: Alert description. - :vartype description: str - :ivar source: Source of alert. Known values are: "Preset" and "User". - :vartype source: str or ~azure.mgmt.costmanagement.models.AlertSource - :ivar details: Alert details. - :vartype details: ~azure.mgmt.costmanagement.models.AlertPropertiesDetails - :ivar cost_entity_id: related budget. - :vartype cost_entity_id: str - :ivar status: alert status. Known values are: "None", "Active", "Overridden", "Resolved", and - "Dismissed". - :vartype status: str or ~azure.mgmt.costmanagement.models.AlertStatus - :ivar creation_time: dateTime in which alert was created. - :vartype creation_time: str - :ivar close_time: dateTime in which alert was closed. - :vartype close_time: str - :ivar modification_time: dateTime in which alert was last modified. - :vartype modification_time: str - :ivar status_modification_user_name: User who last modified the alert. - :vartype status_modification_user_name: str - :ivar status_modification_time: dateTime in which the alert status was last modified. - :vartype status_modification_time: str - """ - - _attribute_map = { - "definition": {"key": "properties.definition", "type": "AlertPropertiesDefinition"}, - "description": {"key": "properties.description", "type": "str"}, - "source": {"key": "properties.source", "type": "str"}, - "details": {"key": "properties.details", "type": "AlertPropertiesDetails"}, - "cost_entity_id": {"key": "properties.costEntityId", "type": "str"}, - "status": {"key": "properties.status", "type": "str"}, - "creation_time": {"key": "properties.creationTime", "type": "str"}, - "close_time": {"key": "properties.closeTime", "type": "str"}, - "modification_time": {"key": "properties.modificationTime", "type": "str"}, - "status_modification_user_name": {"key": "properties.statusModificationUserName", "type": "str"}, - "status_modification_time": {"key": "properties.statusModificationTime", "type": "str"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword definition: defines the type of alert. - :paramtype definition: ~azure.mgmt.costmanagement.models.AlertPropertiesDefinition - :keyword description: Alert description. - :paramtype description: str - :keyword source: Source of alert. Known values are: "Preset" and "User". - :paramtype source: str or ~azure.mgmt.costmanagement.models.AlertSource - :keyword details: Alert details. - :paramtype details: ~azure.mgmt.costmanagement.models.AlertPropertiesDetails - :keyword cost_entity_id: related budget. - :paramtype cost_entity_id: str - :keyword status: alert status. Known values are: "None", "Active", "Overridden", "Resolved", - and "Dismissed". - :paramtype status: str or ~azure.mgmt.costmanagement.models.AlertStatus - :keyword creation_time: dateTime in which alert was created. - :paramtype creation_time: str - :keyword close_time: dateTime in which alert was closed. - :paramtype close_time: str - :keyword modification_time: dateTime in which alert was last modified. - :paramtype modification_time: str - :keyword status_modification_user_name: User who last modified the alert. - :paramtype status_modification_user_name: str - :keyword status_modification_time: dateTime in which the alert status was last modified. - :paramtype status_modification_time: str - """ - super().__init__(**kwargs) - self.definition = definition - self.description = description - self.source = source - self.details = details - self.cost_entity_id = cost_entity_id - self.status = status - self.creation_time = creation_time - self.close_time = close_time - self.modification_time = modification_time - self.status_modification_user_name = status_modification_user_name - self.status_modification_time = status_modification_time - - -class DownloadURL(_serialization.Model): - """The URL to download the generated report. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar expiry_time: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype expiry_time: ~datetime.datetime - :ivar valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype valid_till: ~datetime.datetime - :ivar download_url: The URL to download the generated report. - :vartype download_url: str - """ - - _validation = { - "expiry_time": {"readonly": True}, - } - - _attribute_map = { - "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, - "valid_till": {"key": "validTill", "type": "iso-8601"}, - "download_url": {"key": "downloadUrl", "type": "str"}, - } - - def __init__( - self, *, valid_till: Optional[datetime.datetime] = None, download_url: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :paramtype valid_till: ~datetime.datetime - :keyword download_url: The URL to download the generated report. - :paramtype download_url: str - """ - super().__init__(**kwargs) - self.expiry_time: Optional[datetime.datetime] = None - self.valid_till = valid_till - self.download_url = download_url - - -class EAPriceSheetProperties(_serialization.Model): - """The properties of the EA price sheet. Properties supported with version 2025-03-01 are as - below. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar enrollment_number: Unique identifier for the EA billing account. - :vartype enrollment_number: str - :ivar service_family: Type of Azure service. For example, Compute, Analytics, and Security. - :vartype service_family: float - :ivar product: Name of the product accruing the charges. - :vartype product: str - :ivar product_id: Unique identifier for the product whose meter is consumed. - :vartype product_id: str - :ivar sku_id: Unique identifier of the SKU. - :vartype sku_id: str - :ivar unit_of_measure: How usage is measured for the service. Note: The field “Unit” has been - removed with version 2023-11-01 as a duplicate of “UnitofMeasure”, please use the field - “UnitOfMeasure”. - :vartype unit_of_measure: str - :ivar meter_id: Unique identifier of the meter. - :vartype meter_id: str - :ivar meter_name: Name of the meter. The meter represents the deployable resource of an Azure - service. - :vartype meter_name: str - :ivar meter_type: Name of the meter type. - :vartype meter_type: str - :ivar offer_id: Determines the Azure offer associated with this meter. [Learn more about Azure - offers] (https://azure.microsoft.com/en-us/support/legal/offer-details/). - :vartype offer_id: str - :ivar meter_category: Name of the classification category for the meter. For example, Cloud - services, Networking, etc. - :vartype meter_category: str - :ivar meter_sub_category: Name of the meter subclassification category. - :vartype meter_sub_category: str - :ivar meter_region: Name of the Azure region where the meter for the service is available. - :vartype meter_region: str - :ivar effective_start_date: Effective start date of the Price Sheet billing period. - :vartype effective_start_date: ~datetime.datetime - :ivar effective_end_date: Effective end date of the Price Sheet billing period. - :vartype effective_end_date: ~datetime.datetime - :ivar unit_price: The per-unit price at the time of billing for a given product or service, - inclusive of any negotiated discounts on top of the market price. - - For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year - commitment including discounts. - - Note: The unit price isn't the same as the effective price in usage details downloads when - services have differential prices across tiers. - - If services have multi-tiered pricing, the effective price is a blended rate across the tiers - and doesn't show a tier-specific unit price. The blended price or effective price is the net - price for the consumed quantity spanning across the multiple tiers (where each tier has a - specific unit price). - :vartype unit_price: str - :ivar base_price: The unit price at the time the customer signs on or the unit price at the - time of service meter GA launch if it is after sign-on. - - This is applicable for Enterprise Agreement users. - :vartype base_price: str - :ivar market_price: The current list price for a given product or service. This price is - without any negotiations and is based on your Microsoft Agreement type. - - For PriceType Consumption, market price is reflected as the pay-as-you-go price. - - For PriceType Savings Plan, market price reflects the Savings plan benefit on top of - pay-as-you-go price for the corresponding commitment term. - - For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year - commitment. - - Note: For EA customers with no negotiations, market price may appear rounded to a different - decimal precision than unit price. - :vartype market_price: str - :ivar included_quantity: Quantities of a specific service to which an EA customer is entitled - to consume without incremental charges. - :vartype included_quantity: str - :ivar currency_code: Currency in which the Enterprise Agreement was signed. - :vartype currency_code: str - :ivar term: Term length for Azure Savings Plan or Reservation term – one year or three years - (P1Y or P3Y). - :vartype term: str - :ivar price_type: Price type for a product. For example, an Azure resource with a pay-as-you-go - rate with priceType as Consumption. Other price types include ReservedInstance and Savings - Plan. - :vartype price_type: str - :ivar part_number: Part number associated with the meter. - :vartype part_number: str - """ - - _validation = { - "enrollment_number": {"readonly": True}, - "service_family": {"readonly": True}, - "product": {"readonly": True}, - "product_id": {"readonly": True}, - "sku_id": {"readonly": True}, - "unit_of_measure": {"readonly": True}, - "meter_id": {"readonly": True}, - "meter_name": {"readonly": True}, - "meter_type": {"readonly": True}, - "offer_id": {"readonly": True}, - "meter_category": {"readonly": True}, - "meter_sub_category": {"readonly": True}, - "meter_region": {"readonly": True}, - "effective_start_date": {"readonly": True}, - "effective_end_date": {"readonly": True}, - "unit_price": {"readonly": True}, - "base_price": {"readonly": True}, - "market_price": {"readonly": True}, - "included_quantity": {"readonly": True}, - "currency_code": {"readonly": True}, - "term": {"readonly": True}, - "price_type": {"readonly": True}, - "part_number": {"readonly": True}, - } - - _attribute_map = { - "enrollment_number": {"key": "enrollmentNumber", "type": "str"}, - "service_family": {"key": "serviceFamily", "type": "float"}, - "product": {"key": "product", "type": "str"}, - "product_id": {"key": "productId", "type": "str"}, - "sku_id": {"key": "skuId", "type": "str"}, - "unit_of_measure": {"key": "unitOfMeasure", "type": "str"}, - "meter_id": {"key": "meterId", "type": "str"}, - "meter_name": {"key": "meterName", "type": "str"}, - "meter_type": {"key": "meterType", "type": "str"}, - "offer_id": {"key": "offerId", "type": "str"}, - "meter_category": {"key": "meterCategory", "type": "str"}, - "meter_sub_category": {"key": "meterSubCategory", "type": "str"}, - "meter_region": {"key": "meterRegion", "type": "str"}, - "effective_start_date": {"key": "effectiveStartDate", "type": "iso-8601"}, - "effective_end_date": {"key": "effectiveEndDate", "type": "iso-8601"}, - "unit_price": {"key": "unitPrice", "type": "str"}, - "base_price": {"key": "basePrice", "type": "str"}, - "market_price": {"key": "marketPrice", "type": "str"}, - "included_quantity": {"key": "includedQuantity", "type": "str"}, - "currency_code": {"key": "currencyCode", "type": "str"}, - "term": {"key": "term", "type": "str"}, - "price_type": {"key": "priceType", "type": "str"}, - "part_number": {"key": "partNumber", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.enrollment_number: Optional[str] = None - self.service_family: Optional[float] = None - self.product: Optional[str] = None - self.product_id: Optional[str] = None - self.sku_id: Optional[str] = None - self.unit_of_measure: Optional[str] = None - self.meter_id: Optional[str] = None - self.meter_name: Optional[str] = None - self.meter_type: Optional[str] = None - self.offer_id: Optional[str] = None - self.meter_category: Optional[str] = None - self.meter_sub_category: Optional[str] = None - self.meter_region: Optional[str] = None - self.effective_start_date: Optional[datetime.datetime] = None - self.effective_end_date: Optional[datetime.datetime] = None - self.unit_price: Optional[str] = None - self.base_price: Optional[str] = None - self.market_price: Optional[str] = None - self.included_quantity: Optional[str] = None - self.currency_code: Optional[str] = None - self.term: Optional[str] = None - self.price_type: Optional[str] = None - self.part_number: Optional[str] = None - - -class ErrorAdditionalInfo(_serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: JSON - """ - - _validation = { - "type": {"readonly": True}, - "info": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "info": {"key": "info", "type": "object"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.info: Optional[JSON] = None - - -class ErrorDetail(_serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.costmanagement.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.costmanagement.models.ErrorAdditionalInfo] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "target": {"readonly": True}, - "details": {"readonly": True}, - "additional_info": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetail]"}, - "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.message: Optional[str] = None - self.target: Optional[str] = None - self.details: Optional[list["_models.ErrorDetail"]] = None - self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None - - -class ErrorDetailAutoGenerated(_serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.costmanagement.models.ErrorAdditionalInfo] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "target": {"readonly": True}, - "details": {"readonly": True}, - "additional_info": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetailAutoGenerated]"}, - "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.message: Optional[str] = None - self.target: Optional[str] = None - self.details: Optional[list["_models.ErrorDetailAutoGenerated"]] = None - self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None - - -class ErrorDetails(_serialization.Model): - """The details of the error. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.message: Optional[str] = None - - -class ErrorDetailsWithNestedDetails(ErrorDetails): - """The details of the error. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - :ivar details: The additional details of the error. - :vartype details: list[~azure.mgmt.costmanagement.models.ErrorDetailsWithNestedDetails] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "details": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetailsWithNestedDetails]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.details: Optional[list["_models.ErrorDetailsWithNestedDetails"]] = None - - -class ErrorResponse(_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 - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetails"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs: Any) -> None: - """ - :keyword error: The details of the error. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetails - """ - super().__init__(**kwargs) - self.error = error - - -class ErrorResponseAutoGenerated(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetail - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetail - """ - super().__init__(**kwargs) - self.error = error - - -class ErrorResponseAutoGenerated2(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetailAutoGenerated"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetailAutoGenerated"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetailAutoGenerated - """ - super().__init__(**kwargs) - self.error = error - - -class ErrorResponseWithNestedDetails(_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.ErrorDetailsWithNestedDetails - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetailsWithNestedDetails"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetailsWithNestedDetails"] = None, **kwargs: Any) -> None: - """ - :keyword error: The details of the error. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetailsWithNestedDetails - """ - super().__init__(**kwargs) - self.error = error - - -class Export(CostManagementProxyResource): - """An export resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar e_tag: 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. - :vartype e_tag: str - :ivar identity: The managed identity associated with Export. - :vartype identity: ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity - :ivar location: The location of the Export's managed identity. Only required when utilizing - managed identity. - :vartype location: str - :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". - :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType - :ivar delivery_info: Has delivery information for the export. - :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :ivar definition: Has the definition for the export. - :vartype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :ivar run_history: If requested, has the most recent run history for the export. - :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :ivar partition_data: If set to true, exported data will be partitioned by size and placed in a - blob directory together with a manifest file. - :vartype partition_data: bool - :ivar data_overwrite_behavior: Allow customers to select overwrite - data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same - month in customer storage account. By default set to CreateNewReport. Known values are: - "OverwritePreviousReport" and "CreateNewReport". - :vartype data_overwrite_behavior: str or - ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType - :ivar compression_mode: Allow customers to select compress data for exports. This setting will - enable destination file compression scheme at runtime. By default set to None. Gzip is for csv - and snappy for parquet. Known values are: "gzip", "snappy", and "none". - :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType - :ivar export_description: The export description set by customer at time of export - creation/update. - :vartype export_description: str - :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the - next run time. - :vartype next_run_time_estimate: ~datetime.datetime - :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended - state. This is not populated currently. - :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext - :ivar schedule: Has schedule information for the export. - :vartype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "next_run_time_estimate": {"readonly": True}, - "system_suspension_context": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "identity": {"key": "identity", "type": "SystemAssignedServiceIdentity"}, - "location": {"key": "location", "type": "str"}, - "format": {"key": "properties.format", "type": "str"}, - "delivery_info": {"key": "properties.deliveryInfo", "type": "ExportDeliveryInfo"}, - "definition": {"key": "properties.definition", "type": "ExportDefinition"}, - "run_history": {"key": "properties.runHistory", "type": "ExportExecutionListResult"}, - "partition_data": {"key": "properties.partitionData", "type": "bool"}, - "data_overwrite_behavior": {"key": "properties.dataOverwriteBehavior", "type": "str"}, - "compression_mode": {"key": "properties.compressionMode", "type": "str"}, - "export_description": {"key": "properties.exportDescription", "type": "str"}, - "next_run_time_estimate": {"key": "properties.nextRunTimeEstimate", "type": "iso-8601"}, - "system_suspension_context": {"key": "properties.systemSuspensionContext", "type": "ExportSuspensionContext"}, - "schedule": {"key": "properties.schedule", "type": "ExportSchedule"}, - } - - def __init__( - self, - *, - e_tag: Optional[str] = None, - identity: Optional["_models.SystemAssignedServiceIdentity"] = None, - location: 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, - data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, - compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, - export_description: Optional[str] = None, - schedule: Optional["_models.ExportSchedule"] = None, - **kwargs: Any - ) -> None: - """ - :keyword e_tag: 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. - :paramtype e_tag: str - :keyword identity: The managed identity associated with Export. - :paramtype identity: ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentity - :keyword location: The location of the Export's managed identity. Only required when utilizing - managed identity. - :paramtype location: str - :keyword format: The format of the export being delivered. Known values are: "Csv" and - "Parquet". - :paramtype format: str or ~azure.mgmt.costmanagement.models.FormatType - :keyword delivery_info: Has delivery information for the export. - :paramtype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :keyword definition: Has the definition for the export. - :paramtype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :keyword run_history: If requested, has the most recent run history for the export. - :paramtype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :keyword partition_data: If set to true, exported data will be partitioned by size and placed - in a blob directory together with a manifest file. - :paramtype partition_data: bool - :keyword data_overwrite_behavior: Allow customers to select overwrite - data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same - month in customer storage account. By default set to CreateNewReport. Known values are: - "OverwritePreviousReport" and "CreateNewReport". - :paramtype data_overwrite_behavior: str or - ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType - :keyword compression_mode: Allow customers to select compress data for exports. This setting - will enable destination file compression scheme at runtime. By default set to None. Gzip is for - csv and snappy for parquet. Known values are: "gzip", "snappy", and "none". - :paramtype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType - :keyword export_description: The export description set by customer at time of export - creation/update. - :paramtype export_description: str - :keyword schedule: Has schedule information for the export. - :paramtype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule - """ - super().__init__(e_tag=e_tag, **kwargs) - self.identity = identity - self.location = location - self.format = format - self.delivery_info = delivery_info - self.definition = definition - self.run_history = run_history - self.partition_data = partition_data - self.data_overwrite_behavior = data_overwrite_behavior - self.compression_mode = compression_mode - self.export_description = export_description - self.next_run_time_estimate: Optional[datetime.datetime] = None - self.system_suspension_context: Optional["_models.ExportSuspensionContext"] = None - self.schedule = schedule - - -class ExportDataset(_serialization.Model): - """The definition for data in the export. - - :ivar granularity: The granularity of rows in the export. Currently 'Daily' is supported for - most cases. Known values are: "Daily" and "Monthly". - :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType - :ivar configuration: The export dataset configuration. - :vartype configuration: ~azure.mgmt.costmanagement.models.ExportDatasetConfiguration - """ - - _attribute_map = { - "granularity": {"key": "granularity", "type": "str"}, - "configuration": {"key": "configuration", "type": "ExportDatasetConfiguration"}, - } - - def __init__( - self, - *, - granularity: Optional[Union[str, "_models.GranularityType"]] = None, - configuration: Optional["_models.ExportDatasetConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword granularity: The granularity of rows in the export. Currently 'Daily' is supported for - most cases. Known values are: "Daily" and "Monthly". - :paramtype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType - :keyword configuration: The export dataset configuration. - :paramtype configuration: ~azure.mgmt.costmanagement.models.ExportDatasetConfiguration - """ - super().__init__(**kwargs) - self.granularity = granularity - self.configuration = configuration - - -class ExportDatasetConfiguration(_serialization.Model): - """This is on path to deprecation and will not be supported going forward. - - :ivar columns: 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). - :vartype columns: list[str] - :ivar data_version: The data version for the selected for the export. If not provided then the - export will default to latest data version. - :vartype data_version: str - :ivar filters: Filters associated with the data sets. - :vartype filters: list[~azure.mgmt.costmanagement.models.FilterItems] - """ - - _attribute_map = { - "columns": {"key": "columns", "type": "[str]"}, - "data_version": {"key": "dataVersion", "type": "str"}, - "filters": {"key": "filters", "type": "[FilterItems]"}, - } - - def __init__( - self, - *, - columns: Optional[list[str]] = None, - data_version: Optional[str] = None, - filters: Optional[list["_models.FilterItems"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword columns: 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). - :paramtype columns: list[str] - :keyword data_version: The data version for the selected for the export. If not provided then - the export will default to latest data version. - :paramtype data_version: str - :keyword filters: Filters associated with the data sets. - :paramtype filters: list[~azure.mgmt.costmanagement.models.FilterItems] - """ - super().__init__(**kwargs) - self.columns = columns - self.data_version = data_version - self.filters = filters - - -class ExportDefinition(_serialization.Model): - """The definition of an export. - - All required parameters must be populated in order to send to server. - - :ivar type: 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", "AmortizedCost", "FocusCost", - "PriceSheet", "ReservationTransactions", "ReservationRecommendations", and - "ReservationDetails". - :vartype type: str or ~azure.mgmt.costmanagement.models.ExportType - :ivar timeframe: 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", "Custom", and "TheCurrentMonth". - :vartype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType - :ivar time_period: Has time period for pulling data for the export. - :vartype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod - :ivar data_set: The definition for data in the export. - :vartype data_set: ~azure.mgmt.costmanagement.models.ExportDataset - """ - - _validation = { - "type": {"required": True}, - "timeframe": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "timeframe": {"key": "timeframe", "type": "str"}, - "time_period": {"key": "timePeriod", "type": "ExportTimePeriod"}, - "data_set": {"key": "dataSet", "type": "ExportDataset"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.ExportType"], - timeframe: Union[str, "_models.TimeframeType"], - time_period: Optional["_models.ExportTimePeriod"] = None, - data_set: Optional["_models.ExportDataset"] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: 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", "AmortizedCost", "FocusCost", - "PriceSheet", "ReservationTransactions", "ReservationRecommendations", and - "ReservationDetails". - :paramtype type: str or ~azure.mgmt.costmanagement.models.ExportType - :keyword timeframe: 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", "Custom", and "TheCurrentMonth". - :paramtype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType - :keyword time_period: Has time period for pulling data for the export. - :paramtype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod - :keyword data_set: The definition for data in the export. - :paramtype data_set: ~azure.mgmt.costmanagement.models.ExportDataset - """ - super().__init__(**kwargs) - self.type = type - self.timeframe = timeframe - self.time_period = time_period - self.data_set = data_set - - -class ExportDeliveryDestination(_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 server. - - :ivar type: The export delivery destination type. Currently only 'AzureBlob' is supported. - "AzureBlob" - :vartype type: str or ~azure.mgmt.costmanagement.models.DestinationType - :ivar resource_id: The resource id of the storage account where exports will be delivered. This - is not required if a sasToken and storageAccount are specified. - :vartype resource_id: str - :ivar container: The name of the container where exports will be uploaded. If the container - does not exist it will be created. Required. - :vartype container: str - :ivar root_folder_path: The name of the directory where exports will be uploaded. - :vartype root_folder_path: str - :ivar sas_token: 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. - :vartype sas_token: str - :ivar storage_account: 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. - :vartype storage_account: str - """ - - _validation = { - "container": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "resource_id": {"key": "resourceId", "type": "str"}, - "container": {"key": "container", "type": "str"}, - "root_folder_path": {"key": "rootFolderPath", "type": "str"}, - "sas_token": {"key": "sasToken", "type": "str"}, - "storage_account": {"key": "storageAccount", "type": "str"}, - } - - def __init__( - self, - *, - container: str, - type: Optional[Union[str, "_models.DestinationType"]] = None, - resource_id: Optional[str] = None, - root_folder_path: Optional[str] = None, - sas_token: Optional[str] = None, - storage_account: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The export delivery destination type. Currently only 'AzureBlob' is supported. - "AzureBlob" - :paramtype type: str or ~azure.mgmt.costmanagement.models.DestinationType - :keyword resource_id: The resource id of the storage account where exports will be delivered. - This is not required if a sasToken and storageAccount are specified. - :paramtype resource_id: str - :keyword container: The name of the container where exports will be uploaded. If the container - does not exist it will be created. Required. - :paramtype container: str - :keyword root_folder_path: The name of the directory where exports will be uploaded. - :paramtype root_folder_path: str - :keyword sas_token: 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. - :paramtype sas_token: str - :keyword storage_account: 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. - :paramtype storage_account: str - """ - super().__init__(**kwargs) - self.type = type - self.resource_id = resource_id - self.container = container - self.root_folder_path = root_folder_path - self.sas_token = sas_token - self.storage_account = storage_account - - -class ExportDeliveryInfo(_serialization.Model): - """The delivery information associated with a export. - - All required parameters must be populated in order to send to server. - - :ivar destination: Has destination for the export being delivered. Required. - :vartype destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination - """ - - _validation = { - "destination": {"required": True}, - } - - _attribute_map = { - "destination": {"key": "destination", "type": "ExportDeliveryDestination"}, - } - - def __init__(self, *, destination: "_models.ExportDeliveryDestination", **kwargs: Any) -> None: - """ - :keyword destination: Has destination for the export being delivered. Required. - :paramtype destination: ~azure.mgmt.costmanagement.models.ExportDeliveryDestination - """ - super().__init__(**kwargs) - self.destination = destination - - -class ExportExecutionListResult(_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. - - :ivar value: A list of export runs. - :vartype value: list[~azure.mgmt.costmanagement.models.ExportRun] - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ExportRun]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ExportRun"]] = None - - -class ExportListResult(_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. - - :ivar value: The list of exports. - :vartype value: list[~azure.mgmt.costmanagement.models.Export] - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Export]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Export"]] = None - - -class ExportProperties(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 server. - - :ivar format: The format of the export being delivered. Known values are: "Csv" and "Parquet". - :vartype format: str or ~azure.mgmt.costmanagement.models.FormatType - :ivar delivery_info: Has delivery information for the export. Required. - :vartype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :ivar definition: Has the definition for the export. Required. - :vartype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :ivar run_history: If requested, has the most recent run history for the export. - :vartype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :ivar partition_data: If set to true, exported data will be partitioned by size and placed in a - blob directory together with a manifest file. - :vartype partition_data: bool - :ivar data_overwrite_behavior: Allow customers to select overwrite - data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same - month in customer storage account. By default set to CreateNewReport. Known values are: - "OverwritePreviousReport" and "CreateNewReport". - :vartype data_overwrite_behavior: str or - ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType - :ivar compression_mode: Allow customers to select compress data for exports. This setting will - enable destination file compression scheme at runtime. By default set to None. Gzip is for csv - and snappy for parquet. Known values are: "gzip", "snappy", and "none". - :vartype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType - :ivar export_description: The export description set by customer at time of export - creation/update. - :vartype export_description: str - :ivar next_run_time_estimate: If the export has an active schedule, provides an estimate of the - next run time. - :vartype next_run_time_estimate: ~datetime.datetime - :ivar system_suspension_context: The export suspension reason if export is in SystemSuspended - state. This is not populated currently. - :vartype system_suspension_context: ~azure.mgmt.costmanagement.models.ExportSuspensionContext - :ivar schedule: Has schedule information for the export. - :vartype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule - """ - - _validation = { - "delivery_info": {"required": True}, - "definition": {"required": True}, - "next_run_time_estimate": {"readonly": True}, - "system_suspension_context": {"readonly": True}, - } - - _attribute_map = { - "format": {"key": "format", "type": "str"}, - "delivery_info": {"key": "deliveryInfo", "type": "ExportDeliveryInfo"}, - "definition": {"key": "definition", "type": "ExportDefinition"}, - "run_history": {"key": "runHistory", "type": "ExportExecutionListResult"}, - "partition_data": {"key": "partitionData", "type": "bool"}, - "data_overwrite_behavior": {"key": "dataOverwriteBehavior", "type": "str"}, - "compression_mode": {"key": "compressionMode", "type": "str"}, - "export_description": {"key": "exportDescription", "type": "str"}, - "next_run_time_estimate": {"key": "nextRunTimeEstimate", "type": "iso-8601"}, - "system_suspension_context": {"key": "systemSuspensionContext", "type": "ExportSuspensionContext"}, - "schedule": {"key": "schedule", "type": "ExportSchedule"}, - } - - def __init__( - self, - *, - 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, - data_overwrite_behavior: Optional[Union[str, "_models.DataOverwriteBehaviorType"]] = None, - compression_mode: Optional[Union[str, "_models.CompressionModeType"]] = None, - export_description: Optional[str] = None, - schedule: Optional["_models.ExportSchedule"] = None, - **kwargs: Any - ) -> None: - """ - :keyword format: The format of the export being delivered. Known values are: "Csv" and - "Parquet". - :paramtype format: str or ~azure.mgmt.costmanagement.models.FormatType - :keyword delivery_info: Has delivery information for the export. Required. - :paramtype delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :keyword definition: Has the definition for the export. Required. - :paramtype definition: ~azure.mgmt.costmanagement.models.ExportDefinition - :keyword run_history: If requested, has the most recent run history for the export. - :paramtype run_history: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :keyword partition_data: If set to true, exported data will be partitioned by size and placed - in a blob directory together with a manifest file. - :paramtype partition_data: bool - :keyword data_overwrite_behavior: Allow customers to select overwrite - data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same - month in customer storage account. By default set to CreateNewReport. Known values are: - "OverwritePreviousReport" and "CreateNewReport". - :paramtype data_overwrite_behavior: str or - ~azure.mgmt.costmanagement.models.DataOverwriteBehaviorType - :keyword compression_mode: Allow customers to select compress data for exports. This setting - will enable destination file compression scheme at runtime. By default set to None. Gzip is for - csv and snappy for parquet. Known values are: "gzip", "snappy", and "none". - :paramtype compression_mode: str or ~azure.mgmt.costmanagement.models.CompressionModeType - :keyword export_description: The export description set by customer at time of export - creation/update. - :paramtype export_description: str - :keyword schedule: Has schedule information for the export. - :paramtype schedule: ~azure.mgmt.costmanagement.models.ExportSchedule - """ - super().__init__( - format=format, - delivery_info=delivery_info, - definition=definition, - run_history=run_history, - partition_data=partition_data, - data_overwrite_behavior=data_overwrite_behavior, - compression_mode=compression_mode, - export_description=export_description, - **kwargs - ) - self.schedule = schedule - - -class ExportRecurrencePeriod(_serialization.Model): - """The start and end date for recurrence schedule. - - All required parameters must be populated in order to send to server. - - :ivar from_property: The start date of recurrence. Required. - :vartype from_property: ~datetime.datetime - :ivar to: The end date of recurrence. - :vartype to: ~datetime.datetime - """ - - _validation = { - "from_property": {"required": True}, - } - - _attribute_map = { - "from_property": {"key": "from", "type": "iso-8601"}, - "to": {"key": "to", "type": "iso-8601"}, - } - - def __init__( - self, *, from_property: datetime.datetime, to: Optional[datetime.datetime] = None, **kwargs: Any - ) -> None: - """ - :keyword from_property: The start date of recurrence. Required. - :paramtype from_property: ~datetime.datetime - :keyword to: The end date of recurrence. - :paramtype to: ~datetime.datetime - """ - super().__init__(**kwargs) - self.from_property = from_property - self.to = to - - -class ExportRun(CostManagementProxyResource): - """An export run. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar e_tag: 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. - :vartype e_tag: str - :ivar execution_type: The type of the export run. Known values are: "OnDemand" and "Scheduled". - :vartype execution_type: str or ~azure.mgmt.costmanagement.models.ExecutionType - :ivar status: The last known status of the export run. Known values are: "Queued", - "InProgress", "Completed", "Failed", "Timeout", "NewDataNotAvailable", and "DataNotAvailable". - :vartype status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus - :ivar submitted_by: The identifier for the entity that triggered the export. For on-demand runs - it is the user email. For scheduled runs it is 'System'. - :vartype submitted_by: str - :ivar submitted_time: The time when export was queued to be run. - :vartype submitted_time: ~datetime.datetime - :ivar processing_start_time: The time when export was picked up to be run. - :vartype processing_start_time: ~datetime.datetime - :ivar processing_end_time: The time when the export run finished. - :vartype processing_end_time: ~datetime.datetime - :ivar start_date: The start datetime for the export. - :vartype start_date: ~datetime.datetime - :ivar end_date: The end datetime for the export. - :vartype end_date: ~datetime.datetime - :ivar file_name: The name of the exported file. - :vartype file_name: str - :ivar manifest_file: The manifest file location(URI location) for the exported files. - :vartype manifest_file: str - :ivar run_settings: The export settings that were in effect for this run. - :vartype run_settings: ~azure.mgmt.costmanagement.models.CommonExportProperties - :ivar error: The details of any error. - :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetails - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "execution_type": {"key": "properties.executionType", "type": "str"}, - "status": {"key": "properties.status", "type": "str"}, - "submitted_by": {"key": "properties.submittedBy", "type": "str"}, - "submitted_time": {"key": "properties.submittedTime", "type": "iso-8601"}, - "processing_start_time": {"key": "properties.processingStartTime", "type": "iso-8601"}, - "processing_end_time": {"key": "properties.processingEndTime", "type": "iso-8601"}, - "start_date": {"key": "properties.startDate", "type": "iso-8601"}, - "end_date": {"key": "properties.endDate", "type": "iso-8601"}, - "file_name": {"key": "properties.fileName", "type": "str"}, - "manifest_file": {"key": "properties.manifestFile", "type": "str"}, - "run_settings": {"key": "properties.runSettings", "type": "CommonExportProperties"}, - "error": {"key": "properties.error", "type": "ErrorDetails"}, - } - - def __init__( - self, - *, - 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, - start_date: Optional[datetime.datetime] = None, - end_date: Optional[datetime.datetime] = None, - file_name: Optional[str] = None, - manifest_file: Optional[str] = None, - run_settings: Optional["_models.CommonExportProperties"] = None, - error: Optional["_models.ErrorDetails"] = None, - **kwargs: Any - ) -> None: - """ - :keyword e_tag: 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. - :paramtype e_tag: str - :keyword execution_type: The type of the export run. Known values are: "OnDemand" and - "Scheduled". - :paramtype execution_type: str or ~azure.mgmt.costmanagement.models.ExecutionType - :keyword status: The last known status of the export run. Known values are: "Queued", - "InProgress", "Completed", "Failed", "Timeout", "NewDataNotAvailable", and "DataNotAvailable". - :paramtype status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus - :keyword submitted_by: The identifier for the entity that triggered the export. For on-demand - runs it is the user email. For scheduled runs it is 'System'. - :paramtype submitted_by: str - :keyword submitted_time: The time when export was queued to be run. - :paramtype submitted_time: ~datetime.datetime - :keyword processing_start_time: The time when export was picked up to be run. - :paramtype processing_start_time: ~datetime.datetime - :keyword processing_end_time: The time when the export run finished. - :paramtype processing_end_time: ~datetime.datetime - :keyword start_date: The start datetime for the export. - :paramtype start_date: ~datetime.datetime - :keyword end_date: The end datetime for the export. - :paramtype end_date: ~datetime.datetime - :keyword file_name: The name of the exported file. - :paramtype file_name: str - :keyword manifest_file: The manifest file location(URI location) for the exported files. - :paramtype manifest_file: str - :keyword run_settings: The export settings that were in effect for this run. - :paramtype run_settings: ~azure.mgmt.costmanagement.models.CommonExportProperties - :keyword error: The details of any error. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetails - """ - super().__init__(e_tag=e_tag, **kwargs) - self.execution_type = execution_type - self.status = status - self.submitted_by = submitted_by - self.submitted_time = submitted_time - self.processing_start_time = processing_start_time - self.processing_end_time = processing_end_time - self.start_date = start_date - self.end_date = end_date - self.file_name = file_name - self.manifest_file = manifest_file - self.run_settings = run_settings - self.error = error - - -class ExportRunRequest(_serialization.Model): - """The export run request. - - :ivar time_period: Has time period for pulling data for the export. - :vartype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod - """ - - _attribute_map = { - "time_period": {"key": "timePeriod", "type": "ExportTimePeriod"}, - } - - def __init__(self, *, time_period: Optional["_models.ExportTimePeriod"] = None, **kwargs: Any) -> None: - """ - :keyword time_period: Has time period for pulling data for the export. - :paramtype time_period: ~azure.mgmt.costmanagement.models.ExportTimePeriod - """ - super().__init__(**kwargs) - self.time_period = time_period - - -class ExportSchedule(_serialization.Model): - """The schedule associated with the export. - - :ivar status: The status of the export's schedule. If 'Inactive', the export's schedule is - paused. To enable export set the status to be Active and then make a PUT request. Known values - are: "Active" and "Inactive". - :vartype status: str or ~azure.mgmt.costmanagement.models.StatusType - :ivar recurrence: The schedule recurrence. Known values are: "Daily", "Weekly", "Monthly", and - "Annually". - :vartype recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType - :ivar recurrence_period: 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. - :vartype recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "recurrence": {"key": "recurrence", "type": "str"}, - "recurrence_period": {"key": "recurrencePeriod", "type": "ExportRecurrencePeriod"}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "_models.StatusType"]] = None, - recurrence: Optional[Union[str, "_models.RecurrenceType"]] = None, - recurrence_period: Optional["_models.ExportRecurrencePeriod"] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The status of the export's schedule. If 'Inactive', the export's schedule is - paused. To enable export set the status to be Active and then make a PUT request. Known values - are: "Active" and "Inactive". - :paramtype status: str or ~azure.mgmt.costmanagement.models.StatusType - :keyword recurrence: The schedule recurrence. Known values are: "Daily", "Weekly", "Monthly", - and "Annually". - :paramtype recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType - :keyword recurrence_period: 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. - :paramtype recurrence_period: ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod - """ - super().__init__(**kwargs) - self.status = status - self.recurrence = recurrence - self.recurrence_period = recurrence_period - - -class ExportSuspensionContext(_serialization.Model): - """The properties of the export run. This is not populated currently. - - :ivar suspension_code: The code for export suspension. - :vartype suspension_code: str - :ivar suspension_reason: The detailed reason for export suspension. - :vartype suspension_reason: str - :ivar suspension_time: The time when the export was suspended. - :vartype suspension_time: ~datetime.datetime - """ - - _attribute_map = { - "suspension_code": {"key": "suspensionCode", "type": "str"}, - "suspension_reason": {"key": "suspensionReason", "type": "str"}, - "suspension_time": {"key": "suspensionTime", "type": "iso-8601"}, - } - - def __init__( - self, - *, - suspension_code: Optional[str] = None, - suspension_reason: Optional[str] = None, - suspension_time: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword suspension_code: The code for export suspension. - :paramtype suspension_code: str - :keyword suspension_reason: The detailed reason for export suspension. - :paramtype suspension_reason: str - :keyword suspension_time: The time when the export was suspended. - :paramtype suspension_time: ~datetime.datetime - """ - super().__init__(**kwargs) - self.suspension_code = suspension_code - self.suspension_reason = suspension_reason - self.suspension_time = suspension_time - - -class ExportTimePeriod(_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 1 calendar month. - - All required parameters must be populated in order to send to server. - - :ivar from_property: The start date for export data. Required. - :vartype from_property: ~datetime.datetime - :ivar to: The end date for export data. Required. - :vartype to: ~datetime.datetime - """ - - _validation = { - "from_property": {"required": True}, - "to": {"required": True}, - } - - _attribute_map = { - "from_property": {"key": "from", "type": "iso-8601"}, - "to": {"key": "to", "type": "iso-8601"}, - } - - def __init__(self, *, from_property: datetime.datetime, to: datetime.datetime, **kwargs: Any) -> None: - """ - :keyword from_property: The start date for export data. Required. - :paramtype from_property: ~datetime.datetime - :keyword to: The end date for export data. Required. - :paramtype to: ~datetime.datetime - """ - super().__init__(**kwargs) - self.from_property = from_property - self.to = to - - -class FileDestination(_serialization.Model): - """Destination of the view data. This is optional. Currently only CSV format is supported. - - :ivar file_formats: Destination of the view data. Currently only CSV format is supported. - :vartype file_formats: list[str or ~azure.mgmt.costmanagement.models.FileFormat] - """ - - _attribute_map = { - "file_formats": {"key": "fileFormats", "type": "[str]"}, - } - - def __init__(self, *, file_formats: Optional[list[Union[str, "_models.FileFormat"]]] = None, **kwargs: Any) -> None: - """ - :keyword file_formats: Destination of the view data. Currently only CSV format is supported. - :paramtype file_formats: list[str or ~azure.mgmt.costmanagement.models.FileFormat] - """ - super().__init__(**kwargs) - self.file_formats = file_formats - - -class FilterItems(_serialization.Model): - """Will contain the filter name and value to operate on. This is currently only supported for - Export Definition type of ReservationRecommendations. - - :ivar name: The name of the filter. This is currently only supported for Export Definition type - of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', - 'ResourceType']. Known values are: "ReservationScope", "ResourceType", and "LookBackPeriod". - :vartype name: str or ~azure.mgmt.costmanagement.models.FilterItemNames - :ivar value: Value to filter by. Currently values supported per name are, for - 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported - values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values - are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', - 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', - 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. - :vartype value: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "_models.FilterItemNames"]] = None, - value: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The name of the filter. This is currently only supported for Export Definition - type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', - 'ResourceType']. Known values are: "ReservationScope", "ResourceType", and "LookBackPeriod". - :paramtype name: str or ~azure.mgmt.costmanagement.models.FilterItemNames - :keyword value: Value to filter by. Currently values supported per name are, for - 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported - values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values - are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', - 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', - 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. - :paramtype value: str - """ - super().__init__(**kwargs) - self.name = name - self.value = value - - -class ForecastAggregation(_serialization.Model): - """The aggregation expression to be used in the forecast. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the column to aggregate. Required. Known values are: "PreTaxCostUSD", - "Cost", "CostUSD", and "PreTaxCost". - :vartype name: str or ~azure.mgmt.costmanagement.models.FunctionName - :ivar function: The name of the aggregation function to use. Required. "Sum" - :vartype function: str or ~azure.mgmt.costmanagement.models.FunctionType - """ - - _validation = { - "name": {"required": True}, - "function": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "function": {"key": "function", "type": "str"}, - } - - def __init__( - self, *, name: Union[str, "_models.FunctionName"], function: Union[str, "_models.FunctionType"], **kwargs: Any - ) -> None: - """ - :keyword name: The name of the column to aggregate. Required. Known values are: - "PreTaxCostUSD", "Cost", "CostUSD", and "PreTaxCost". - :paramtype name: str or ~azure.mgmt.costmanagement.models.FunctionName - :keyword function: The name of the aggregation function to use. Required. "Sum" - :paramtype function: str or ~azure.mgmt.costmanagement.models.FunctionType - """ - super().__init__(**kwargs) - self.name = name - self.function = function - - -class ForecastColumn(_serialization.Model): - """Forecast column properties. - - :ivar name: The name of column. - :vartype name: str - :ivar type: The type of column. - :vartype type: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: The name of column. - :paramtype name: str - :keyword type: The type of column. - :paramtype type: str - """ - super().__init__(**kwargs) - self.name = name - self.type = type - - -class ForecastComparisonExpression(_serialization.Model): - """The comparison expression to be used in the forecast. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the column to use in comparison. Required. - :vartype name: str - :ivar operator: The operator to use for comparison. Required. "In" - :vartype operator: str or ~azure.mgmt.costmanagement.models.ForecastOperatorType - :ivar values: Array of values to use for comparison. Required. - :vartype values: list[str] - """ - - _validation = { - "name": {"required": True}, - "operator": {"required": True}, - "values": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "values": {"key": "values", "type": "[str]"}, - } - - def __init__( - self, *, name: str, operator: Union[str, "_models.ForecastOperatorType"], values: list[str], **kwargs: Any - ) -> None: - """ - :keyword name: The name of the column to use in comparison. Required. - :paramtype name: str - :keyword operator: The operator to use for comparison. Required. "In" - :paramtype operator: str or ~azure.mgmt.costmanagement.models.ForecastOperatorType - :keyword values: Array of values to use for comparison. Required. - :paramtype values: list[str] - """ - super().__init__(**kwargs) - self.name = name - self.operator = operator - self.values = values - - -class ForecastDataset(_serialization.Model): - """The definition of data present in the forecast. - - All required parameters must be populated in order to send to server. - - :ivar granularity: The granularity of rows in the forecast. Known values are: "Daily" and - "Monthly". - :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType - :ivar configuration: Has configuration information for the data in the export. The - configuration will be ignored if aggregation and grouping are provided. - :vartype configuration: ~azure.mgmt.costmanagement.models.ForecastDatasetConfiguration - :ivar aggregation: 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. - :vartype aggregation: dict[str, ~azure.mgmt.costmanagement.models.ForecastAggregation] - :ivar filter: Has filter expression to use in the forecast. - :vartype filter: ~azure.mgmt.costmanagement.models.ForecastFilter - """ - - _validation = { - "aggregation": {"required": True}, - } - - _attribute_map = { - "granularity": {"key": "granularity", "type": "str"}, - "configuration": {"key": "configuration", "type": "ForecastDatasetConfiguration"}, - "aggregation": {"key": "aggregation", "type": "{ForecastAggregation}"}, - "filter": {"key": "filter", "type": "ForecastFilter"}, - } - - def __init__( - self, - *, - aggregation: dict[str, "_models.ForecastAggregation"], - granularity: Optional[Union[str, "_models.GranularityType"]] = None, - configuration: Optional["_models.ForecastDatasetConfiguration"] = None, - filter: Optional["_models.ForecastFilter"] = None, # pylint: disable=redefined-builtin - **kwargs: Any - ) -> None: - """ - :keyword granularity: The granularity of rows in the forecast. Known values are: "Daily" and - "Monthly". - :paramtype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType - :keyword configuration: Has configuration information for the data in the export. The - configuration will be ignored if aggregation and grouping are provided. - :paramtype configuration: ~azure.mgmt.costmanagement.models.ForecastDatasetConfiguration - :keyword aggregation: 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. - :paramtype aggregation: dict[str, ~azure.mgmt.costmanagement.models.ForecastAggregation] - :keyword filter: Has filter expression to use in the forecast. - :paramtype filter: ~azure.mgmt.costmanagement.models.ForecastFilter - """ - super().__init__(**kwargs) - self.granularity = granularity - self.configuration = configuration - self.aggregation = aggregation - self.filter = filter - - -class ForecastDatasetConfiguration(_serialization.Model): - """The configuration of dataset in the forecast. - - :ivar columns: 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. - :vartype columns: list[str] - """ - - _attribute_map = { - "columns": {"key": "columns", "type": "[str]"}, - } - - def __init__(self, *, columns: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword columns: 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. - :paramtype columns: list[str] - """ - super().__init__(**kwargs) - self.columns = columns - - -class ForecastDefinition(_serialization.Model): - """The definition of a forecast. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the forecast. Required. Known values are: "Usage", "ActualCost", and - "AmortizedCost". - :vartype type: str or ~azure.mgmt.costmanagement.models.ForecastType - :ivar timeframe: The time frame for pulling data for the forecast. If custom, then a specific - time period must be provided. Required. "Custom" - :vartype timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframe - :ivar time_period: Has time period for pulling data for the forecast. - :vartype time_period: ~azure.mgmt.costmanagement.models.ForecastTimePeriod - :ivar dataset: Has definition for data in this forecast. Required. - :vartype dataset: ~azure.mgmt.costmanagement.models.ForecastDataset - :ivar include_actual_cost: A boolean determining if actualCost will be included. - :vartype include_actual_cost: bool - :ivar include_fresh_partial_cost: A boolean determining if FreshPartialCost will be included. - :vartype include_fresh_partial_cost: bool - """ - - _validation = { - "type": {"required": True}, - "timeframe": {"required": True}, - "dataset": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "timeframe": {"key": "timeframe", "type": "str"}, - "time_period": {"key": "timePeriod", "type": "ForecastTimePeriod"}, - "dataset": {"key": "dataset", "type": "ForecastDataset"}, - "include_actual_cost": {"key": "includeActualCost", "type": "bool"}, - "include_fresh_partial_cost": {"key": "includeFreshPartialCost", "type": "bool"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword type: The type of the forecast. Required. Known values are: "Usage", "ActualCost", and - "AmortizedCost". - :paramtype type: str or ~azure.mgmt.costmanagement.models.ForecastType - :keyword timeframe: The time frame for pulling data for the forecast. If custom, then a - specific time period must be provided. Required. "Custom" - :paramtype timeframe: str or ~azure.mgmt.costmanagement.models.ForecastTimeframe - :keyword time_period: Has time period for pulling data for the forecast. - :paramtype time_period: ~azure.mgmt.costmanagement.models.ForecastTimePeriod - :keyword dataset: Has definition for data in this forecast. Required. - :paramtype dataset: ~azure.mgmt.costmanagement.models.ForecastDataset - :keyword include_actual_cost: A boolean determining if actualCost will be included. - :paramtype include_actual_cost: bool - :keyword include_fresh_partial_cost: A boolean determining if FreshPartialCost will be - included. - :paramtype include_fresh_partial_cost: bool - """ - super().__init__(**kwargs) - self.type = type - self.timeframe = timeframe - self.time_period = time_period - self.dataset = dataset - self.include_actual_cost = include_actual_cost - self.include_fresh_partial_cost = include_fresh_partial_cost - - -class ForecastFilter(_serialization.Model): - """The filter expression to be used in the export. - - :ivar and_property: The logical "AND" expression. Must have at least 2 items. - :vartype and_property: list[~azure.mgmt.costmanagement.models.ForecastFilter] - :ivar or_property: The logical "OR" expression. Must have at least 2 items. - :vartype or_property: list[~azure.mgmt.costmanagement.models.ForecastFilter] - :ivar dimensions: Has comparison expression for a dimension. - :vartype dimensions: ~azure.mgmt.costmanagement.models.ForecastComparisonExpression - :ivar tags: Has comparison expression for a tag. - :vartype tags: ~azure.mgmt.costmanagement.models.ForecastComparisonExpression - """ - - _validation = { - "and_property": {"min_items": 2}, - "or_property": {"min_items": 2}, - } - - _attribute_map = { - "and_property": {"key": "and", "type": "[ForecastFilter]"}, - "or_property": {"key": "or", "type": "[ForecastFilter]"}, - "dimensions": {"key": "dimensions", "type": "ForecastComparisonExpression"}, - "tags": {"key": "tags", "type": "ForecastComparisonExpression"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword and_property: The logical "AND" expression. Must have at least 2 items. - :paramtype and_property: list[~azure.mgmt.costmanagement.models.ForecastFilter] - :keyword or_property: The logical "OR" expression. Must have at least 2 items. - :paramtype or_property: list[~azure.mgmt.costmanagement.models.ForecastFilter] - :keyword dimensions: Has comparison expression for a dimension. - :paramtype dimensions: ~azure.mgmt.costmanagement.models.ForecastComparisonExpression - :keyword tags: Has comparison expression for a tag. - :paramtype tags: ~azure.mgmt.costmanagement.models.ForecastComparisonExpression - """ - super().__init__(**kwargs) - self.and_property = and_property - self.or_property = or_property - self.dimensions = dimensions - self.tags = tags - - -class ForecastResult(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. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the resource. - :vartype location: str - :ivar sku: SKU of the resource. - :vartype sku: str - :ivar e_tag: ETag of the resource. - :vartype e_tag: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - :ivar columns: Array of columns. - :vartype columns: list[~azure.mgmt.costmanagement.models.ForecastColumn] - :ivar rows: Array of rows. - :vartype rows: list[list[any]] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "location": {"readonly": True}, - "sku": {"readonly": True}, - "e_tag": {"readonly": True}, - "tags": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "sku": {"key": "sku", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "next_link": {"key": "properties.nextLink", "type": "str"}, - "columns": {"key": "properties.columns", "type": "[ForecastColumn]"}, - "rows": {"key": "properties.rows", "type": "[[object]]"}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - columns: Optional[list["_models.ForecastColumn"]] = None, - rows: Optional[list[list[Any]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword next_link: The link (url) to the next page of results. - :paramtype next_link: str - :keyword columns: Array of columns. - :paramtype columns: list[~azure.mgmt.costmanagement.models.ForecastColumn] - :keyword rows: Array of rows. - :paramtype rows: list[list[any]] - """ - super().__init__(**kwargs) - self.next_link = next_link - self.columns = columns - self.rows = rows - - -class ForecastSpend(_serialization.Model): - """The forecasted cost which is being tracked for a budget. - - Supported for CategoryType(s): Cost. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar amount: The forecasted cost for the total time period which is being tracked by the - budget. This value is only provided if the budget contains a forecast alert type. - :vartype amount: float - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str - """ - - _validation = { - "amount": {"readonly": True}, - "unit": {"readonly": True}, - } - - _attribute_map = { - "amount": {"key": "amount", "type": "float"}, - "unit": {"key": "unit", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.amount: Optional[float] = None - self.unit: Optional[str] = None - - -class ForecastTimePeriod(_serialization.Model): - """Has time period for pulling data for the forecast. - - All required parameters must be populated in order to send to server. - - :ivar from_property: The start date to pull data from. Required. - :vartype from_property: ~datetime.datetime - :ivar to: The end date to pull data to. Required. - :vartype to: ~datetime.datetime - """ - - _validation = { - "from_property": {"required": True}, - "to": {"required": True}, - } - - _attribute_map = { - "from_property": {"key": "from", "type": "iso-8601"}, - "to": {"key": "to", "type": "iso-8601"}, - } - - def __init__(self, *, from_property: datetime.datetime, to: datetime.datetime, **kwargs: Any) -> None: - """ - :keyword from_property: The start date to pull data from. Required. - :paramtype from_property: ~datetime.datetime - :keyword to: The end date to pull data to. Required. - :paramtype to: ~datetime.datetime - """ - super().__init__(**kwargs) - self.from_property = from_property - self.to = to - - -class GenerateCostDetailsReportErrorResponse(_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 - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetails"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs: Any) -> None: - """ - :keyword error: The details of the error. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetails - """ - super().__init__(**kwargs) - self.error = error - - -class GenerateCostDetailsReportRequestDefinition(_serialization.Model): # pylint: disable=name-too-long - """The definition of a cost detailed report. - - :ivar metric: The type of the detailed report. By default ActualCost is provided. Known values - are: "ActualCost" and "AmortizedCost". - :vartype metric: str or ~azure.mgmt.costmanagement.models.CostDetailsMetricType - :ivar time_period: 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. - :vartype time_period: ~azure.mgmt.costmanagement.models.CostDetailsTimePeriod - :ivar billing_period: 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. - :vartype billing_period: str - :ivar invoice_id: 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. - :vartype invoice_id: str - """ - - _attribute_map = { - "metric": {"key": "metric", "type": "str"}, - "time_period": {"key": "timePeriod", "type": "CostDetailsTimePeriod"}, - "billing_period": {"key": "billingPeriod", "type": "str"}, - "invoice_id": {"key": "invoiceId", "type": "str"}, - } - - def __init__( - self, - *, - metric: Optional[Union[str, "_models.CostDetailsMetricType"]] = None, - time_period: Optional["_models.CostDetailsTimePeriod"] = None, - billing_period: Optional[str] = None, - invoice_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword metric: The type of the detailed report. By default ActualCost is provided. Known - values are: "ActualCost" and "AmortizedCost". - :paramtype metric: str or ~azure.mgmt.costmanagement.models.CostDetailsMetricType - :keyword time_period: 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. - :paramtype time_period: ~azure.mgmt.costmanagement.models.CostDetailsTimePeriod - :keyword billing_period: 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. - :paramtype billing_period: str - :keyword invoice_id: 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. - :paramtype invoice_id: str - """ - super().__init__(**kwargs) - self.metric = metric - self.time_period = time_period - self.billing_period = billing_period - self.invoice_id = invoice_id - - -class GenerateDetailedCostReportDefinition(_serialization.Model): - """The definition of a cost detailed report. - - :ivar metric: The type of the detailed report. By default ActualCost is provided. Known values - are: "ActualCost" and "AmortizedCost". - :vartype metric: str or ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportMetricType - :ivar time_period: 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. - :vartype time_period: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportTimePeriod - :ivar billing_period: 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. - :vartype billing_period: str - :ivar invoice_id: 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. - :vartype invoice_id: str - :ivar customer_id: Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also - required for this). - :vartype customer_id: str - """ - - _attribute_map = { - "metric": {"key": "metric", "type": "str"}, - "time_period": {"key": "timePeriod", "type": "GenerateDetailedCostReportTimePeriod"}, - "billing_period": {"key": "billingPeriod", "type": "str"}, - "invoice_id": {"key": "invoiceId", "type": "str"}, - "customer_id": {"key": "customerId", "type": "str"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword metric: The type of the detailed report. By default ActualCost is provided. Known - values are: "ActualCost" and "AmortizedCost". - :paramtype metric: str or - ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportMetricType - :keyword time_period: 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. - :paramtype time_period: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportTimePeriod - :keyword billing_period: 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. - :paramtype billing_period: str - :keyword invoice_id: 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. - :paramtype invoice_id: str - :keyword customer_id: Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also - required for this). - :paramtype customer_id: str - """ - super().__init__(**kwargs) - self.metric = metric - self.time_period = time_period - self.billing_period = billing_period - self.invoice_id = invoice_id - self.customer_id = customer_id - - -class GenerateDetailedCostReportErrorResponse(_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 - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetails"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs: Any) -> None: - """ - :keyword error: The details of the error. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetails - """ - super().__init__(**kwargs) - self.error = error - - -class GenerateDetailedCostReportOperationResult(_serialization.Model): # pylint: disable=name-too-long - """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. - - :ivar id: The ARM resource id of the long running operation. - :vartype id: str - :ivar name: The name of the long running operation. - :vartype name: str - :ivar type: The type of the long running operation. - :vartype type: str - :ivar expiry_time: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype expiry_time: ~datetime.datetime - :ivar valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype valid_till: ~datetime.datetime - :ivar download_url: The URL to download the generated report. - :vartype download_url: str - """ - - _validation = { - "expiry_time": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "expiry_time": {"key": "properties.expiryTime", "type": "iso-8601"}, - "valid_till": {"key": "properties.validTill", "type": "iso-8601"}, - "download_url": {"key": "properties.downloadUrl", "type": "str"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - type: Optional[str] = None, - valid_till: Optional[datetime.datetime] = None, - download_url: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: The ARM resource id of the long running operation. - :paramtype id: str - :keyword name: The name of the long running operation. - :paramtype name: str - :keyword type: The type of the long running operation. - :paramtype type: str - :keyword valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :paramtype valid_till: ~datetime.datetime - :keyword download_url: The URL to download the generated report. - :paramtype download_url: str - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.expiry_time: Optional[datetime.datetime] = None - self.valid_till = valid_till - self.download_url = download_url - - -class GenerateDetailedCostReportOperationStatuses(_serialization.Model): # pylint: disable=name-too-long - """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. - - :ivar id: The ID of the long running operation. - :vartype id: str - :ivar name: The name of the long running operation. - :vartype name: str - :ivar status: The status of the long running operation. - :vartype status: ~azure.mgmt.costmanagement.models.Status - :ivar start_time: The startTime of the operation. - :vartype start_time: str - :ivar end_time: The endTime of the operation. - :vartype end_time: str - :ivar type: The type of the long running operation. - :vartype type: str - :ivar error: The details of the error. - :vartype error: ~azure.mgmt.costmanagement.models.ErrorDetails - :ivar expiry_time: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype expiry_time: ~datetime.datetime - :ivar valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype valid_till: ~datetime.datetime - :ivar download_url: The URL to download the generated report. - :vartype download_url: str - """ - - _validation = { - "expiry_time": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "status": {"key": "status", "type": "Status"}, - "start_time": {"key": "startTime", "type": "str"}, - "end_time": {"key": "endTime", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "error": {"key": "error", "type": "ErrorDetails"}, - "expiry_time": {"key": "properties.expiryTime", "type": "iso-8601"}, - "valid_till": {"key": "properties.validTill", "type": "iso-8601"}, - "download_url": {"key": "properties.downloadUrl", "type": "str"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - status: Optional["_models.Status"] = None, - start_time: Optional[str] = None, - end_time: Optional[str] = None, - type: Optional[str] = None, - error: Optional["_models.ErrorDetails"] = None, - valid_till: Optional[datetime.datetime] = None, - download_url: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: The ID of the long running operation. - :paramtype id: str - :keyword name: The name of the long running operation. - :paramtype name: str - :keyword status: The status of the long running operation. - :paramtype status: ~azure.mgmt.costmanagement.models.Status - :keyword start_time: The startTime of the operation. - :paramtype start_time: str - :keyword end_time: The endTime of the operation. - :paramtype end_time: str - :keyword type: The type of the long running operation. - :paramtype type: str - :keyword error: The details of the error. - :paramtype error: ~azure.mgmt.costmanagement.models.ErrorDetails - :keyword valid_till: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :paramtype valid_till: ~datetime.datetime - :keyword download_url: The URL to download the generated report. - :paramtype download_url: str - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.status = status - self.start_time = start_time - self.end_time = end_time - self.type = type - self.error = error - self.expiry_time: Optional[datetime.datetime] = None - self.valid_till = valid_till - self.download_url = download_url - - -class GenerateDetailedCostReportTimePeriod(_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 server. - - :ivar start: The start date to pull data from. example format 2020-03-15. Required. - :vartype start: str - :ivar end: The end date to pull data to. example format 2020-03-15. Required. - :vartype end: str - """ - - _validation = { - "start": {"required": True}, - "end": {"required": True}, - } - - _attribute_map = { - "start": {"key": "start", "type": "str"}, - "end": {"key": "end", "type": "str"}, - } - - def __init__(self, *, start: str, end: str, **kwargs: Any) -> None: - """ - :keyword start: The start date to pull data from. example format 2020-03-15. Required. - :paramtype start: str - :keyword end: The end date to pull data to. example format 2020-03-15. Required. - :paramtype end: str - """ - super().__init__(**kwargs) - self.start = start - self.end = end - - -class IncludedQuantityUtilizationSummary(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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar kind: Supported values: 'SavingsPlan'. Required. Known values are: "IncludedQuantity", - "Reservation", and "SavingsPlan". - :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. - :vartype arm_sku_name: str - :ivar benefit_id: The benefit ID is the identifier of the benefit. - :vartype benefit_id: str - :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. - :vartype benefit_order_id: str - :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar usage_date: 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. - :vartype usage_date: ~datetime.datetime - :ivar utilization_percentage: This is the utilized percentage for the benefit ID. - :vartype utilization_percentage: float - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "arm_sku_name": {"readonly": True}, - "benefit_id": {"readonly": True}, - "benefit_order_id": {"readonly": True}, - "usage_date": {"readonly": True}, - "utilization_percentage": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "arm_sku_name": {"key": "properties.armSkuName", "type": "str"}, - "benefit_id": {"key": "properties.benefitId", "type": "str"}, - "benefit_order_id": {"key": "properties.benefitOrderId", "type": "str"}, - "benefit_type": {"key": "properties.benefitType", "type": "str"}, - "usage_date": {"key": "properties.usageDate", "type": "iso-8601"}, - "utilization_percentage": {"key": "properties.utilizationPercentage", "type": "float"}, - } - - def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, **kwargs: Any) -> None: - """ - :keyword benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - super().__init__(**kwargs) - self.kind: str = "IncludedQuantity" - self.arm_sku_name: Optional[str] = None - self.benefit_id: Optional[str] = None - self.benefit_order_id: Optional[str] = None - self.benefit_type = benefit_type - self.usage_date: Optional[datetime.datetime] = None - self.utilization_percentage: Optional[float] = None - - -class IncludedQuantityUtilizationSummaryProperties( - BenefitUtilizationSummaryProperties -): # pylint: disable=name-too-long - """Included Quantity utilization summary properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. - :vartype arm_sku_name: str - :ivar benefit_id: The benefit ID is the identifier of the benefit. - :vartype benefit_id: str - :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. - :vartype benefit_order_id: str - :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar usage_date: 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. - :vartype usage_date: ~datetime.datetime - :ivar utilization_percentage: This is the utilized percentage for the benefit ID. - :vartype utilization_percentage: float - """ - - _validation = { - "arm_sku_name": {"readonly": True}, - "benefit_id": {"readonly": True}, - "benefit_order_id": {"readonly": True}, - "usage_date": {"readonly": True}, - "utilization_percentage": {"readonly": True}, - } - - _attribute_map = { - "arm_sku_name": {"key": "armSkuName", "type": "str"}, - "benefit_id": {"key": "benefitId", "type": "str"}, - "benefit_order_id": {"key": "benefitOrderId", "type": "str"}, - "benefit_type": {"key": "benefitType", "type": "str"}, - "usage_date": {"key": "usageDate", "type": "iso-8601"}, - "utilization_percentage": {"key": "utilizationPercentage", "type": "float"}, - } - - def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, **kwargs: Any) -> None: - """ - :keyword benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - super().__init__(benefit_type=benefit_type, **kwargs) - self.utilization_percentage: Optional[float] = None - - -class KpiProperties(_serialization.Model): - """Each KPI must contain a 'type' and 'enabled' key. - - :ivar type: KPI type (Forecast, Budget). Known values are: "Forecast" and "Budget". - :vartype type: str or ~azure.mgmt.costmanagement.models.KpiType - :ivar id: ID of resource related to metric (budget). - :vartype id: str - :ivar enabled: show the KPI in the UI?. - :vartype enabled: bool - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "id": {"key": "id", "type": "str"}, - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.KpiType"]] = None, - id: Optional[str] = None, # pylint: disable=redefined-builtin - enabled: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: KPI type (Forecast, Budget). Known values are: "Forecast" and "Budget". - :paramtype type: str or ~azure.mgmt.costmanagement.models.KpiType - :keyword id: ID of resource related to metric (budget). - :paramtype id: str - :keyword enabled: show the KPI in the UI?. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.type = type - self.id = id - self.enabled = enabled - - -class MCAPriceSheetProperties(_serialization.Model): - """The properties of the price sheet. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar billing_account_id: Unique identifier for the billing account. - :vartype billing_account_id: str - :ivar billing_account_name: Name of the billing profile that is set up to receive invoices. The - prices in the price sheet are associated with this billing profile. - :vartype billing_account_name: str - :ivar billing_profile_id: Unique identifier for the billing profile. - :vartype billing_profile_id: str - :ivar billing_profile_name: Name of the billing profile that is set up to receive invoices. The - prices in the price sheet are associated with this billing profile. - :vartype billing_profile_name: str - :ivar product_order_name: Name of the purchased product plan. Indicates if this pricing is - standard Azure Plan pricing, Dev/Test pricing etc. - - Currently unavailable for Azure 3rd party and ReservedInstance meters. - :vartype product_order_name: str - :ivar service_family: Type of Azure service. For example, Compute, Analytics, and Security. - :vartype service_family: float - :ivar product: Name of the product accruing the charges. - :vartype product: str - :ivar product_id: Unique identifier for the product whose meter is consumed. - :vartype product_id: str - :ivar sku_id: Unique identifier of the SKU. - :vartype sku_id: str - :ivar unit_of_measure: How usage is measured for the service. - :vartype unit_of_measure: str - :ivar meter_id: Unique identifier of the meter. - :vartype meter_id: str - :ivar meter_name: Name of the meter. The meter represents the deployable resource of an Azure - service. - :vartype meter_name: str - :ivar meter_type: Name of the meter type. - :vartype meter_type: str - :ivar meter_category: Name of the classification category for the meter. For example, Cloud - services, Networking, etc. - :vartype meter_category: str - :ivar meter_sub_category: Name of the meter subclassification category. - :vartype meter_sub_category: str - :ivar meter_region: Name of the Azure region where the meter for the service is available. - :vartype meter_region: str - :ivar tier_minimum_units: Defines the lower bound of the tier range for which prices are - defined. For example, if the range is 0 to 100, tierMinimumUnits would be 0. - :vartype tier_minimum_units: str - :ivar effective_start_date: Effective start date of the Price Sheet billing period. - :vartype effective_start_date: ~datetime.datetime - :ivar effective_end_date: Effective end date of the Price Sheet billing period. - :vartype effective_end_date: ~datetime.datetime - :ivar unit_price: The per-unit price at the time of billing for a given product or service, - inclusive of any negotiated discounts on top of the market price. - - For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year - commitment including discounts. - - Note: The unit price isn't the same as the effective price in usage details downloads when - services have differential prices across tiers. - - If services have multi-tiered pricing, the effective price is a blended rate across the tiers - and doesn't show a tier-specific unit price. The blended price or effective price is the net - price for the consumed quantity spanning across the multiple tiers (where each tier has a - specific unit price). - :vartype unit_price: str - :ivar base_price: The unit price at the time the customer signs on or the unit price at the - time of service meter GA launch if it is after sign-on. - - This is applicable for Enterprise Agreement users. - :vartype base_price: str - :ivar market_price: The current list price for a given product or service. This price is - without any negotiations and is based on your Microsoft Agreement type. - - For PriceType Consumption, market price is reflected as the pay-as-you-go price. - - For PriceType Savings Plan, market price reflects the Savings plan benefit on top of - pay-as-you-go price for the corresponding commitment term. - - For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year - commitment. - :vartype market_price: str - :ivar currency: Currency in which all the prices are reflected. - :vartype currency: str - :ivar billing_currency: Currency in which charges are posted. - :vartype billing_currency: str - :ivar term: Term length for Azure Savings Plan or Reservation term – one year or three years - (P1Y or P3Y). - :vartype term: str - :ivar price_type: Price type for a product. For example, an Azure resource with a pay-as-you-go - rate with priceType as Consumption. Other price types include ReservedInstance and Savings - Plan. - :vartype price_type: str - """ - - _validation = { - "billing_account_id": {"readonly": True}, - "billing_account_name": {"readonly": True}, - "billing_profile_id": {"readonly": True}, - "billing_profile_name": {"readonly": True}, - "product_order_name": {"readonly": True}, - "service_family": {"readonly": True}, - "product": {"readonly": True}, - "product_id": {"readonly": True}, - "sku_id": {"readonly": True}, - "unit_of_measure": {"readonly": True}, - "meter_id": {"readonly": True}, - "meter_name": {"readonly": True}, - "meter_type": {"readonly": True}, - "meter_category": {"readonly": True}, - "meter_sub_category": {"readonly": True}, - "meter_region": {"readonly": True}, - "tier_minimum_units": {"readonly": True}, - "effective_start_date": {"readonly": True}, - "effective_end_date": {"readonly": True}, - "unit_price": {"readonly": True}, - "base_price": {"readonly": True}, - "market_price": {"readonly": True}, - "currency": {"readonly": True}, - "billing_currency": {"readonly": True}, - "term": {"readonly": True}, - "price_type": {"readonly": True}, - } - - _attribute_map = { - "billing_account_id": {"key": "billingAccountID", "type": "str"}, - "billing_account_name": {"key": "billingAccountName", "type": "str"}, - "billing_profile_id": {"key": "billingProfileId", "type": "str"}, - "billing_profile_name": {"key": "billingProfileName", "type": "str"}, - "product_order_name": {"key": "productOrderName", "type": "str"}, - "service_family": {"key": "serviceFamily", "type": "float"}, - "product": {"key": "product", "type": "str"}, - "product_id": {"key": "productId", "type": "str"}, - "sku_id": {"key": "skuId", "type": "str"}, - "unit_of_measure": {"key": "unitOfMeasure", "type": "str"}, - "meter_id": {"key": "meterId", "type": "str"}, - "meter_name": {"key": "meterName", "type": "str"}, - "meter_type": {"key": "meterType", "type": "str"}, - "meter_category": {"key": "meterCategory", "type": "str"}, - "meter_sub_category": {"key": "meterSubCategory", "type": "str"}, - "meter_region": {"key": "meterRegion", "type": "str"}, - "tier_minimum_units": {"key": "tierMinimumUnits", "type": "str"}, - "effective_start_date": {"key": "effectiveStartDate", "type": "iso-8601"}, - "effective_end_date": {"key": "effectiveEndDate", "type": "iso-8601"}, - "unit_price": {"key": "unitPrice", "type": "str"}, - "base_price": {"key": "basePrice", "type": "str"}, - "market_price": {"key": "marketPrice", "type": "str"}, - "currency": {"key": "currency", "type": "str"}, - "billing_currency": {"key": "billingCurrency", "type": "str"}, - "term": {"key": "term", "type": "str"}, - "price_type": {"key": "priceType", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals - """ """ - super().__init__(**kwargs) - self.billing_account_id: Optional[str] = None - self.billing_account_name: Optional[str] = None - self.billing_profile_id: Optional[str] = None - self.billing_profile_name: Optional[str] = None - self.product_order_name: Optional[str] = None - self.service_family: Optional[float] = None - self.product: Optional[str] = None - self.product_id: Optional[str] = None - self.sku_id: Optional[str] = None - self.unit_of_measure: Optional[str] = None - self.meter_id: Optional[str] = None - self.meter_name: Optional[str] = None - self.meter_type: Optional[str] = None - self.meter_category: Optional[str] = None - self.meter_sub_category: Optional[str] = None - self.meter_region: Optional[str] = None - self.tier_minimum_units: Optional[str] = None - self.effective_start_date: Optional[datetime.datetime] = None - self.effective_end_date: Optional[datetime.datetime] = None - self.unit_price: Optional[str] = None - self.base_price: Optional[str] = None - self.market_price: Optional[str] = None - self.currency: Optional[str] = None - self.billing_currency: Optional[str] = None - self.term: Optional[str] = None - self.price_type: Optional[str] = None - - -class Notification(_serialization.Model): - """The notification associated with a budget. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - All required parameters must be populated in order to send to server. - - :ivar enabled: The notification is enabled or not. - - Supported for CategoryType(s): Cost, ReservationUtilization. Required. - :vartype enabled: bool - :ivar operator: The comparison operator. Supported for CategoryType(s): Cost, - ReservationUtilization. Supported operators for **CategoryType: Cost** - - * GreaterThan - * - GreaterThanOrEqualTo - - Supported operators for **CategoryType: ReservationUtilization** - - * LessThan. Required. Known values are: "EqualTo", "GreaterThan", "GreaterThanOrEqualTo", - and "LessThan". - :vartype operator: str or ~azure.mgmt.costmanagement.models.BudgetNotificationOperatorType - :ivar threshold: Threshold value associated with a notification. It is always percent with a - maximum of 2 decimal places. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - **CategoryType: Cost** - Must be between 0 and 1000. Notification is sent when the cost - exceeded the threshold. - - **CategoryType: ReservationUtilization** - Must be between 0 and 100. Notification is sent - when a reservation has a utilization percentage below the threshold. Required. - :vartype threshold: float - :ivar frequency: Frequency of a notification. Represents how long the notification will be - silent after triggering an alert for a threshold breach. If not specified, the frequency will - be set by default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when - timeGrain: Last30Days). - - Supported for CategoryType(s): ReservationUtilization. Known values are: "Daily", "Weekly", - and "Monthly". - :vartype frequency: str or ~azure.mgmt.costmanagement.models.Frequency - :ivar contact_emails: Email addresses to send the notification to when the threshold is - breached. Must have at least one contact email or contact group specified at the Subscription - or Resource Group scopes. All other scopes must have at least one contact email specified. - - Supported for CategoryType(s): Cost, ReservationUtilization. Required. - :vartype contact_emails: list[str] - :ivar contact_roles: Subscription or Resource Group scopes only. Contact roles to send the - notification to when the threshold is breached. - - Supported for CategoryType(s): Cost. - :vartype contact_roles: list[str] - :ivar contact_groups: Subscription or Resource Group scopes only. Action groups to send the - notification to when the threshold is exceeded. Must be provided as a fully qualified Azure - resource id. - - Supported for CategoryType(s): Cost. - :vartype contact_groups: list[str] - :ivar threshold_type: The type of threshold. - - Supported for CategoryType(s): Cost. Known values are: "Actual" and "Forecasted". - :vartype threshold_type: str or ~azure.mgmt.costmanagement.models.ThresholdType - :ivar locale: Language in which the recipient will receive the notification, - - Supported for CategoryType(s): Cost, ReservationUtilization. Known values are: "en-us", - "ja-jp", "zh-cn", "de-de", "es-es", "fr-fr", "it-it", "ko-kr", "pt-br", "ru-ru", "zh-tw", - "cs-cz", "pl-pl", "tr-tr", "da-dk", "en-gb", "hu-hu", "nb-no", "nl-nl", "pt-pt", and "sv-se". - :vartype locale: str or ~azure.mgmt.costmanagement.models.CultureCode - """ - - _validation = { - "enabled": {"required": True}, - "operator": {"required": True}, - "threshold": {"required": True}, - "contact_emails": {"required": True, "max_items": 50, "min_items": 0}, - "contact_groups": {"max_items": 50, "min_items": 0}, - } - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "operator": {"key": "operator", "type": "str"}, - "threshold": {"key": "threshold", "type": "float"}, - "frequency": {"key": "frequency", "type": "str"}, - "contact_emails": {"key": "contactEmails", "type": "[str]"}, - "contact_roles": {"key": "contactRoles", "type": "[str]"}, - "contact_groups": {"key": "contactGroups", "type": "[str]"}, - "threshold_type": {"key": "thresholdType", "type": "str"}, - "locale": {"key": "locale", "type": "str"}, - } - - def __init__( - self, - *, - enabled: bool, - operator: Union[str, "_models.BudgetNotificationOperatorType"], - threshold: float, - contact_emails: list[str], - frequency: Optional[Union[str, "_models.Frequency"]] = None, - contact_roles: Optional[list[str]] = None, - contact_groups: Optional[list[str]] = None, - threshold_type: Union[str, "_models.ThresholdType"] = "Actual", - locale: Optional[Union[str, "_models.CultureCode"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword enabled: The notification is enabled or not. - - Supported for CategoryType(s): Cost, ReservationUtilization. Required. - :paramtype enabled: bool - :keyword operator: The comparison operator. Supported for CategoryType(s): Cost, - ReservationUtilization. Supported operators for **CategoryType: Cost** - - * GreaterThan - * - GreaterThanOrEqualTo - - Supported operators for **CategoryType: ReservationUtilization** - - * LessThan. Required. Known values are: "EqualTo", "GreaterThan", - "GreaterThanOrEqualTo", and "LessThan". - :paramtype operator: str or ~azure.mgmt.costmanagement.models.BudgetNotificationOperatorType - :keyword threshold: Threshold value associated with a notification. It is always percent with a - maximum of 2 decimal places. - - Supported for CategoryType(s): Cost, ReservationUtilization. - - **CategoryType: Cost** - Must be between 0 and 1000. Notification is sent when the cost - exceeded the threshold. - - **CategoryType: ReservationUtilization** - Must be between 0 and 100. Notification is sent - when a reservation has a utilization percentage below the threshold. Required. - :paramtype threshold: float - :keyword frequency: Frequency of a notification. Represents how long the notification will be - silent after triggering an alert for a threshold breach. If not specified, the frequency will - be set by default based on the timeGrain (Weekly when timeGrain: Last7Days, Monthly when - timeGrain: Last30Days). - - Supported for CategoryType(s): ReservationUtilization. Known values are: "Daily", "Weekly", - and "Monthly". - :paramtype frequency: str or ~azure.mgmt.costmanagement.models.Frequency - :keyword contact_emails: Email addresses to send the notification to when the threshold is - breached. Must have at least one contact email or contact group specified at the Subscription - or Resource Group scopes. All other scopes must have at least one contact email specified. - - Supported for CategoryType(s): Cost, ReservationUtilization. Required. - :paramtype contact_emails: list[str] - :keyword contact_roles: Subscription or Resource Group scopes only. Contact roles to send the - notification to when the threshold is breached. - - Supported for CategoryType(s): Cost. - :paramtype contact_roles: list[str] - :keyword contact_groups: Subscription or Resource Group scopes only. Action groups to send the - notification to when the threshold is exceeded. Must be provided as a fully qualified Azure - resource id. - - Supported for CategoryType(s): Cost. - :paramtype contact_groups: list[str] - :keyword threshold_type: The type of threshold. - - Supported for CategoryType(s): Cost. Known values are: "Actual" and "Forecasted". - :paramtype threshold_type: str or ~azure.mgmt.costmanagement.models.ThresholdType - :keyword locale: Language in which the recipient will receive the notification, - - Supported for CategoryType(s): Cost, ReservationUtilization. Known values are: "en-us", - "ja-jp", "zh-cn", "de-de", "es-es", "fr-fr", "it-it", "ko-kr", "pt-br", "ru-ru", "zh-tw", - "cs-cz", "pl-pl", "tr-tr", "da-dk", "en-gb", "hu-hu", "nb-no", "nl-nl", "pt-pt", and "sv-se". - :paramtype locale: str or ~azure.mgmt.costmanagement.models.CultureCode - """ - super().__init__(**kwargs) - self.enabled = enabled - self.operator = operator - self.threshold = threshold - self.frequency = frequency - self.contact_emails = contact_emails - self.contact_roles = contact_roles - self.contact_groups = contact_groups - self.threshold_type = threshold_type - self.locale = locale - - -class NotificationProperties(_serialization.Model): - """The properties of the scheduled action notification. - - All required parameters must be populated in order to send to server. - - :ivar to: Array of email addresses. Required. - :vartype to: list[str] - :ivar language: Locale of the email. - :vartype language: str - :ivar message: Optional message to be added in the email. Length is limited to 250 characters. - :vartype message: str - :ivar regional_format: Regional format used for formatting date/time and currency values in the - email. - :vartype regional_format: str - :ivar subject: Subject of the email. Length is limited to 70 characters. Required. - :vartype subject: str - """ - - _validation = { - "to": {"required": True, "max_items": 20, "min_items": 1}, - "subject": {"required": True}, - } - - _attribute_map = { - "to": {"key": "to", "type": "[str]"}, - "language": {"key": "language", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "regional_format": {"key": "regionalFormat", "type": "str"}, - "subject": {"key": "subject", "type": "str"}, - } - - def __init__( - self, - *, - to: list[str], - subject: str, - language: Optional[str] = None, - message: Optional[str] = None, - regional_format: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword to: Array of email addresses. Required. - :paramtype to: list[str] - :keyword language: Locale of the email. - :paramtype language: str - :keyword message: Optional message to be added in the email. Length is limited to 250 - characters. - :paramtype message: str - :keyword regional_format: Regional format used for formatting date/time and currency values in - the email. - :paramtype regional_format: str - :keyword subject: Subject of the email. Length is limited to 70 characters. Required. - :paramtype subject: str - """ - super().__init__(**kwargs) - self.to = to - self.language = language - self.message = message - self.regional_format = regional_format - self.subject = subject - - -class OperationDisplay(_serialization.Model): - """Localized display information for this particular operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft - Monitoring Insights" or "Microsoft Compute". - :vartype provider: str - :ivar resource: The localized friendly name of the resource type related to this operation. - E.g. "Virtual Machines" or "Job Schedule Collections". - :vartype resource: str - :ivar operation: The concise, localized friendly name for the operation; suitable for - dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - :vartype operation: str - :ivar description: The short, localized friendly description of the operation; suitable for - tool tips and detailed views. - :vartype description: str - """ - - _validation = { - "provider": {"readonly": True}, - "resource": {"readonly": True}, - "operation": {"readonly": True}, - "description": {"readonly": True}, - } - - _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "resource": {"key": "resource", "type": "str"}, - "operation": {"key": "operation", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.provider: Optional[str] = None - self.resource: Optional[str] = None - self.operation: Optional[str] = None - self.description: Optional[str] = None - - -class OperationListResult(_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. - - :ivar value: List of cost management operations supported by the Microsoft.CostManagement - resource provider. - :vartype value: list[~azure.mgmt.costmanagement.models.CostManagementOperation] - :ivar next_link: URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[CostManagementOperation]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.CostManagementOperation"]] = None - self.next_link: Optional[str] = None - - -class OperationStatus(_serialization.Model): - """The status of the long running operation. - - :ivar status: The status of the long running operation. Known values are: "Running", - "Complete", "Failed", and "Completed". - :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType - :ivar report_url: 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". - :vartype report_url: str or ~azure.mgmt.costmanagement.models.ReservationReportSchema - :ivar valid_until: The time at which report URL becomes invalid. - :vartype valid_until: ~datetime.datetime - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "report_url": {"key": "properties.reportUrl", "type": "str"}, - "valid_until": {"key": "properties.validUntil", "type": "iso-8601"}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "_models.OperationStatusType"]] = None, - report_url: Optional[Union[str, "_models.ReservationReportSchema"]] = None, - valid_until: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The status of the long running operation. Known values are: "Running", - "Complete", "Failed", and "Completed". - :paramtype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType - :keyword report_url: 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". - :paramtype report_url: str or ~azure.mgmt.costmanagement.models.ReservationReportSchema - :keyword valid_until: The time at which report URL becomes invalid. - :paramtype valid_until: ~datetime.datetime - """ - super().__init__(**kwargs) - self.status = status - self.report_url = report_url - self.valid_until = valid_until - - -class OperationStatusAutoGenerated(_serialization.Model): - """The status of the long running operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar status: The status of the long running operation. Known values are: "Running", - "Complete", "Failed", and "Completed". - :vartype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType - :ivar download_url: The link (url) to download the pricesheet. - :vartype download_url: str - :ivar valid_till: Download link validity. - :vartype valid_till: ~datetime.datetime - :ivar download_file_properties: The properties in downloaded file. - :vartype download_file_properties: ~azure.mgmt.costmanagement.models.EAPriceSheetProperties - """ - - _validation = { - "download_url": {"readonly": True}, - "valid_till": {"readonly": True}, - } - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "download_url": {"key": "properties.downloadUrl", "type": "str"}, - "valid_till": {"key": "properties.validTill", "type": "iso-8601"}, - "download_file_properties": {"key": "properties.downloadFileProperties", "type": "EAPriceSheetProperties"}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "_models.OperationStatusType"]] = None, - download_file_properties: Optional["_models.EAPriceSheetProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The status of the long running operation. Known values are: "Running", - "Complete", "Failed", and "Completed". - :paramtype status: str or ~azure.mgmt.costmanagement.models.OperationStatusType - :keyword download_file_properties: The properties in downloaded file. - :paramtype download_file_properties: ~azure.mgmt.costmanagement.models.EAPriceSheetProperties - """ - super().__init__(**kwargs) - self.status = status - self.download_url: Optional[str] = None - self.valid_till: Optional[datetime.datetime] = None - self.download_file_properties = download_file_properties - - -class PivotProperties(_serialization.Model): - """Each pivot must contain a 'type' and 'name'. - - :ivar type: Data type to show in view. Known values are: "Dimension" and "TagKey". - :vartype type: str or ~azure.mgmt.costmanagement.models.PivotType - :ivar name: Data field to show in view. - :vartype name: str - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, *, type: Optional[Union[str, "_models.PivotType"]] = None, name: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword type: Data type to show in view. Known values are: "Dimension" and "TagKey". - :paramtype type: str or ~azure.mgmt.costmanagement.models.PivotType - :keyword name: Data field to show in view. - :paramtype name: str - """ - super().__init__(**kwargs) - self.type = type - self.name = name - - -class PricesheetDownloadProperties(_serialization.Model): - """The URL to download the generated report. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar expiry_time: The time at which report URL becomes invalid/expires in UTC e.g. - 2020-12-08T05:55:59.4394737Z. - :vartype expiry_time: ~datetime.datetime - :ivar download_url: The URL to download the generated report. - :vartype download_url: str - :ivar download_file_properties: The properties in downloaded file. - :vartype download_file_properties: ~azure.mgmt.costmanagement.models.MCAPriceSheetProperties - """ - - _validation = { - "expiry_time": {"readonly": True}, - } - - _attribute_map = { - "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, - "download_url": {"key": "downloadUrl", "type": "str"}, - "download_file_properties": {"key": "downloadFileProperties", "type": "MCAPriceSheetProperties"}, - } - - def __init__( - self, - *, - download_url: Optional[str] = None, - download_file_properties: Optional["_models.MCAPriceSheetProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword download_url: The URL to download the generated report. - :paramtype download_url: str - :keyword download_file_properties: The properties in downloaded file. - :paramtype download_file_properties: ~azure.mgmt.costmanagement.models.MCAPriceSheetProperties - """ - super().__init__(**kwargs) - self.expiry_time: Optional[datetime.datetime] = None - self.download_url = download_url - self.download_file_properties = download_file_properties - - -class ProxyResource(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. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - -class QueryAggregation(_serialization.Model): - """The aggregation expression to be used in the query. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the column to aggregate. Required. - :vartype name: str - :ivar function: The name of the aggregation function to use. Required. "Sum" - :vartype function: str or ~azure.mgmt.costmanagement.models.FunctionType - """ - - _validation = { - "name": {"required": True}, - "function": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "function": {"key": "function", "type": "str"}, - } - - def __init__(self, *, name: str, function: Union[str, "_models.FunctionType"], **kwargs: Any) -> None: - """ - :keyword name: The name of the column to aggregate. Required. - :paramtype name: str - :keyword function: The name of the aggregation function to use. Required. "Sum" - :paramtype function: str or ~azure.mgmt.costmanagement.models.FunctionType - """ - super().__init__(**kwargs) - self.name = name - self.function = function - - -class QueryColumn(_serialization.Model): - """QueryColumn properties. - - :ivar name: The name of column. - :vartype name: str - :ivar type: The type of column. - :vartype type: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: The name of column. - :paramtype name: str - :keyword type: The type of column. - :paramtype type: str - """ - super().__init__(**kwargs) - self.name = name - self.type = type - - -class QueryComparisonExpression(_serialization.Model): - """The comparison expression to be used in the query. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the column to use in comparison. Required. - :vartype name: str - :ivar operator: The operator to use for comparison. Required. "In" - :vartype operator: str or ~azure.mgmt.costmanagement.models.QueryOperatorType - :ivar values: Array of values to use for comparison. Required. - :vartype values: list[str] - """ - - _validation = { - "name": {"required": True}, - "operator": {"required": True}, - "values": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "values": {"key": "values", "type": "[str]"}, - } - - def __init__( - self, *, name: str, operator: Union[str, "_models.QueryOperatorType"], values: list[str], **kwargs: Any - ) -> None: - """ - :keyword name: The name of the column to use in comparison. Required. - :paramtype name: str - :keyword operator: The operator to use for comparison. Required. "In" - :paramtype operator: str or ~azure.mgmt.costmanagement.models.QueryOperatorType - :keyword values: Array of values to use for comparison. Required. - :paramtype values: list[str] - """ - super().__init__(**kwargs) - self.name = name - self.operator = operator - self.values = values - - -class QueryDataset(_serialization.Model): - """The definition of data present in the query. - - :ivar granularity: The granularity of rows in the query. Known values are: "Daily" and - "Monthly". - :vartype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType - :ivar configuration: Has configuration information for the data in the export. The - configuration will be ignored if aggregation and grouping are provided. - :vartype configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration - :ivar aggregation: 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. - :vartype aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] - :ivar grouping: Array of group by expression to use in the query. Query can have up to 2 group - by clauses. - :vartype grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :ivar filter: The filter expression to use in the query. Please reference our Query API REST - documentation for how to properly format the filter. - :vartype filter: ~azure.mgmt.costmanagement.models.QueryFilter - """ - - _validation = { - "grouping": {"max_items": 2, "min_items": 0}, - } - - _attribute_map = { - "granularity": {"key": "granularity", "type": "str"}, - "configuration": {"key": "configuration", "type": "QueryDatasetConfiguration"}, - "aggregation": {"key": "aggregation", "type": "{QueryAggregation}"}, - "grouping": {"key": "grouping", "type": "[QueryGrouping]"}, - "filter": {"key": "filter", "type": "QueryFilter"}, - } - - def __init__( - self, - *, - 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, # pylint: disable=redefined-builtin - **kwargs: Any - ) -> None: - """ - :keyword granularity: The granularity of rows in the query. Known values are: "Daily" and - "Monthly". - :paramtype granularity: str or ~azure.mgmt.costmanagement.models.GranularityType - :keyword configuration: Has configuration information for the data in the export. The - configuration will be ignored if aggregation and grouping are provided. - :paramtype configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration - :keyword aggregation: 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. - :paramtype aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] - :keyword grouping: Array of group by expression to use in the query. Query can have up to 2 - group by clauses. - :paramtype grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :keyword filter: The filter expression to use in the query. Please reference our Query API REST - documentation for how to properly format the filter. - :paramtype filter: ~azure.mgmt.costmanagement.models.QueryFilter - """ - super().__init__(**kwargs) - self.granularity = granularity - self.configuration = configuration - self.aggregation = aggregation - self.grouping = grouping - self.filter = filter - - -class QueryDatasetConfiguration(_serialization.Model): - """The configuration of dataset in the query. - - :ivar columns: 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. - :vartype columns: list[str] - """ - - _attribute_map = { - "columns": {"key": "columns", "type": "[str]"}, - } - - def __init__(self, *, columns: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword columns: 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. - :paramtype columns: list[str] - """ - super().__init__(**kwargs) - self.columns = columns - - -class QueryDefinition(_serialization.Model): - """The definition of a query. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the query. Required. Known values are: "Usage", "ActualCost", - "AmortizedCost", "FocusCost", "PriceSheet", "ReservationTransactions", - "ReservationRecommendations", and "ReservationDetails". - :vartype type: str or ~azure.mgmt.costmanagement.models.ExportType - :ivar timeframe: 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", "Custom", and "TheCurrentMonth". - :vartype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType - :ivar time_period: Has time period for pulling data for the query. - :vartype time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :ivar dataset: Has definition for data in this query. Required. - :vartype dataset: ~azure.mgmt.costmanagement.models.QueryDataset - """ - - _validation = { - "type": {"required": True}, - "timeframe": {"required": True}, - "dataset": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "timeframe": {"key": "timeframe", "type": "str"}, - "time_period": {"key": "timePeriod", "type": "QueryTimePeriod"}, - "dataset": {"key": "dataset", "type": "QueryDataset"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.ExportType"], - timeframe: Union[str, "_models.TimeframeType"], - dataset: "_models.QueryDataset", - time_period: Optional["_models.QueryTimePeriod"] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of the query. Required. Known values are: "Usage", "ActualCost", - "AmortizedCost", "FocusCost", "PriceSheet", "ReservationTransactions", - "ReservationRecommendations", and "ReservationDetails". - :paramtype type: str or ~azure.mgmt.costmanagement.models.ExportType - :keyword timeframe: 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", "Custom", and "TheCurrentMonth". - :paramtype timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType - :keyword time_period: Has time period for pulling data for the query. - :paramtype time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :keyword dataset: Has definition for data in this query. Required. - :paramtype dataset: ~azure.mgmt.costmanagement.models.QueryDataset - """ - super().__init__(**kwargs) - self.type = type - self.timeframe = timeframe - self.time_period = time_period - self.dataset = dataset - - -class QueryFilter(_serialization.Model): - """The filter expression to be used in the export. - - :ivar and_property: The logical "AND" expression. Must have at least 2 items. - :vartype and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :ivar or_property: The logical "OR" expression. Must have at least 2 items. - :vartype or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :ivar dimensions: Has comparison expression for a dimension. - :vartype dimensions: ~azure.mgmt.costmanagement.models.QueryComparisonExpression - :ivar tags: Has comparison expression for a tag. - :vartype tags: ~azure.mgmt.costmanagement.models.QueryComparisonExpression - """ - - _validation = { - "and_property": {"min_items": 2}, - "or_property": {"min_items": 2}, - } - - _attribute_map = { - "and_property": {"key": "and", "type": "[QueryFilter]"}, - "or_property": {"key": "or", "type": "[QueryFilter]"}, - "dimensions": {"key": "dimensions", "type": "QueryComparisonExpression"}, - "tags": {"key": "tags", "type": "QueryComparisonExpression"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword and_property: The logical "AND" expression. Must have at least 2 items. - :paramtype and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :keyword or_property: The logical "OR" expression. Must have at least 2 items. - :paramtype or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :keyword dimensions: Has comparison expression for a dimension. - :paramtype dimensions: ~azure.mgmt.costmanagement.models.QueryComparisonExpression - :keyword tags: Has comparison expression for a tag. - :paramtype tags: ~azure.mgmt.costmanagement.models.QueryComparisonExpression - """ - super().__init__(**kwargs) - self.and_property = and_property - self.or_property = or_property - self.dimensions = dimensions - self.tags = tags - - -class QueryGrouping(_serialization.Model): - """The group by expression to be used in the query. - - All required parameters must be populated in order to send to server. - - :ivar type: Has type of the column to group. Required. Known values are: "TagKey" and - "Dimension". - :vartype type: str or ~azure.mgmt.costmanagement.models.QueryColumnType - :ivar name: The name of the column to group. Required. - :vartype name: str - """ - - _validation = { - "type": {"required": True}, - "name": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, type: Union[str, "_models.QueryColumnType"], name: str, **kwargs: Any) -> None: - """ - :keyword type: Has type of the column to group. Required. Known values are: "TagKey" and - "Dimension". - :paramtype type: str or ~azure.mgmt.costmanagement.models.QueryColumnType - :keyword name: The name of the column to group. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.type = type - self.name = name - - -class QueryResult(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. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Location of the resource. - :vartype location: str - :ivar sku: SKU of the resource. - :vartype sku: str - :ivar e_tag: ETag of the resource. - :vartype e_tag: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - :ivar columns: Array of columns. - :vartype columns: list[~azure.mgmt.costmanagement.models.QueryColumn] - :ivar rows: Array of rows. - :vartype rows: list[list[any]] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "location": {"readonly": True}, - "sku": {"readonly": True}, - "e_tag": {"readonly": True}, - "tags": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "sku": {"key": "sku", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "next_link": {"key": "properties.nextLink", "type": "str"}, - "columns": {"key": "properties.columns", "type": "[QueryColumn]"}, - "rows": {"key": "properties.rows", "type": "[[object]]"}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - columns: Optional[list["_models.QueryColumn"]] = None, - rows: Optional[list[list[Any]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword next_link: The link (url) to the next page of results. - :paramtype next_link: str - :keyword columns: Array of columns. - :paramtype columns: list[~azure.mgmt.costmanagement.models.QueryColumn] - :keyword rows: Array of rows. - :paramtype rows: list[list[any]] - """ - super().__init__(**kwargs) - self.next_link = next_link - self.columns = columns - self.rows = rows - - -class QueryTimePeriod(_serialization.Model): - """The start and end date for pulling data for the query. - - All required parameters must be populated in order to send to server. - - :ivar from_property: The start date to pull data from. Required. - :vartype from_property: ~datetime.datetime - :ivar to: The end date to pull data to. Required. - :vartype to: ~datetime.datetime - """ - - _validation = { - "from_property": {"required": True}, - "to": {"required": True}, - } - - _attribute_map = { - "from_property": {"key": "from", "type": "iso-8601"}, - "to": {"key": "to", "type": "iso-8601"}, - } - - def __init__(self, *, from_property: datetime.datetime, to: datetime.datetime, **kwargs: Any) -> None: - """ - :keyword from_property: The start date to pull data from. Required. - :paramtype from_property: ~datetime.datetime - :keyword to: The end date to pull data to. Required. - :paramtype to: ~datetime.datetime - """ - super().__init__(**kwargs) - self.from_property = from_property - self.to = to - - -class RecommendationUsageDetails(_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. - - :ivar usage_grain: The grain of the usage. Supported values: 'Hourly'. Known values are: - "Hourly", "Daily", and "Monthly". - :vartype usage_grain: str or ~azure.mgmt.costmanagement.models.Grain - :ivar charges: On-demand charges for each hour between firstConsumptionDate and - lastConsumptionDate that were used for computing benefit recommendations. - :vartype charges: list[float] - """ - - _validation = { - "charges": {"readonly": True}, - } - - _attribute_map = { - "usage_grain": {"key": "usageGrain", "type": "str"}, - "charges": {"key": "charges", "type": "[float]"}, - } - - def __init__(self, *, usage_grain: Optional[Union[str, "_models.Grain"]] = None, **kwargs: Any) -> None: - """ - :keyword usage_grain: The grain of the usage. Supported values: 'Hourly'. Known values are: - "Hourly", "Daily", and "Monthly". - :paramtype usage_grain: str or ~azure.mgmt.costmanagement.models.Grain - """ - super().__init__(**kwargs) - self.usage_grain = usage_grain - self.charges: Optional[list[float]] = None - - -class ReportConfigAggregation(_serialization.Model): - """The aggregation expression to be used in the report. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the column to aggregate. Required. - :vartype name: str - :ivar function: The name of the aggregation function to use. Required. "Sum" - :vartype function: str or ~azure.mgmt.costmanagement.models.FunctionType - """ - - _validation = { - "name": {"required": True}, - "function": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "function": {"key": "function", "type": "str"}, - } - - def __init__(self, *, name: str, function: Union[str, "_models.FunctionType"], **kwargs: Any) -> None: - """ - :keyword name: The name of the column to aggregate. Required. - :paramtype name: str - :keyword function: The name of the aggregation function to use. Required. "Sum" - :paramtype function: str or ~azure.mgmt.costmanagement.models.FunctionType - """ - super().__init__(**kwargs) - self.name = name - self.function = function - - -class ReportConfigComparisonExpression(_serialization.Model): - """The comparison expression to be used in the report. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the column to use in comparison. Required. - :vartype name: str - :ivar operator: The operator to use for comparison. Required. Known values are: "In" and - "Contains". - :vartype operator: str or ~azure.mgmt.costmanagement.models.OperatorType - :ivar values: Array of values to use for comparison. Required. - :vartype values: list[str] - """ - - _validation = { - "name": {"required": True}, - "operator": {"required": True}, - "values": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "values": {"key": "values", "type": "[str]"}, - } - - def __init__( - self, *, name: str, operator: Union[str, "_models.OperatorType"], values: list[str], **kwargs: Any - ) -> None: - """ - :keyword name: The name of the column to use in comparison. Required. - :paramtype name: str - :keyword operator: The operator to use for comparison. Required. Known values are: "In" and - "Contains". - :paramtype operator: str or ~azure.mgmt.costmanagement.models.OperatorType - :keyword values: Array of values to use for comparison. Required. - :paramtype values: list[str] - """ - super().__init__(**kwargs) - self.name = name - self.operator = operator - self.values = values - - -class ReportConfigDataset(_serialization.Model): - """The definition of data present in the report. - - :ivar granularity: The granularity of rows in the report. Known values are: "Daily" and - "Monthly". - :vartype granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType - :ivar configuration: Has configuration information for the data in the report. The - configuration will be ignored if aggregation and grouping are provided. - :vartype configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration - :ivar aggregation: 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. - :vartype aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] - :ivar grouping: Array of group by expression to use in the report. Report can have up to 2 - group by clauses. - :vartype grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] - :ivar sorting: Array of order by expression to use in the report. - :vartype sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] - :ivar filter: Has filter expression to use in the report. - :vartype filter: ~azure.mgmt.costmanagement.models.ReportConfigFilter - """ - - _validation = { - "grouping": {"max_items": 2, "min_items": 0}, - } - - _attribute_map = { - "granularity": {"key": "granularity", "type": "str"}, - "configuration": {"key": "configuration", "type": "ReportConfigDatasetConfiguration"}, - "aggregation": {"key": "aggregation", "type": "{ReportConfigAggregation}"}, - "grouping": {"key": "grouping", "type": "[ReportConfigGrouping]"}, - "sorting": {"key": "sorting", "type": "[ReportConfigSorting]"}, - "filter": {"key": "filter", "type": "ReportConfigFilter"}, - } - - def __init__( - self, - *, - 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, # pylint: disable=redefined-builtin - **kwargs: Any - ) -> None: - """ - :keyword granularity: The granularity of rows in the report. Known values are: "Daily" and - "Monthly". - :paramtype granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType - :keyword configuration: Has configuration information for the data in the report. The - configuration will be ignored if aggregation and grouping are provided. - :paramtype configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration - :keyword aggregation: 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. - :paramtype aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] - :keyword grouping: Array of group by expression to use in the report. Report can have up to 2 - group by clauses. - :paramtype grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] - :keyword sorting: Array of order by expression to use in the report. - :paramtype sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] - :keyword filter: Has filter expression to use in the report. - :paramtype filter: ~azure.mgmt.costmanagement.models.ReportConfigFilter - """ - super().__init__(**kwargs) - self.granularity = granularity - self.configuration = configuration - self.aggregation = aggregation - self.grouping = grouping - self.sorting = sorting - self.filter = filter - - -class ReportConfigDatasetConfiguration(_serialization.Model): - """The configuration of dataset in the report. - - :ivar columns: 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. - :vartype columns: list[str] - """ - - _attribute_map = { - "columns": {"key": "columns", "type": "[str]"}, - } - - def __init__(self, *, columns: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword columns: 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. - :paramtype columns: list[str] - """ - super().__init__(**kwargs) - self.columns = columns - - -class ReportConfigFilter(_serialization.Model): - """The filter expression to be used in the report. - - :ivar and_property: The logical "AND" expression. Must have at least 2 items. - :vartype and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] - :ivar or_property: The logical "OR" expression. Must have at least 2 items. - :vartype or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] - :ivar dimensions: Has comparison expression for a dimension. - :vartype dimensions: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression - :ivar tags: Has comparison expression for a tag. - :vartype tags: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression - """ - - _validation = { - "and_property": {"min_items": 2}, - "or_property": {"min_items": 2}, - } - - _attribute_map = { - "and_property": {"key": "and", "type": "[ReportConfigFilter]"}, - "or_property": {"key": "or", "type": "[ReportConfigFilter]"}, - "dimensions": {"key": "dimensions", "type": "ReportConfigComparisonExpression"}, - "tags": {"key": "tags", "type": "ReportConfigComparisonExpression"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword and_property: The logical "AND" expression. Must have at least 2 items. - :paramtype and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] - :keyword or_property: The logical "OR" expression. Must have at least 2 items. - :paramtype or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] - :keyword dimensions: Has comparison expression for a dimension. - :paramtype dimensions: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression - :keyword tags: Has comparison expression for a tag. - :paramtype tags: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression - """ - super().__init__(**kwargs) - self.and_property = and_property - self.or_property = or_property - self.dimensions = dimensions - self.tags = tags - - -class ReportConfigGrouping(_serialization.Model): - """The group by expression to be used in the report. - - All required parameters must be populated in order to send to server. - - :ivar type: Has type of the column to group. Required. Known values are: "TagKey" and - "Dimension". - :vartype type: str or ~azure.mgmt.costmanagement.models.QueryColumnType - :ivar name: The name of the column to group. This version supports subscription lowest possible - grain. Required. - :vartype name: str - """ - - _validation = { - "type": {"required": True}, - "name": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, type: Union[str, "_models.QueryColumnType"], name: str, **kwargs: Any) -> None: - """ - :keyword type: Has type of the column to group. Required. Known values are: "TagKey" and - "Dimension". - :paramtype type: str or ~azure.mgmt.costmanagement.models.QueryColumnType - :keyword name: The name of the column to group. This version supports subscription lowest - possible grain. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.type = type - self.name = name - - -class ReportConfigSorting(_serialization.Model): - """The order by expression to be used in the report. - - All required parameters must be populated in order to send to server. - - :ivar direction: Direction of sort. Known values are: "Ascending" and "Descending". - :vartype direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingType - :ivar name: The name of the column to sort. Required. - :vartype name: str - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "direction": {"key": "direction", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, *, name: str, direction: Optional[Union[str, "_models.ReportConfigSortingType"]] = None, **kwargs: Any - ) -> None: - """ - :keyword direction: Direction of sort. Known values are: "Ascending" and "Descending". - :paramtype direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingType - :keyword name: The name of the column to sort. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.direction = direction - self.name = name - - -class ReportConfigTimePeriod(_serialization.Model): - """The start and end date for pulling data for the report. - - All required parameters must be populated in order to send to server. - - :ivar from_property: The start date to pull data from. Required. - :vartype from_property: ~datetime.datetime - :ivar to: The end date to pull data to. Required. - :vartype to: ~datetime.datetime - """ - - _validation = { - "from_property": {"required": True}, - "to": {"required": True}, - } - - _attribute_map = { - "from_property": {"key": "from", "type": "iso-8601"}, - "to": {"key": "to", "type": "iso-8601"}, - } - - def __init__(self, *, from_property: datetime.datetime, to: datetime.datetime, **kwargs: Any) -> None: - """ - :keyword from_property: The start date to pull data from. Required. - :paramtype from_property: ~datetime.datetime - :keyword to: The end date to pull data to. Required. - :paramtype to: ~datetime.datetime - """ - super().__init__(**kwargs) - self.from_property = from_property - self.to = to - - -class SavingsPlanUtilizationSummary(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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar kind: Supported values: 'SavingsPlan'. Required. Known values are: "IncludedQuantity", - "Reservation", and "SavingsPlan". - :vartype kind: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. - :vartype arm_sku_name: str - :ivar benefit_id: The benefit ID is the identifier of the benefit. - :vartype benefit_id: str - :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. - :vartype benefit_order_id: str - :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar usage_date: 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. - :vartype usage_date: ~datetime.datetime - :ivar avg_utilization_percentage: This is the average hourly utilization for each date range - that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > - 2025-03-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. - :vartype avg_utilization_percentage: float - :ivar min_utilization_percentage: This is the minimum hourly utilization for each date range - that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > - 2025-03-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%. - :vartype min_utilization_percentage: float - :ivar max_utilization_percentage: This is the maximum hourly utilization for each date range - that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > - 2025-03-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%. - :vartype max_utilization_percentage: float - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "arm_sku_name": {"readonly": True}, - "benefit_id": {"readonly": True}, - "benefit_order_id": {"readonly": True}, - "usage_date": {"readonly": True}, - "avg_utilization_percentage": {"readonly": True}, - "min_utilization_percentage": {"readonly": True}, - "max_utilization_percentage": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "arm_sku_name": {"key": "properties.armSkuName", "type": "str"}, - "benefit_id": {"key": "properties.benefitId", "type": "str"}, - "benefit_order_id": {"key": "properties.benefitOrderId", "type": "str"}, - "benefit_type": {"key": "properties.benefitType", "type": "str"}, - "usage_date": {"key": "properties.usageDate", "type": "iso-8601"}, - "avg_utilization_percentage": {"key": "properties.avgUtilizationPercentage", "type": "float"}, - "min_utilization_percentage": {"key": "properties.minUtilizationPercentage", "type": "float"}, - "max_utilization_percentage": {"key": "properties.maxUtilizationPercentage", "type": "float"}, - } - - def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, **kwargs: Any) -> None: - """ - :keyword benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - super().__init__(**kwargs) - self.kind: str = "SavingsPlan" - self.arm_sku_name: Optional[str] = None - self.benefit_id: Optional[str] = None - self.benefit_order_id: Optional[str] = None - self.benefit_type = benefit_type - self.usage_date: Optional[datetime.datetime] = None - self.avg_utilization_percentage: Optional[float] = None - self.min_utilization_percentage: Optional[float] = None - self.max_utilization_percentage: Optional[float] = None - - -class SavingsPlanUtilizationSummaryProperties(BenefitUtilizationSummaryProperties): - """Savings plan utilization summary properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar arm_sku_name: ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan. - :vartype arm_sku_name: str - :ivar benefit_id: The benefit ID is the identifier of the benefit. - :vartype benefit_id: str - :ivar benefit_order_id: The benefit order ID is the identifier for a benefit purchase. - :vartype benefit_order_id: str - :ivar benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :vartype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - :ivar usage_date: 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. - :vartype usage_date: ~datetime.datetime - :ivar avg_utilization_percentage: This is the average hourly utilization for each date range - that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > - 2025-03-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. - :vartype avg_utilization_percentage: float - :ivar min_utilization_percentage: This is the minimum hourly utilization for each date range - that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > - 2025-03-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%. - :vartype min_utilization_percentage: float - :ivar max_utilization_percentage: This is the maximum hourly utilization for each date range - that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > - 2025-03-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%. - :vartype max_utilization_percentage: float - """ - - _validation = { - "arm_sku_name": {"readonly": True}, - "benefit_id": {"readonly": True}, - "benefit_order_id": {"readonly": True}, - "usage_date": {"readonly": True}, - "avg_utilization_percentage": {"readonly": True}, - "min_utilization_percentage": {"readonly": True}, - "max_utilization_percentage": {"readonly": True}, - } - - _attribute_map = { - "arm_sku_name": {"key": "armSkuName", "type": "str"}, - "benefit_id": {"key": "benefitId", "type": "str"}, - "benefit_order_id": {"key": "benefitOrderId", "type": "str"}, - "benefit_type": {"key": "benefitType", "type": "str"}, - "usage_date": {"key": "usageDate", "type": "iso-8601"}, - "avg_utilization_percentage": {"key": "avgUtilizationPercentage", "type": "float"}, - "min_utilization_percentage": {"key": "minUtilizationPercentage", "type": "float"}, - "max_utilization_percentage": {"key": "maxUtilizationPercentage", "type": "float"}, - } - - def __init__(self, *, benefit_type: Optional[Union[str, "_models.BenefitKind"]] = None, **kwargs: Any) -> None: - """ - :keyword benefit_type: The benefit type. Supported values: 'SavingsPlan'. Known values are: - "IncludedQuantity", "Reservation", and "SavingsPlan". - :paramtype benefit_type: str or ~azure.mgmt.costmanagement.models.BenefitKind - """ - super().__init__(benefit_type=benefit_type, **kwargs) - self.avg_utilization_percentage: Optional[float] = None - self.min_utilization_percentage: Optional[float] = None - self.max_utilization_percentage: Optional[float] = None - - -class ScheduledActionProxyResource(ProxyResource): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar e_tag: Resource Etag. For update calls, eTag is optional and can be specified to achieve - optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then - including the latest eTag as part of the request body or 'If-Match' header while performing the - update. For create calls, eTag is not required. - :vartype e_tag: str - :ivar kind: Kind of the scheduled action. Known values are: "Email" and "InsightAlert". - :vartype kind: str or ~azure.mgmt.costmanagement.models.ScheduledActionKind - :ivar system_data: Kind of the scheduled action. - :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "e_tag": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - def __init__(self, *, kind: Optional[Union[str, "_models.ScheduledActionKind"]] = None, **kwargs: Any) -> None: - """ - :keyword kind: Kind of the scheduled action. Known values are: "Email" and "InsightAlert". - :paramtype kind: str or ~azure.mgmt.costmanagement.models.ScheduledActionKind - """ - super().__init__(**kwargs) - self.e_tag: Optional[str] = None - self.kind = kind - self.system_data: Optional["_models.SystemData"] = None - - -class ScheduledAction(ScheduledActionProxyResource): - """Scheduled action definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar e_tag: Resource Etag. For update calls, eTag is optional and can be specified to achieve - optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then - including the latest eTag as part of the request body or 'If-Match' header while performing the - update. For create calls, eTag is not required. - :vartype e_tag: str - :ivar kind: Kind of the scheduled action. Known values are: "Email" and "InsightAlert". - :vartype kind: str or ~azure.mgmt.costmanagement.models.ScheduledActionKind - :ivar system_data: Kind of the scheduled action. - :vartype system_data: ~azure.mgmt.costmanagement.models.SystemData - :ivar display_name: Scheduled action name. - :vartype display_name: str - :ivar file_destination: Destination format of the view data. This is optional. - :vartype file_destination: ~azure.mgmt.costmanagement.models.FileDestination - :ivar notification: Notification properties based on scheduled action kind. - :vartype notification: ~azure.mgmt.costmanagement.models.NotificationProperties - :ivar notification_email: Email address of the point of contact that should get the unsubscribe - requests and notification emails. - :vartype notification_email: str - :ivar schedule: Schedule of the scheduled action. - :vartype schedule: ~azure.mgmt.costmanagement.models.ScheduleProperties - :ivar scope: For private scheduled action(Create or Update), scope will be empty.\\ :code:`
` For shared scheduled action(Create or Update By Scope), Cost Management scope can be - '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. - :vartype scope: str - :ivar status: Status of the scheduled action. Known values are: "Disabled", "Enabled", and - "Expired". - :vartype status: str or ~azure.mgmt.costmanagement.models.ScheduledActionStatus - :ivar view_id: Cost analysis viewId used for scheduled action. For example, - '/providers/Microsoft.CostManagement/views/swaggerExample'. - :vartype view_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "e_tag": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "file_destination": {"key": "properties.fileDestination", "type": "FileDestination"}, - "notification": {"key": "properties.notification", "type": "NotificationProperties"}, - "notification_email": {"key": "properties.notificationEmail", "type": "str"}, - "schedule": {"key": "properties.schedule", "type": "ScheduleProperties"}, - "scope": {"key": "properties.scope", "type": "str"}, - "status": {"key": "properties.status", "type": "str"}, - "view_id": {"key": "properties.viewId", "type": "str"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword kind: Kind of the scheduled action. Known values are: "Email" and "InsightAlert". - :paramtype kind: str or ~azure.mgmt.costmanagement.models.ScheduledActionKind - :keyword display_name: Scheduled action name. - :paramtype display_name: str - :keyword file_destination: Destination format of the view data. This is optional. - :paramtype file_destination: ~azure.mgmt.costmanagement.models.FileDestination - :keyword notification: Notification properties based on scheduled action kind. - :paramtype notification: ~azure.mgmt.costmanagement.models.NotificationProperties - :keyword notification_email: Email address of the point of contact that should get the - unsubscribe requests and notification emails. - :paramtype notification_email: str - :keyword schedule: Schedule of the scheduled action. - :paramtype schedule: ~azure.mgmt.costmanagement.models.ScheduleProperties - :keyword scope: For private scheduled action(Create or Update), scope will be empty.\\ - :code:`
` For shared scheduled action(Create or Update By Scope), Cost Management scope - can be '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. - :paramtype scope: str - :keyword status: Status of the scheduled action. Known values are: "Disabled", "Enabled", and - "Expired". - :paramtype status: str or ~azure.mgmt.costmanagement.models.ScheduledActionStatus - :keyword view_id: Cost analysis viewId used for scheduled action. For example, - '/providers/Microsoft.CostManagement/views/swaggerExample'. - :paramtype view_id: str - """ - super().__init__(kind=kind, **kwargs) - self.display_name = display_name - self.file_destination = file_destination - self.notification = notification - self.notification_email = notification_email - self.schedule = schedule - self.scope = scope - self.status = status - self.view_id = view_id - - -class ScheduledActionListResult(_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. - - :ivar value: The list of scheduled actions. - :vartype value: list[~azure.mgmt.costmanagement.models.ScheduledAction] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ScheduledAction]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ScheduledAction"]] = None - self.next_link: Optional[str] = None - - -class ScheduleProperties(_serialization.Model): - """The properties of the schedule. - - All required parameters must be populated in order to send to server. - - :ivar frequency: Frequency of the schedule. Required. Known values are: "Daily", "Weekly", and - "Monthly". - :vartype frequency: str or ~azure.mgmt.costmanagement.models.ScheduleFrequency - :ivar hour_of_day: UTC time at which cost analysis data will be emailed. - :vartype hour_of_day: int - :ivar days_of_week: Day names in english on which cost analysis data will be emailed. This - property is applicable when frequency is Weekly or Monthly. - :vartype days_of_week: list[str or ~azure.mgmt.costmanagement.models.DaysOfWeek] - :ivar weeks_of_month: Weeks in which cost analysis data will be emailed. This property is - applicable when frequency is Monthly and used in combination with daysOfWeek. - :vartype weeks_of_month: list[str or ~azure.mgmt.costmanagement.models.WeeksOfMonth] - :ivar day_of_month: 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. - :vartype day_of_month: int - :ivar start_date: The start date and time of the scheduled action (UTC). Required. - :vartype start_date: ~datetime.datetime - :ivar end_date: The end date and time of the scheduled action (UTC). Required. - :vartype end_date: ~datetime.datetime - """ - - _validation = { - "frequency": {"required": True}, - "start_date": {"required": True}, - "end_date": {"required": True}, - } - - _attribute_map = { - "frequency": {"key": "frequency", "type": "str"}, - "hour_of_day": {"key": "hourOfDay", "type": "int"}, - "days_of_week": {"key": "daysOfWeek", "type": "[str]"}, - "weeks_of_month": {"key": "weeksOfMonth", "type": "[str]"}, - "day_of_month": {"key": "dayOfMonth", "type": "int"}, - "start_date": {"key": "startDate", "type": "iso-8601"}, - "end_date": {"key": "endDate", "type": "iso-8601"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword frequency: Frequency of the schedule. Required. Known values are: "Daily", "Weekly", - and "Monthly". - :paramtype frequency: str or ~azure.mgmt.costmanagement.models.ScheduleFrequency - :keyword hour_of_day: UTC time at which cost analysis data will be emailed. - :paramtype hour_of_day: int - :keyword days_of_week: Day names in english on which cost analysis data will be emailed. This - property is applicable when frequency is Weekly or Monthly. - :paramtype days_of_week: list[str or ~azure.mgmt.costmanagement.models.DaysOfWeek] - :keyword weeks_of_month: Weeks in which cost analysis data will be emailed. This property is - applicable when frequency is Monthly and used in combination with daysOfWeek. - :paramtype weeks_of_month: list[str or ~azure.mgmt.costmanagement.models.WeeksOfMonth] - :keyword day_of_month: 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. - :paramtype day_of_month: int - :keyword start_date: The start date and time of the scheduled action (UTC). Required. - :paramtype start_date: ~datetime.datetime - :keyword end_date: The end date and time of the scheduled action (UTC). Required. - :paramtype end_date: ~datetime.datetime - """ - super().__init__(**kwargs) - self.frequency = frequency - self.hour_of_day = hour_of_day - self.days_of_week = days_of_week - self.weeks_of_month = weeks_of_month - self.day_of_month = day_of_month - self.start_date = start_date - self.end_date = end_date - - -class Setting(ProxyResource): - """Setting definition. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - TagInheritanceSetting - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar kind: Specifies the kind of settings. Required. "taginheritance" - :vartype kind: str or ~azure.mgmt.costmanagement.models.SettingsKind - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - } - - _subtype_map = {"kind": {"taginheritance": "TagInheritanceSetting"}} - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.kind: Optional[str] = None - - -class SettingsListResult(_serialization.Model): - """Setting list result. It contains a list of settings. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of settings. - :vartype value: list[~azure.mgmt.costmanagement.models.Setting] - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Setting]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Setting"]] = None - - -class SharedScopeBenefitRecommendationProperties(BenefitRecommendationProperties): # pylint: disable=name-too-long - """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 server. - - :ivar first_consumption_date: The first usage date used for looking back for computing the - recommendations. - :vartype first_consumption_date: ~datetime.datetime - :ivar last_consumption_date: The last usage date used for looking back for computing the - recommendations. - :vartype last_consumption_date: ~datetime.datetime - :ivar look_back_period: The number of days of usage evaluated for computing the - recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". - :vartype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod - :ivar total_hours: The total hours for which the cost is covered. Its equal to number of - records in a property 'properties/usage/charges'. - :vartype total_hours: int - :ivar usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that were - used for computing benefit recommendations. - :vartype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails - :ivar arm_sku_name: ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan. - :vartype arm_sku_name: str - :ivar term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and - "P3Y". - :vartype term: str or ~azure.mgmt.costmanagement.models.Term - :ivar commitment_granularity: Grain of the proposed commitment amount. Supported values: - 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". - :vartype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain - :ivar currency_code: An ISO 4217 currency code identifier for the costs and savings amounts. - :vartype currency_code: str - :ivar cost_without_benefit: The current cost without benefit, corresponds to 'totalHours' in - the look-back period. - :vartype cost_without_benefit: float - :ivar recommendation_details: The details of the proposed recommendation. - :vartype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails - :ivar all_recommendation_details: The list of all benefit recommendations with the - recommendation details. - :vartype all_recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsList - :ivar scope: Benefit scope. For example, Single or Shared. Required. Known values are: "Single" - and "Shared". - :vartype scope: str or ~azure.mgmt.costmanagement.models.Scope - """ - - _validation = { - "first_consumption_date": {"readonly": True}, - "last_consumption_date": {"readonly": True}, - "total_hours": {"readonly": True}, - "arm_sku_name": {"readonly": True}, - "currency_code": {"readonly": True}, - "cost_without_benefit": {"readonly": True}, - "all_recommendation_details": {"readonly": True}, - "scope": {"required": True}, - } - - _attribute_map = { - "first_consumption_date": {"key": "firstConsumptionDate", "type": "iso-8601"}, - "last_consumption_date": {"key": "lastConsumptionDate", "type": "iso-8601"}, - "look_back_period": {"key": "lookBackPeriod", "type": "str"}, - "total_hours": {"key": "totalHours", "type": "int"}, - "usage": {"key": "usage", "type": "RecommendationUsageDetails"}, - "arm_sku_name": {"key": "armSkuName", "type": "str"}, - "term": {"key": "term", "type": "str"}, - "commitment_granularity": {"key": "commitmentGranularity", "type": "str"}, - "currency_code": {"key": "currencyCode", "type": "str"}, - "cost_without_benefit": {"key": "costWithoutBenefit", "type": "float"}, - "recommendation_details": {"key": "recommendationDetails", "type": "AllSavingsBenefitDetails"}, - "all_recommendation_details": {"key": "allRecommendationDetails", "type": "AllSavingsList"}, - "scope": {"key": "scope", "type": "str"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword look_back_period: The number of days of usage evaluated for computing the - recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". - :paramtype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod - :keyword usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that - were used for computing benefit recommendations. - :paramtype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails - :keyword term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and - "P3Y". - :paramtype term: str or ~azure.mgmt.costmanagement.models.Term - :keyword commitment_granularity: Grain of the proposed commitment amount. Supported values: - 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". - :paramtype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain - :keyword recommendation_details: The details of the proposed recommendation. - :paramtype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails - """ - super().__init__( - look_back_period=look_back_period, - usage=usage, - term=term, - commitment_granularity=commitment_granularity, - recommendation_details=recommendation_details, - **kwargs - ) - self.scope: str = "Shared" - - -class SingleScopeBenefitRecommendationProperties(BenefitRecommendationProperties): # pylint: disable=name-too-long - """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 server. - - :ivar first_consumption_date: The first usage date used for looking back for computing the - recommendations. - :vartype first_consumption_date: ~datetime.datetime - :ivar last_consumption_date: The last usage date used for looking back for computing the - recommendations. - :vartype last_consumption_date: ~datetime.datetime - :ivar look_back_period: The number of days of usage evaluated for computing the - recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". - :vartype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod - :ivar total_hours: The total hours for which the cost is covered. Its equal to number of - records in a property 'properties/usage/charges'. - :vartype total_hours: int - :ivar usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that were - used for computing benefit recommendations. - :vartype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails - :ivar arm_sku_name: ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan. - :vartype arm_sku_name: str - :ivar term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and - "P3Y". - :vartype term: str or ~azure.mgmt.costmanagement.models.Term - :ivar commitment_granularity: Grain of the proposed commitment amount. Supported values: - 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". - :vartype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain - :ivar currency_code: An ISO 4217 currency code identifier for the costs and savings amounts. - :vartype currency_code: str - :ivar cost_without_benefit: The current cost without benefit, corresponds to 'totalHours' in - the look-back period. - :vartype cost_without_benefit: float - :ivar recommendation_details: The details of the proposed recommendation. - :vartype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails - :ivar all_recommendation_details: The list of all benefit recommendations with the - recommendation details. - :vartype all_recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsList - :ivar scope: Benefit scope. For example, Single or Shared. Required. Known values are: "Single" - and "Shared". - :vartype scope: str or ~azure.mgmt.costmanagement.models.Scope - :ivar subscription_id: The subscription ID that this single scope recommendation is for. - Applicable only if recommendation is for 'Single' scope. - :vartype subscription_id: str - :ivar resource_group: The resource group that this single scope recommendation is for. - Applicable only if recommendation is for 'Single' scope and 'ResourceGroup' request scope. - :vartype resource_group: str - """ - - _validation = { - "first_consumption_date": {"readonly": True}, - "last_consumption_date": {"readonly": True}, - "total_hours": {"readonly": True}, - "arm_sku_name": {"readonly": True}, - "currency_code": {"readonly": True}, - "cost_without_benefit": {"readonly": True}, - "all_recommendation_details": {"readonly": True}, - "scope": {"required": True}, - "subscription_id": {"readonly": True}, - "resource_group": {"readonly": True}, - } - - _attribute_map = { - "first_consumption_date": {"key": "firstConsumptionDate", "type": "iso-8601"}, - "last_consumption_date": {"key": "lastConsumptionDate", "type": "iso-8601"}, - "look_back_period": {"key": "lookBackPeriod", "type": "str"}, - "total_hours": {"key": "totalHours", "type": "int"}, - "usage": {"key": "usage", "type": "RecommendationUsageDetails"}, - "arm_sku_name": {"key": "armSkuName", "type": "str"}, - "term": {"key": "term", "type": "str"}, - "commitment_granularity": {"key": "commitmentGranularity", "type": "str"}, - "currency_code": {"key": "currencyCode", "type": "str"}, - "cost_without_benefit": {"key": "costWithoutBenefit", "type": "float"}, - "recommendation_details": {"key": "recommendationDetails", "type": "AllSavingsBenefitDetails"}, - "all_recommendation_details": {"key": "allRecommendationDetails", "type": "AllSavingsList"}, - "scope": {"key": "scope", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group": {"key": "resourceGroup", "type": "str"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword look_back_period: The number of days of usage evaluated for computing the - recommendations. Known values are: "Last7Days", "Last30Days", and "Last60Days". - :paramtype look_back_period: str or ~azure.mgmt.costmanagement.models.LookBackPeriod - :keyword usage: On-demand charges between firstConsumptionDate and lastConsumptionDate that - were used for computing benefit recommendations. - :paramtype usage: ~azure.mgmt.costmanagement.models.RecommendationUsageDetails - :keyword term: Term period of the benefit. For example, P1Y or P3Y. Known values are: "P1Y" and - "P3Y". - :paramtype term: str or ~azure.mgmt.costmanagement.models.Term - :keyword commitment_granularity: Grain of the proposed commitment amount. Supported values: - 'Hourly'. Known values are: "Hourly", "Daily", and "Monthly". - :paramtype commitment_granularity: str or ~azure.mgmt.costmanagement.models.Grain - :keyword recommendation_details: The details of the proposed recommendation. - :paramtype recommendation_details: ~azure.mgmt.costmanagement.models.AllSavingsBenefitDetails - """ - super().__init__( - look_back_period=look_back_period, - usage=usage, - term=term, - commitment_granularity=commitment_granularity, - recommendation_details=recommendation_details, - **kwargs - ) - self.scope: str = "Single" - self.subscription_id: Optional[str] = None - self.resource_group: Optional[str] = None - - -class SourceCostAllocationResource(CostAllocationResource): - """Source resources for cost allocation. - - All required parameters must be populated in order to send to server. - - :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known - values are: "Dimension" and "Tag". - :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType - :ivar name: If resource type is dimension, this must be either ResourceGroupName or - SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. - :vartype name: str - :ivar values: Source Resources for cost allocation. This list cannot contain more than 25 - values. Required. - :vartype values: list[str] - """ - - _validation = { - "resource_type": {"required": True}, - "name": {"required": True}, - "values": {"required": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "values": {"key": "values", "type": "[str]"}, - } - - def __init__( - self, - *, - resource_type: Union[str, "_models.CostAllocationResourceType"], - name: str, - values: list[str], - **kwargs: Any - ) -> None: - """ - :keyword resource_type: Type of resources contained in this cost allocation rule. Required. - Known values are: "Dimension" and "Tag". - :paramtype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType - :keyword name: If resource type is dimension, this must be either ResourceGroupName or - SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. - :paramtype name: str - :keyword values: Source Resources for cost allocation. This list cannot contain more than 25 - values. Required. - :paramtype values: list[str] - """ - super().__init__(resource_type=resource_type, name=name, **kwargs) - self.values = values - - -class Status(_serialization.Model): - """The status of the long running operation. - - :ivar status: The status of the long running operation. Known values are: "InProgress", - "Completed", "Failed", "Queued", "NoDataFound", "ReadyToDownload", and "TimedOut". - :vartype status: str or ~azure.mgmt.costmanagement.models.ReportOperationStatusType - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - } - - def __init__( - self, *, status: Optional[Union[str, "_models.ReportOperationStatusType"]] = None, **kwargs: Any - ) -> None: - """ - :keyword status: The status of the long running operation. Known values are: "InProgress", - "Completed", "Failed", "Queued", "NoDataFound", "ReadyToDownload", and "TimedOut". - :paramtype status: str or ~azure.mgmt.costmanagement.models.ReportOperationStatusType - """ - super().__init__(**kwargs) - self.status = status - - -class SystemAssignedServiceIdentity(_serialization.Model): - """Managed service identity (either system assigned, or none). - - 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 server. - - :ivar principal_id: The service principal ID of the system assigned identity. This property - will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be - provided for a system assigned identity. - :vartype tenant_id: str - :ivar type: Type of managed service identity (either system assigned, or none). Required. Known - values are: "None" and "SystemAssigned". - :vartype type: str or ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType - """ - - _validation = { - "principal_id": {"readonly": True}, - "tenant_id": {"readonly": True}, - "type": {"required": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, type: Union[str, "_models.SystemAssignedServiceIdentityType"], **kwargs: Any) -> None: - """ - :keyword type: Type of managed service identity (either system assigned, or none). Required. - Known values are: "None" and "SystemAssigned". - :paramtype type: str or ~azure.mgmt.costmanagement.models.SystemAssignedServiceIdentityType - """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.tenant_id: Optional[str] = None - self.type = type - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.costmanagement.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.costmanagement.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - "created_by": {"key": "createdBy", "type": "str"}, - "created_by_type": {"key": "createdByType", "type": "str"}, - "created_at": {"key": "createdAt", "type": "iso-8601"}, - "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, - "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, - "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, - } - - def __init__( - self, - *, - 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: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~azure.mgmt.costmanagement.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.costmanagement.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super().__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TagInheritanceProperties(_serialization.Model): - """The properties of the tag inheritance setting. - - All required parameters must be populated in order to send to server. - - :ivar prefer_container_tags: This property defines the behavior when an inherited tag being - applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to - true - when tags match, the highest scope tags will be applied. Billing profile is the highest - scope, followed by invoice sections, subscriptions and resource groups (allows overriding of - lower scope tag values). If set to false - when tags match, the lowest scope tags will be - applied. So, if a resource has the same tag as a subscription tag, the resource tag will be - applied (does not allow overriding of lower scope tag values). Required. - :vartype prefer_container_tags: bool - """ - - _validation = { - "prefer_container_tags": {"required": True}, - } - - _attribute_map = { - "prefer_container_tags": {"key": "preferContainerTags", "type": "bool"}, - } - - def __init__(self, *, prefer_container_tags: bool, **kwargs: Any) -> None: - """ - :keyword prefer_container_tags: This property defines the behavior when an inherited tag being - applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to - true - when tags match, the highest scope tags will be applied. Billing profile is the highest - scope, followed by invoice sections, subscriptions and resource groups (allows overriding of - lower scope tag values). If set to false - when tags match, the lowest scope tags will be - applied. So, if a resource has the same tag as a subscription tag, the resource tag will be - applied (does not allow overriding of lower scope tag values). Required. - :paramtype prefer_container_tags: bool - """ - super().__init__(**kwargs) - self.prefer_container_tags = prefer_container_tags - - -class TagInheritanceSetting(Setting): - """Tag Inheritance Setting definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar kind: Specifies the kind of settings. Required. "taginheritance" - :vartype kind: str or ~azure.mgmt.costmanagement.models.SettingsKind - :ivar properties: The properties of the tag inheritance setting. - :vartype properties: ~azure.mgmt.costmanagement.models.TagInheritanceProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "properties": {"key": "properties", "type": "TagInheritanceProperties"}, - } - - def __init__(self, *, properties: Optional["_models.TagInheritanceProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the tag inheritance setting. - :paramtype properties: ~azure.mgmt.costmanagement.models.TagInheritanceProperties - """ - super().__init__(**kwargs) - self.kind: str = "taginheritance" - self.properties = properties - - -class TargetCostAllocationResource(CostAllocationResource): - """Target resources for cost allocation. - - All required parameters must be populated in order to send to server. - - :ivar resource_type: Type of resources contained in this cost allocation rule. Required. Known - values are: "Dimension" and "Tag". - :vartype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType - :ivar name: If resource type is dimension, this must be either ResourceGroupName or - SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. - :vartype name: str - :ivar values: Target resources for cost allocation. This list cannot contain more than 25 - values. Required. - :vartype values: list[~azure.mgmt.costmanagement.models.CostAllocationProportion] - :ivar policy_type: Method of cost allocation for the rule. Required. "FixedProportion" - :vartype policy_type: str or ~azure.mgmt.costmanagement.models.CostAllocationPolicyType - """ - - _validation = { - "resource_type": {"required": True}, - "name": {"required": True}, - "values": {"required": True}, - "policy_type": {"required": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "values": {"key": "values", "type": "[CostAllocationProportion]"}, - "policy_type": {"key": "policyType", "type": "str"}, - } - - def __init__( - self, - *, - resource_type: Union[str, "_models.CostAllocationResourceType"], - name: str, - values: list["_models.CostAllocationProportion"], - policy_type: Union[str, "_models.CostAllocationPolicyType"], - **kwargs: Any - ) -> None: - """ - :keyword resource_type: Type of resources contained in this cost allocation rule. Required. - Known values are: "Dimension" and "Tag". - :paramtype resource_type: str or ~azure.mgmt.costmanagement.models.CostAllocationResourceType - :keyword name: If resource type is dimension, this must be either ResourceGroupName or - SubscriptionId. If resource type is tag, this must be a valid Azure tag. Required. - :paramtype name: str - :keyword values: Target resources for cost allocation. This list cannot contain more than 25 - values. Required. - :paramtype values: list[~azure.mgmt.costmanagement.models.CostAllocationProportion] - :keyword policy_type: Method of cost allocation for the rule. Required. "FixedProportion" - :paramtype policy_type: str or ~azure.mgmt.costmanagement.models.CostAllocationPolicyType - """ - super().__init__(resource_type=resource_type, name=name, **kwargs) - self.values = values - self.policy_type = policy_type - - -class View(CostManagementProxyResource): - """States and configurations of Cost Analysis. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar e_tag: 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. - :vartype e_tag: str - :ivar display_name: User input name of the view. Required. - :vartype display_name: str - :ivar scope: 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. - :vartype scope: str - :ivar created_on: Date the user created this view. - :vartype created_on: ~datetime.datetime - :ivar modified_on: Date when the user last modified this view. - :vartype modified_on: ~datetime.datetime - :ivar date_range: Date range of the current view. - :vartype date_range: str - :ivar currency: Currency of the current view. - :vartype currency: str - :ivar chart: Chart type of the main view in Cost Analysis. Required. Known values are: "Area", - "Line", "StackedColumn", "GroupedColumn", and "Table". - :vartype chart: str or ~azure.mgmt.costmanagement.models.ChartType - :ivar accumulated: Show costs accumulated over time. Known values are: "true" and "false". - :vartype accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType - :ivar metric: Metric to use when displaying costs. Known values are: "ActualCost", - "AmortizedCost", and "AHUB". - :vartype metric: str or ~azure.mgmt.costmanagement.models.MetricType - :ivar kpis: List of KPIs to show in Cost Analysis UI. - :vartype kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] - :ivar pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :vartype pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] - :ivar type_properties_query_type: 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" - :vartype type_properties_query_type: str or ~azure.mgmt.costmanagement.models.ReportType - :ivar timeframe: 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". - :vartype timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType - :ivar time_period: Has time period for pulling data for the report. - :vartype time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod - :ivar data_set: Has definition for data in this report config. - :vartype data_set: ~azure.mgmt.costmanagement.models.ReportConfigDataset - :ivar include_monetary_commitment: If true, report includes monetary commitment. - :vartype include_monetary_commitment: bool - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "created_on": {"readonly": True}, - "currency": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "display_name": {"key": "properties.displayName", "type": "str"}, - "scope": {"key": "properties.scope", "type": "str"}, - "created_on": {"key": "properties.createdOn", "type": "iso-8601"}, - "modified_on": {"key": "properties.modifiedOn", "type": "iso-8601"}, - "date_range": {"key": "properties.dateRange", "type": "str"}, - "currency": {"key": "properties.currency", "type": "str"}, - "chart": {"key": "properties.chart", "type": "str"}, - "accumulated": {"key": "properties.accumulated", "type": "str"}, - "metric": {"key": "properties.metric", "type": "str"}, - "kpis": {"key": "properties.kpis", "type": "[KpiProperties]"}, - "pivots": {"key": "properties.pivots", "type": "[PivotProperties]"}, - "type_properties_query_type": {"key": "properties.query.type", "type": "str"}, - "timeframe": {"key": "properties.query.timeframe", "type": "str"}, - "time_period": {"key": "properties.query.timePeriod", "type": "ReportConfigTimePeriod"}, - "data_set": {"key": "properties.query.dataSet", "type": "ReportConfigDataset"}, - "include_monetary_commitment": {"key": "properties.query.includeMonetaryCommitment", "type": "bool"}, - } - - def __init__( - self, - *, - e_tag: Optional[str] = None, - display_name: Optional[str] = None, - scope: Optional[str] = None, - modified_on: Optional[datetime.datetime] = None, - date_range: 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: Any - ) -> None: - """ - :keyword e_tag: 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. - :paramtype e_tag: str - :keyword display_name: User input name of the view. Required. - :paramtype display_name: str - :keyword scope: 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. - :paramtype scope: str - :keyword modified_on: Date when the user last modified this view. - :paramtype modified_on: ~datetime.datetime - :keyword date_range: Date range of the current view. - :paramtype date_range: str - :keyword chart: Chart type of the main view in Cost Analysis. Required. Known values are: - "Area", "Line", "StackedColumn", "GroupedColumn", and "Table". - :paramtype chart: str or ~azure.mgmt.costmanagement.models.ChartType - :keyword accumulated: Show costs accumulated over time. Known values are: "true" and "false". - :paramtype accumulated: str or ~azure.mgmt.costmanagement.models.AccumulatedType - :keyword metric: Metric to use when displaying costs. Known values are: "ActualCost", - "AmortizedCost", and "AHUB". - :paramtype metric: str or ~azure.mgmt.costmanagement.models.MetricType - :keyword kpis: List of KPIs to show in Cost Analysis UI. - :paramtype kpis: list[~azure.mgmt.costmanagement.models.KpiProperties] - :keyword pivots: Configuration of 3 sub-views in the Cost Analysis UI. - :paramtype pivots: list[~azure.mgmt.costmanagement.models.PivotProperties] - :keyword type_properties_query_type: 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" - :paramtype type_properties_query_type: str or ~azure.mgmt.costmanagement.models.ReportType - :keyword timeframe: 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". - :paramtype timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType - :keyword time_period: Has time period for pulling data for the report. - :paramtype time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod - :keyword data_set: Has definition for data in this report config. - :paramtype data_set: ~azure.mgmt.costmanagement.models.ReportConfigDataset - :keyword include_monetary_commitment: If true, report includes monetary commitment. - :paramtype include_monetary_commitment: bool - """ - super().__init__(e_tag=e_tag, **kwargs) - self.display_name = display_name - self.scope = scope - self.created_on: Optional[datetime.datetime] = None - self.modified_on = modified_on - self.date_range = date_range - self.currency: Optional[str] = None - self.chart = chart - self.accumulated = accumulated - self.metric = metric - self.kpis = kpis - self.pivots = pivots - self.type_properties_query_type = type_properties_query_type - self.timeframe = timeframe - self.time_period = time_period - self.data_set = data_set - self.include_monetary_commitment = include_monetary_commitment - - -class ViewListResult(_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. - - :ivar value: The list of views. - :vartype value: list[~azure.mgmt.costmanagement.models.View] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[View]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.View"]] = None - self.next_link: Optional[str] = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py index cf144b3ea8d6..bc4eaae38dab 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,52 +12,52 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import GenerateDetailedCostReportOperationStatusOperations # type: ignore from ._operations import Operations # type: ignore -from ._cost_allocation_rules_operations import CostAllocationRulesOperations # type: ignore -from ._benefit_recommendations_operations import BenefitRecommendationsOperations # type: ignore -from ._benefit_utilization_summaries_operations import BenefitUtilizationSummariesOperations # type: ignore -from ._generate_benefit_utilization_summaries_report_operations import GenerateBenefitUtilizationSummariesReportOperations # type: ignore -from ._budgets_operations import BudgetsOperations # type: ignore -from ._exports_operations import ExportsOperations # type: ignore -from ._generate_cost_details_report_operations import GenerateCostDetailsReportOperations # type: ignore -from ._generate_detailed_cost_report_operations import GenerateDetailedCostReportOperations # type: ignore -from ._generate_detailed_cost_report_operation_results_operations import GenerateDetailedCostReportOperationResultsOperations # type: ignore -from ._generate_detailed_cost_report_operation_status_operations import GenerateDetailedCostReportOperationStatusOperations # type: ignore -from ._views_operations import ViewsOperations # type: ignore -from ._alerts_operations import AlertsOperations # type: ignore -from ._forecast_operations import ForecastOperations # type: ignore -from ._dimensions_operations import DimensionsOperations # type: ignore -from ._query_operations import QueryOperations # type: ignore -from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations # type: ignore -from ._price_sheet_operations import PriceSheetOperations # type: ignore -from ._scheduled_actions_operations import ScheduledActionsOperations # type: ignore -from ._settings_operations import SettingsOperations # type: ignore +from ._operations import BudgetsOperations # type: ignore +from ._operations import ExportsOperations # type: ignore +from ._operations import GenerateDetailedCostReportOperationResultsOperations # type: ignore +from ._operations import ViewsOperations # type: ignore +from ._operations import AlertsOperations # type: ignore +from ._operations import ScheduledActionsOperations # type: ignore +from ._operations import SettingsOperations # type: ignore +from ._operations import GenerateCostDetailsReportOperations # type: ignore +from ._operations import CostAllocationRulesOperations # type: ignore +from ._operations import BenefitRecommendationsOperations # type: ignore +from ._operations import BenefitUtilizationSummariesOperations # type: ignore +from ._operations import GenerateBenefitUtilizationSummariesReportOperations # type: ignore +from ._operations import GenerateDetailedCostReportOperations # type: ignore +from ._operations import ForecastOperations # type: ignore +from ._operations import DimensionsOperations # type: ignore +from ._operations import QueryOperations # type: ignore +from ._operations import GenerateReservationDetailsReportOperations # type: ignore +from ._operations import PriceSheetOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "GenerateDetailedCostReportOperationStatusOperations", "Operations", - "CostAllocationRulesOperations", - "BenefitRecommendationsOperations", - "BenefitUtilizationSummariesOperations", - "GenerateBenefitUtilizationSummariesReportOperations", "BudgetsOperations", "ExportsOperations", - "GenerateCostDetailsReportOperations", - "GenerateDetailedCostReportOperations", "GenerateDetailedCostReportOperationResultsOperations", - "GenerateDetailedCostReportOperationStatusOperations", "ViewsOperations", "AlertsOperations", + "ScheduledActionsOperations", + "SettingsOperations", + "GenerateCostDetailsReportOperations", + "CostAllocationRulesOperations", + "BenefitRecommendationsOperations", + "BenefitUtilizationSummariesOperations", + "GenerateBenefitUtilizationSummariesReportOperations", + "GenerateDetailedCostReportOperations", "ForecastOperations", "DimensionsOperations", "QueryOperations", "GenerateReservationDetailsReportOperations", "PriceSheetOperations", - "ScheduledActionsOperations", - "SettingsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py deleted file mode 100644 index 9cf118310c9f..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_alerts_operations.py +++ /dev/null @@ -1,560 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/alerts") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(scope: str, alert_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "alertId": _SERIALIZER.url("alert_id", alert_id, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_dismiss_request(scope: str, alert_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "alertId": _SERIALIZER.url("alert_id", alert_id, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_external_request( - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts", - ) - path_format_arguments = { - "externalCloudProviderType": _SERIALIZER.url( - "external_cloud_provider_type", external_cloud_provider_type, "str" - ), - "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class AlertsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`alerts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: - """Lists the alerts for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - - _request = build_list_request( - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: - """Gets the alert for the scope by alert ID. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - - _request = build_get_request( - scope=scope, - alert_id=alert_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Alert", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def dismiss( - self, - scope: str, - alert_id: str, - parameters: _models.DismissAlertPayload, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Alert: - """Dismisses the specified alert. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :param parameters: Parameters supplied to the Dismiss Alert operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def dismiss( - self, scope: str, alert_id: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Alert: - """Dismisses the specified alert. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :param parameters: Parameters supplied to the Dismiss Alert operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def dismiss( - self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, IO[bytes]], **kwargs: Any - ) -> _models.Alert: - """Dismisses the specified alert. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with alerts operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param alert_id: Alert ID. Required. - :type alert_id: str - :param parameters: Parameters supplied to the Dismiss Alert operation. Is either a - DismissAlertPayload type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or IO[bytes] - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DismissAlertPayload") - - _request = build_dismiss_request( - scope=scope, - alert_id=alert_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Alert", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_external( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - **kwargs: Any - ) -> _models.AlertsResult: - """Lists the Alerts for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :return: AlertsResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.AlertsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) - - _request = build_list_external_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AlertsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py deleted file mode 100644 index d8e6ea1945cc..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_recommendations_operations.py +++ /dev/null @@ -1,208 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - billing_scope: str, - *, - filter: Optional[str] = None, - orderby: Optional[str] = None, - expand: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations") - path_format_arguments = { - "billingScope": _SERIALIZER.url("billing_scope", billing_scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if orderby is not None: - _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class BenefitRecommendationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`benefit_recommendations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - billing_scope: str, - filter: Optional[str] = None, - orderby: Optional[str] = None, - expand: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.BenefitRecommendationModel"]: - """List of recommendations for purchasing savings plan. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param billing_scope: The scope associated with benefit recommendation operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, - /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement - scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type billing_scope: str - :param filter: Can be used to filter benefitRecommendations by: properties/scope with allowed - values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with - allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; - properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; - properties/subscriptionId; properties/resourceGroup. Default value is None. - :type filter: str - :param orderby: May be used to order the recommendations by: properties/armSkuName. For the - savings plan, the results are in order by default. There is no need to use this clause. Default - value is None. - :type orderby: str - :param expand: May be used to expand the properties by: properties/usage, - properties/allRecommendationDetails. Default value is None. - :type expand: str - :return: An iterator like instance of either BenefitRecommendationModel or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitRecommendationModel] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitRecommendationsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - billing_scope=billing_scope, - filter=filter, - orderby=orderby, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitRecommendationsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py deleted file mode 100644 index 7c9e81c31ebf..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_benefit_utilization_summaries_operations.py +++ /dev/null @@ -1,614 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_billing_account_id_request( - billing_account_id: str, - *, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if grain_parameter is not None: - _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") - if filter is not None: - _params["filter"] = _SERIALIZER.query("filter", filter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_billing_profile_id_request( - billing_account_id: str, - billing_profile_id: str, - *, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if grain_parameter is not None: - _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") - if filter is not None: - _params["filter"] = _SERIALIZER.query("filter", filter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_savings_plan_order_request( - savings_plan_order_id: str, - *, - filter: Optional[str] = None, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) - path_format_arguments = { - "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if grain_parameter is not None: - _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_savings_plan_id_request( - savings_plan_order_id: str, - savings_plan_id: str, - *, - filter: Optional[str] = None, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries", - ) - path_format_arguments = { - "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), - "savingsPlanId": _SERIALIZER.url("savings_plan_id", savings_plan_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if grain_parameter is not None: - _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class BenefitUtilizationSummariesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`benefit_utilization_summaries` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_billing_account_id( - self, - billing_account_id: str, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.BenefitUtilizationSummary"]: - """Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain - values: 'Daily' and 'Monthly'. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and - properties/usageDate. Default value is None. - :type filter: str - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_billing_account_id_request( - billing_account_id=billing_account_id, - grain_parameter=grain_parameter, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_billing_profile_id( - self, - billing_account_id: str, - billing_profile_id: str, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> ItemPaged["_models.BenefitUtilizationSummary"]: - """Lists savings plan utilization summaries for billing profile. Supported at grain values: - 'Daily' and 'Monthly'. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :param filter: Supports filtering by properties/benefitId, properties/benefitOrderId and - properties/usageDate. Default value is None. - :type filter: str - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_billing_profile_id_request( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - grain_parameter=grain_parameter, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_savings_plan_order( - self, - savings_plan_order_id: str, - filter: Optional[str] = None, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - **kwargs: Any - ) -> ItemPaged["_models.BenefitUtilizationSummary"]: - """Lists the savings plan utilization summaries for daily or monthly grain. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param filter: Supports filtering by properties/usageDate. Default value is None. - :type filter: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_savings_plan_order_request( - savings_plan_order_id=savings_plan_order_id, - filter=filter, - grain_parameter=grain_parameter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - filter: Optional[str] = None, - grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, - **kwargs: Any - ) -> ItemPaged["_models.BenefitUtilizationSummary"]: - """Lists the savings plan utilization summaries for daily or monthly grain. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param filter: Supports filtering by properties/usageDate. Default value is None. - :type filter: str - :param grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default - value is None. - :type grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter - :return: An iterator like instance of either BenefitUtilizationSummary or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BenefitUtilizationSummariesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_savings_plan_id_request( - savings_plan_order_id=savings_plan_order_id, - savings_plan_id=savings_plan_id, - filter=filter, - grain_parameter=grain_parameter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BenefitUtilizationSummariesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py deleted file mode 100644 index 1e368ba81552..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_budgets_operations.py +++ /dev/null @@ -1,815 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "budgetName": _SERIALIZER.url( - "budget_name", budget_name, "str", max_length=63, min_length=1, pattern=r"^[a-zA-Z0-9_-]+$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "budgetName": _SERIALIZER.url( - "budget_name", budget_name, "str", max_length=63, min_length=1, pattern=r"^[a-zA-Z0-9_-]+$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "budgetName": _SERIALIZER.url( - "budget_name", budget_name, "str", max_length=63, min_length=1, pattern=r"^[a-zA-Z0-9_-]+$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class BudgetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`budgets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, scope: str, filter: Optional[str] = None, **kwargs: Any) -> ItemPaged["_models.Budget"]: - """Lists all budgets for the defined scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param filter: OData filter option. May be used to filter budgets by properties/category. The - filter supports 'eq' only. Default value is None. - :type filter: str - :return: An iterator like instance of either Budget or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Budget] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BudgetsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - scope=scope, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BudgetsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: - """Gets the budget for the scope by budget name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Budget] = kwargs.pop("cls", None) - - _request = build_get_request( - scope=scope, - budget_name=budget_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Budget", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - scope: str, - budget_name: str, - parameters: _models.Budget, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Budget: - """The operation to create or update a budget. You can optionally provide an eTag if desired as a - form of concurrency control. To obtain the latest eTag for a given budget, perform a get - operation prior to your put operation. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Budget - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - scope: str, - budget_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Budget: - """The operation to create or update a budget. You can optionally provide an eTag if desired as a - form of concurrency control. To obtain the latest eTag for a given budget, perform a get - operation prior to your put operation. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, scope: str, budget_name: str, parameters: Union[_models.Budget, IO[bytes]], **kwargs: Any - ) -> _models.Budget: - """The operation to create or update a budget. You can optionally provide an eTag if desired as a - form of concurrency control. To obtain the latest eTag for a given budget, perform a get - operation prior to your put operation. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Is either a Budget type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Budget or IO[bytes] - :return: Budget or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Budget - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Budget] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Budget") - - _request = build_create_or_update_request( - scope=scope, - budget_name=budget_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Budget", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, scope: str, budget_name: str, **kwargs: Any - ) -> None: - """The operation to delete a budget. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/CostManagement/ - - :param scope: The scope associated with budget operations. - - Supported scopes for **CategoryType: Cost** - - Azure RBAC Scopes: - - - * '/subscriptions/{subscriptionId}/' for subscription scope - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope - * - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope - - EA (Enterprise Agreement) Scopes: - - * - '/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 - - MCA (Modern Customer Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only) - - Supported scopes for **CategoryType: ReservationUtilization** - - EA (Enterprise Agreement) Scopes: - - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope - - MCA (Modern Customer Agreement) Scopes: - - - * - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope (non-CSP only) - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for - customer scope (CSP only). Required. - :type scope: str - :param budget_name: Budget Name. Required. - :type budget_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - scope=scope, - budget_name=budget_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py deleted file mode 100644 index 849ec05068a9..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_cost_allocation_rules_operations.py +++ /dev/null @@ -1,667 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(billing_account_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request(billing_account_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(billing_account_id: str, rule_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"[A-Za-z0-9\-_]+"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request(billing_account_id: str, rule_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"[A-Za-z0-9\-_]+"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request(billing_account_id: str, rule_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str", pattern=r"[A-Za-z0-9\-_]+"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class CostAllocationRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`cost_allocation_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, billing_account_id: str, **kwargs: Any) -> ItemPaged["_models.CostAllocationRuleDefinition"]: - """Get the list of all cost allocation rules for a billing account or enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :return: An iterator like instance of either CostAllocationRuleDefinition or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CostAllocationRuleList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - billing_account_id=billing_account_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("CostAllocationRuleList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @overload - def check_name_availability( - self, - billing_account_id: str, - cost_allocation_rule_check_name_availability_request: _models.CostAllocationRuleCheckNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: - """Checks availability and correctness of a name for a cost allocation rule. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created - or updated. Required. - :type cost_allocation_rule_check_name_availability_request: - ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - billing_account_id: str, - cost_allocation_rule_check_name_availability_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: - """Checks availability and correctness of a name for a cost allocation rule. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created - or updated. Required. - :type cost_allocation_rule_check_name_availability_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - billing_account_id: str, - cost_allocation_rule_check_name_availability_request: Union[ - _models.CostAllocationRuleCheckNameAvailabilityRequest, IO[bytes] - ], - **kwargs: Any - ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: - """Checks availability and correctness of a name for a cost allocation rule. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created - or updated. Is either a CostAllocationRuleCheckNameAvailabilityRequest type or a IO[bytes] - type. Required. - :type cost_allocation_rule_check_name_availability_request: - ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest or IO[bytes] - :return: CostAllocationRuleCheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CostAllocationRuleCheckNameAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cost_allocation_rule_check_name_availability_request, (IOBase, bytes)): - _content = cost_allocation_rule_check_name_availability_request - else: - _json = self._serialize.body( - cost_allocation_rule_check_name_availability_request, "CostAllocationRuleCheckNameAvailabilityRequest" - ) - - _request = build_check_name_availability_request( - billing_account_id=billing_account_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize( - "CostAllocationRuleCheckNameAvailabilityResponse", pipeline_response.http_response - ) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> _models.CostAllocationRuleDefinition: - """Get a cost allocation rule by rule name and billing account or enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) - - _request = build_get_request( - billing_account_id=billing_account_id, - rule_name=rule_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - billing_account_id: str, - rule_name: str, - cost_allocation_rule: _models.CostAllocationRuleDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleDefinition: - """Create/Update a rule to allocate cost between different resources within a billing account or - enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. - :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - billing_account_id: str, - rule_name: str, - cost_allocation_rule: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CostAllocationRuleDefinition: - """Create/Update a rule to allocate cost between different resources within a billing account or - enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. - :type cost_allocation_rule: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - billing_account_id: str, - rule_name: str, - cost_allocation_rule: Union[_models.CostAllocationRuleDefinition, IO[bytes]], - **kwargs: Any - ) -> _models.CostAllocationRuleDefinition: - """Create/Update a rule to allocate cost between different resources within a billing account or - enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :param cost_allocation_rule: Cost allocation rule to be created or updated. Is either a - CostAllocationRuleDefinition type or a IO[bytes] type. Required. - :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition or - IO[bytes] - :return: CostAllocationRuleDefinition or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cost_allocation_rule, (IOBase, bytes)): - _content = cost_allocation_rule - else: - _json = self._serialize.body(cost_allocation_rule, "CostAllocationRuleDefinition") - - _request = build_create_or_update_request( - billing_account_id=billing_account_id, - rule_name=rule_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CostAllocationRuleDefinition", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, billing_account_id: str, rule_name: str, **kwargs: Any - ) -> None: - """Delete cost allocation rule for billing account or enterprise enrollment. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param rule_name: Cost allocation rule name. The name cannot include spaces or any non - alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. - :type rule_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - billing_account_id=billing_account_id, - rule_name=rule_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py deleted file mode 100644 index 0ecbd2a36b35..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py +++ /dev/null @@ -1,390 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar, Union -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - scope: str, - *, - filter: Optional[str] = None, - expand: Optional[str] = None, - skiptoken: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/dimensions") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - if skiptoken is not None: - _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=1000, minimum=1) - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_by_external_cloud_provider_type_request( # pylint: disable=name-too-long - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - *, - filter: Optional[str] = None, - expand: Optional[str] = None, - skiptoken: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions", - ) - path_format_arguments = { - "externalCloudProviderType": _SERIALIZER.url( - "external_cloud_provider_type", external_cloud_provider_type, "str" - ), - "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - if skiptoken is not None: - _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=1000, minimum=1) - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class DimensionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`dimensions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, - scope: str, - filter: Optional[str] = None, - expand: Optional[str] = None, - skiptoken: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.Dimension"]: - """Lists the dimensions by the defined scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with dimension operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param filter: May be used to filter dimensions by properties/category, properties/usageStart, - properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. Default value is - None. - :type filter: str - :param expand: May be used to expand the properties/data within a dimension category. By - default, data is not included when listing dimensions. Default value is None. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If - a previous response contains a nextLink element, the value of the nextLink element will include - a skiptoken parameter that specifies a starting point to use for subsequent calls. Default - value is None. - :type skiptoken: str - :param top: May be used to limit the number of results to the most recent N dimension data. - Default value is None. - :type top: int - :return: An iterator like instance of either Dimension or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Dimension] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - scope=scope, - filter=filter, - expand=expand, - skiptoken=skiptoken, - top=top, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DimensionsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - filter: Optional[str] = None, - expand: Optional[str] = None, - skiptoken: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged["_models.Dimension"]: - """Lists the dimensions by the external cloud provider type. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param filter: May be used to filter dimensions by properties/category, properties/usageStart, - properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. Default value is - None. - :type filter: str - :param expand: May be used to expand the properties/data within a dimension category. By - default, data is not included when listing dimensions. Default value is None. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If - a previous response contains a nextLink element, the value of the nextLink element will include - a skiptoken parameter that specifies a starting point to use for subsequent calls. Default - value is None. - :type skiptoken: str - :param top: May be used to limit the number of results to the most recent N dimension data. - Default value is None. - :type top: int - :return: An iterator like instance of either Dimension or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Dimension] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DimensionsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_by_external_cloud_provider_type_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - filter=filter, - expand=expand, - skiptoken=skiptoken, - top=top, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DimensionsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py deleted file mode 100644 index ba3f4d00b08e..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py +++ /dev/null @@ -1,891 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(scope: str, *, expand: Optional[str] = None, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/exports") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(scope: str, export_name: str, *, expand: Optional[str] = None, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "exportName": _SERIALIZER.url("export_name", export_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request(scope: str, export_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "exportName": _SERIALIZER.url("export_name", export_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request(scope: str, export_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "exportName": _SERIALIZER.url("export_name", export_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_execute_request(scope: str, export_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "exportName": _SERIALIZER.url("export_name", export_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_execution_history_request(scope: str, export_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "exportName": _SERIALIZER.url("export_name", export_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ExportsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`exports` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, scope: str, expand: Optional[str] = None, **kwargs: Any) -> _models.ExportListResult: - """The operation to list all exports at the given scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param expand: May be used to expand the properties within an export. Currently only - 'runHistory' is supported and will return information for the last run of each export. Default - value is None. - :type expand: str - :return: ExportListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExportListResult] = kwargs.pop("cls", None) - - _request = build_list_request( - scope=scope, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ExportListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get(self, scope: str, export_name: str, expand: Optional[str] = None, **kwargs: Any) -> _models.Export: - """The operation to get the export for the defined scope by export name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param expand: May be used to expand the properties within an export. Currently only - 'runHistory' is supported and will return information for the last 10 runs of the export. - Default value is None. - :type expand: str - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Export] = kwargs.pop("cls", None) - - _request = build_get_request( - scope=scope, - export_name=export_name, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Export", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - scope: str, - export_name: str, - parameters: _models.Export, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Export: - """The operation to create or update a export. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Export - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - scope: str, - export_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Export: - """The operation to create or update a export. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, scope: str, export_name: str, parameters: Union[_models.Export, IO[bytes]], **kwargs: Any - ) -> _models.Export: - """The operation to create or update a export. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Is either a - Export type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.Export or IO[bytes] - :return: Export or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Export - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Export] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Export") - - _request = build_create_or_update_request( - scope=scope, - export_name=export_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Export", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, scope: str, export_name: str, **kwargs: Any - ) -> None: - """The operation to delete a export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - scope=scope, - export_name=export_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def execute( - self, - scope: str, - export_name: str, - parameters: Optional[_models.ExportRunRequest] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """The operation to run an export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the Execute Export operation. Default value is None. - :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def execute( - self, - scope: str, - export_name: str, - parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> None: - """The operation to run an export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the Execute Export operation. Default value is None. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def execute( # pylint: disable=inconsistent-return-statements - self, - scope: str, - export_name: str, - parameters: Optional[Union[_models.ExportRunRequest, IO[bytes]]] = None, - **kwargs: Any - ) -> None: - """The operation to run an export. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :param parameters: Parameters supplied to the Execute Export operation. Is either a - ExportRunRequest type or a IO[bytes] type. Default value is None. - :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest or IO[bytes] - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if parameters else None - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if parameters else None - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - if parameters is not None: - _json = self._serialize.body(parameters, "ExportRunRequest") - else: - _json = None - - _request = build_execute_request( - scope=scope, - export_name=export_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def get_execution_history(self, scope: str, export_name: str, **kwargs: Any) -> _models.ExportExecutionListResult: - """The operation to get the run history of an export for the defined scope and export name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param export_name: Export Name. Required. - :type export_name: str - :return: ExportExecutionListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExportExecutionListResult] = kwargs.pop("cls", None) - - _request = build_get_execution_history_request( - scope=scope, - export_name=export_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ExportExecutionListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py deleted file mode 100644 index b1694abf4bf1..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_forecast_operations.py +++ /dev/null @@ -1,496 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_usage_request(scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/forecast") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_external_cloud_provider_usage_request( # pylint: disable=name-too-long - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - *, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast", - ) - path_format_arguments = { - "externalCloudProviderType": _SERIALIZER.url( - "external_cloud_provider_type", external_cloud_provider_type, "str" - ), - "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ForecastOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`forecast` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def usage( - self, - scope: str, - parameters: _models.ForecastDefinition, - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> Optional[_models.ForecastResult]: - """Lists the forecast charges for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with forecast operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def usage( - self, - scope: str, - parameters: IO[bytes], - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> Optional[_models.ForecastResult]: - """Lists the forecast charges for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with forecast operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def usage( - self, - scope: str, - parameters: Union[_models.ForecastDefinition, IO[bytes]], - filter: Optional[str] = None, - **kwargs: Any - ) -> Optional[_models.ForecastResult]: - """Lists the forecast charges for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with forecast operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :return: ForecastResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.ForecastResult]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ForecastDefinition") - - _request = build_usage_request( - scope=scope, - filter=filter, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def external_cloud_provider_usage( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: _models.ForecastDefinition, - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ForecastResult: - """Lists the forecast charges for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def external_cloud_provider_usage( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: IO[bytes], - filter: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ForecastResult: - """Lists the forecast charges for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. - Required. - :type parameters: IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ForecastResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def external_cloud_provider_usage( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: Union[_models.ForecastDefinition, IO[bytes]], - filter: Optional[str] = None, - **kwargs: Any - ) -> _models.ForecastResult: - """Lists the forecast charges for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is - either a ForecastDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or IO[bytes] - :param filter: May be used to filter forecasts by properties/usageDate (Utc time), - properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. - :type filter: str - :return: ForecastResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ForecastResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ForecastResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ForecastDefinition") - - _request = build_external_cloud_provider_usage_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - filter=filter, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ForecastResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py deleted file mode 100644 index 0a638d2258ea..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_benefit_utilization_summaries_report_operations.py +++ /dev/null @@ -1,1534 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_generate_by_billing_account_request( # pylint: disable=name-too-long - billing_account_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_by_billing_profile_request( # pylint: disable=name-too-long - billing_account_id: str, billing_profile_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_by_reservation_order_id_request( # pylint: disable=name-too-long - reservation_order_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", - ) - path_format_arguments = { - "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_by_reservation_id_request( - reservation_order_id: str, reservation_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", - ) - path_format_arguments = { - "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), - "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_by_savings_plan_order_id_request( # pylint: disable=name-too-long - savings_plan_order_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", - ) - path_format_arguments = { - "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_by_savings_plan_id_request( # pylint: disable=name-too-long - savings_plan_order_id: str, savings_plan_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport", - ) - path_format_arguments = { - "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), - "savingsPlanId": _SERIALIZER.url("savings_plan_id", savings_plan_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class GenerateBenefitUtilizationSummariesReportOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`generate_benefit_utilization_summaries_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _generate_by_billing_account_initial( - self, - billing_account_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_billing_account_request( - billing_account_id=billing_account_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_generate_by_billing_account( - self, - billing_account_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account. - This API supports only enrollment accounts. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_generate_by_billing_account( - self, - billing_account_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account. - This API supports only enrollment accounts. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_generate_by_billing_account( - self, - billing_account_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account. - This API supports only enrollment accounts. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._generate_by_billing_account_initial( - billing_account_id=billing_account_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _generate_by_billing_profile_initial( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_billing_profile_request( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_generate_by_billing_profile( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account - and billing profile. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_generate_by_billing_profile( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account - and billing profile. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_generate_by_billing_profile( - self, - billing_account_id: str, - billing_profile_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided billing account - and billing profile. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._generate_by_billing_profile_initial( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _generate_by_reservation_order_id_initial( # pylint: disable=name-too-long - self, - reservation_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_reservation_order_id_request( - reservation_order_id=reservation_order_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_generate_by_reservation_order_id( - self, - reservation_order_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_generate_by_reservation_order_id( - self, - reservation_order_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_generate_by_reservation_order_id( - self, - reservation_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._generate_by_reservation_order_id_initial( - reservation_order_id=reservation_order_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _generate_by_reservation_id_initial( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_reservation_id_request( - reservation_order_id=reservation_order_id, - reservation_id=reservation_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_generate_by_reservation_id( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param reservation_id: Reservation ID. Required. - :type reservation_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_generate_by_reservation_id( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param reservation_id: Reservation ID. Required. - :type reservation_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_generate_by_reservation_id( - self, - reservation_order_id: str, - reservation_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided reservation. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param reservation_order_id: Reservation Order ID. Required. - :type reservation_order_id: str - :param reservation_id: Reservation ID. Required. - :type reservation_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._generate_by_reservation_id_initial( - reservation_order_id=reservation_order_id, - reservation_id=reservation_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _generate_by_savings_plan_order_id_initial( # pylint: disable=name-too-long - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_savings_plan_order_id_request( - savings_plan_order_id=savings_plan_order_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_generate_by_savings_plan_order_id( - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_generate_by_savings_plan_order_id( - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_generate_by_savings_plan_order_id( - self, - savings_plan_order_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan - order. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._generate_by_savings_plan_order_id_initial( - savings_plan_order_id=savings_plan_order_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _generate_by_savings_plan_id_initial( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): - _content = benefit_utilization_summaries_request - else: - _json = self._serialize.body(benefit_utilization_summaries_request, "BenefitUtilizationSummariesRequest") - - _request = build_generate_by_savings_plan_id_request( - savings_plan_order_id=savings_plan_order_id, - savings_plan_id=savings_plan_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_generate_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_generate_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Required. - :type benefit_utilization_summaries_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_generate_by_savings_plan_id( - self, - savings_plan_order_id: str, - savings_plan_id: str, - benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: - """Triggers generation of a benefit utilization summaries report for the provided savings plan. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param savings_plan_order_id: Savings plan order ID. Required. - :type savings_plan_order_id: str - :param savings_plan_id: Savings plan ID. Required. - :type savings_plan_id: str - :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be - created. Is either a BenefitUtilizationSummariesRequest type or a IO[bytes] type. Required. - :type benefit_utilization_summaries_request: - ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or IO[bytes] - :return: An instance of LROPoller that returns either - BenefitUtilizationSummariesOperationStatus or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._generate_by_savings_plan_id_initial( - savings_plan_order_id=savings_plan_order_id, - savings_plan_id=savings_plan_id, - benefit_utilization_summaries_request=benefit_utilization_summaries_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "BenefitUtilizationSummariesOperationStatus", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py deleted file mode 100644 index 6c5761a0992c..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_cost_details_report_operations.py +++ /dev/null @@ -1,464 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_operation_request(scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_operation_results_request(scope: str, operation_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}" - ) - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class GenerateCostDetailsReportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`generate_cost_details_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_operation_initial( - self, - scope: str, - parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GenerateCostDetailsReportRequestDefinition") - - _request = build_create_operation_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.GenerateCostDetailsReportErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_operation( - self, - scope: str, - parameters: _models.GenerateCostDetailsReportRequestDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CostDetailsOperationResults]: - """This API is the replacement for all previously release Usage Details APIs. Request to generate - a cost details report for the provided date range, billing period (Only enterprise customers) - or Invoice Id asynchronously at a certain scope. The initial call to request a report will - return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the - endpoint to poll to get the result of the report generation. The 'Retry-After' provides the - duration to wait before polling for the generated report. A call to poll the report operation - will provide a 202 response with a 'Location' header if the operation is still in progress. - Once the report generation operation completes, the polling endpoint will provide a 200 - response along with details on the report blob(s) that are available for download. The details - on the file(s) available for download will be available in the polling response body. To - Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create cost details operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_operation( - self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.CostDetailsOperationResults]: - """This API is the replacement for all previously release Usage Details APIs. Request to generate - a cost details report for the provided date range, billing period (Only enterprise customers) - or Invoice Id asynchronously at a certain scope. The initial call to request a report will - return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the - endpoint to poll to get the result of the report generation. The 'Retry-After' provides the - duration to wait before polling for the generated report. A call to poll the report operation - will provide a 202 response with a 'Location' header if the operation is still in progress. - Once the report generation operation completes, the polling endpoint will provide a 200 - response along with details on the report blob(s) that are available for download. The details - on the file(s) available for download will be available in the polling response body. To - Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create cost details operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_operation( - self, - scope: str, - parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CostDetailsOperationResults]: - """This API is the replacement for all previously release Usage Details APIs. Request to generate - a cost details report for the provided date range, billing period (Only enterprise customers) - or Invoice Id asynchronously at a certain scope. The initial call to request a report will - return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the - endpoint to poll to get the result of the report generation. The 'Retry-After' provides the - duration to wait before polling for the generated report. A call to poll the report operation - will provide a 202 response with a 'Location' header if the operation is still in progress. - Once the report generation operation completes, the polling endpoint will provide a 200 - response along with details on the report blob(s) that are available for download. The details - on the file(s) available for download will be available in the polling response body. To - Understand cost details (formerly known as usage details) fields found in files ,see - https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create cost details operation. Is either a - GenerateCostDetailsReportRequestDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition - or IO[bytes] - :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_operation_initial( - scope=scope, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CostDetailsOperationResults].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CostDetailsOperationResults]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _get_operation_results_initial(self, scope: str, operation_id: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_get_operation_results_request( - scope=scope, - operation_id=operation_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_get_operation_results( - self, scope: str, operation_id: str, **kwargs: Any - ) -> LROPoller[_models.CostDetailsOperationResults]: - """Get the result of the specified operation. This link is provided in the CostDetails creation - request response Location header. - - :param scope: The ARM Resource ID for subscription, billing account, or other billing - scopes.Currently Resource Group and Management Group are not supported. For details, see - https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param operation_id: The target operation Id. Required. - :type operation_id: str - :return: An instance of LROPoller that returns either CostDetailsOperationResults or the result - of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._get_operation_results_initial( - scope=scope, - operation_id=operation_id, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CostDetailsOperationResults", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CostDetailsOperationResults].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CostDetailsOperationResults]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py deleted file mode 100644 index f6703d99d8f6..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_results_operations.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/operationResults/{operationId}") - path_format_arguments = { - "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class GenerateDetailedCostReportOperationResultsOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`generate_detailed_cost_report_operation_results` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _get_initial(self, operation_id: str, scope: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_get_request( - operation_id=operation_id, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_get( - self, operation_id: str, scope: str, **kwargs: Any - ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Gets the result of the specified operation. The link with this operationId is provided as a - response header of the initial request. - - :param operation_id: The target operation Id. Required. - :type operation_id: str - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._get_initial( - operation_id=operation_id, - scope=scope, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "GenerateDetailedCostReportOperationResult", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.GenerateDetailedCostReportOperationResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py deleted file mode 100644 index 6821f0299c7e..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operation_status_operations.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(operation_id: str, scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/operationStatus/{operationId}") - path_format_arguments = { - "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class GenerateDetailedCostReportOperationStatusOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`generate_detailed_cost_report_operation_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, operation_id: str, scope: str, **kwargs: Any) -> _models.GenerateDetailedCostReportOperationStatuses: - """Get the status of the specified operation. This link is provided in the - GenerateDetailedCostReport creation request response header. - - :param operation_id: The target operation Id. Required. - :type operation_id: str - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :return: GenerateDetailedCostReportOperationStatuses or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateDetailedCostReportOperationStatuses] = kwargs.pop("cls", None) - - _request = build_get_request( - operation_id=operation_id, - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GenerateDetailedCostReportOperationStatuses", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py deleted file mode 100644 index 9b5d485051d5..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_detailed_cost_report_operations.py +++ /dev/null @@ -1,299 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_operation_request(scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class GenerateDetailedCostReportOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`generate_detailed_cost_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_operation_initial( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "GenerateDetailedCostReportDefinition") - - _request = build_create_operation_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.GenerateDetailedCostReportErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-Consumption-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-Consumption-AsyncOperation") - ) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_operation( - self, - scope: str, - parameters: _models.GenerateDetailedCostReportDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Generates the detailed cost report for provided date range, billing period(only enterprise - customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header - Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the - operation will provide the status and if the operation is completed the blob file where - generated detailed cost report is being stored. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create detailed cost report operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_operation( - self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Generates the detailed cost report for provided date range, billing period(only enterprise - customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header - Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the - operation will provide the status and if the operation is completed the blob file where - generated detailed cost report is being stored. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create detailed cost report operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_operation( - self, scope: str, parameters: Union[_models.GenerateDetailedCostReportDefinition, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: - """Generates the detailed cost report for provided date range, billing period(only enterprise - customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header - Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the - operation will provide the status and if the operation is completed the blob file where - generated detailed cost report is being stored. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The ARM Resource ID for subscription, resource group, billing account, or other - billing scopes. For details, see https://aka.ms/costmgmt/scopes. Required. - :type scope: str - :param parameters: Parameters supplied to the Create detailed cost report operation. Is either - a GenerateDetailedCostReportDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or - IO[bytes] - :return: An instance of LROPoller that returns either GenerateDetailedCostReportOperationResult - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_operation_initial( - scope=scope, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize( - "GenerateDetailedCostReportOperationResult", pipeline_response.http_response - ) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.GenerateDetailedCostReportOperationResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py deleted file mode 100644 index 6fbfd2c46be4..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_generate_reservation_details_report_operations.py +++ /dev/null @@ -1,385 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_by_billing_account_id_request( - billing_account_id: str, *, start_date: str, end_date: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["startDate"] = _SERIALIZER.query("start_date", start_date, "str") - _params["endDate"] = _SERIALIZER.query("end_date", end_date, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_by_billing_profile_id_request( - billing_account_id: str, billing_profile_id: str, *, start_date: str, end_date: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["startDate"] = _SERIALIZER.query("start_date", start_date, "str") - _params["endDate"] = _SERIALIZER.query("end_date", end_date, "str") - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class GenerateReservationDetailsReportOperations: # pylint: disable=name-too-long - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`generate_reservation_details_report` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _by_billing_account_id_initial( - self, billing_account_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_by_billing_account_id_request( - billing_account_id=billing_account_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_by_billing_account_id( - self, billing_account_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> LROPoller[_models.OperationStatus]: - """Generates the reservations details report for provided date range asynchronously based on - enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. - For more details on the roles see, - https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param billing_account_id: Enrollment ID (Legacy BillingAccount ID). Required. - :type billing_account_id: str - :param start_date: Start Date. Required. - :type start_date: str - :param end_date: End Date. Required. - :type end_date: str - :return: An instance of LROPoller that returns either OperationStatus or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._by_billing_account_id_initial( - billing_account_id=billing_account_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _by_billing_profile_id_initial( - self, billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_by_billing_profile_id_request( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_by_billing_profile_id( - self, billing_account_id: str, billing_profile_id: str, start_date: str, end_date: str, **kwargs: Any - ) -> LROPoller[_models.OperationStatus]: - """Generates the reservations details report for provided date range asynchronously by billing - profile. The Reservation usage details can be viewed by only certain enterprise roles by - default. For more details on the roles see, - https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param billing_account_id: Billing account ID. Required. - :type billing_account_id: str - :param billing_profile_id: Billing profile ID. Required. - :type billing_profile_id: str - :param start_date: Start Date. Required. - :type start_date: str - :param end_date: End Date. Required. - :type end_date: str - :return: An instance of LROPoller that returns either OperationStatus or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatus] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._by_billing_profile_id_initial( - billing_account_id=billing_account_id, - billing_profile_id=billing_profile_id, - start_date=start_date, - end_date=end_date, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatus", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OperationStatus].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OperationStatus]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py index 62c1c559b28b..48e04390ca3f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py @@ -1,43 +1,56 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +from io import IOBase +import json +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse -from azure.core import PipelineClient +from azure.core import MatchConditions, PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, + ResourceModifiedError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models from .._configuration import CostManagementClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer +from .._utils.utils import prep_if_match, prep_if_none_match T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request(**kwargs: Any) -> HttpRequest: +def build_generate_detailed_cost_report_operation_status_get_request( # pylint: disable=name-too-long + operation_id: str, scope: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -45,29 +58,10592 @@ def build_list_request(**kwargs: Any) -> HttpRequest: accept = _headers.pop("Accept", "application/json") # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/operations") + _url = "/{scope}/providers/Microsoft.CostManagement/operationStatus/{operationId}" + path_format_arguments = { + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operations_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/operations" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_budgets_get_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "budgetName": _SERIALIZER.url("budget_name", budget_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_budgets_create_or_update_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "budgetName": _SERIALIZER.url("budget_name", budget_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_budgets_delete_request(scope: str, budget_name: str, **kwargs: Any) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "budgetName": _SERIALIZER.url("budget_name", budget_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_budgets_list_request(scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/budgets" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_exports_get_request( + scope: str, export_name: str, *, expand: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "exportName": _SERIALIZER.url("export_name", export_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_exports_create_or_update_request(scope: str, export_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "exportName": _SERIALIZER.url("export_name", export_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_exports_delete_request(scope: str, export_name: str, **kwargs: Any) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "exportName": _SERIALIZER.url("export_name", export_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_exports_list_request(scope: str, *, expand: Optional[str] = None, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/exports" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_exports_execute_request(scope: str, export_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "exportName": _SERIALIZER.url("export_name", export_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_exports_get_execution_history_request( # pylint: disable=name-too-long + scope: str, export_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "exportName": _SERIALIZER.url("export_name", export_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_detailed_cost_report_operation_results_get_request( # pylint: disable=name-too-long + operation_id: str, scope: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/operationResults/{operationId}" + path_format_arguments = { + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_views_get_request(view_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/views/{viewName}" + path_format_arguments = { + "viewName": _SERIALIZER.url("view_name", view_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_views_create_or_update_request(view_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/views/{viewName}" + path_format_arguments = { + "viewName": _SERIALIZER.url("view_name", view_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_views_delete_request(view_name: str, **kwargs: Any) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/providers/Microsoft.CostManagement/views/{viewName}" + path_format_arguments = { + "viewName": _SERIALIZER.url("view_name", view_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_views_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/views" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_views_get_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/views/{viewName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_views_create_or_update_by_scope_request( # pylint: disable=name-too-long + scope: str, view_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/views/{viewName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_views_delete_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/views/{viewName}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "viewName": _SERIALIZER.url("view_name", view_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_views_list_by_scope_request(scope: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/views" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alerts_get_request(scope: str, alert_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "alertId": _SERIALIZER.url("alert_id", alert_id, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alerts_dismiss_request(scope: str, alert_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "alertId": _SERIALIZER.url("alert_id", alert_id, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alerts_list_request(scope: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/alerts" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alerts_list_external_request( + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts" + path_format_arguments = { + "externalCloudProviderType": _SERIALIZER.url( + "external_cloud_provider_type", external_cloud_provider_type, "str" + ), + "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_get_request(name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/scheduledActions/{name}" + path_format_arguments = { + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_create_or_update_request( # pylint: disable=name-too-long + name: str, *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/scheduledActions/{name}" + path_format_arguments = { + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["if-none-match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_delete_request(name: str, **kwargs: Any) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/providers/Microsoft.CostManagement/scheduledActions/{name}" + path_format_arguments = { + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_scheduled_actions_list_request(*, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/scheduledActions" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_run_request(name: str, **kwargs: Any) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/providers/Microsoft.CostManagement/scheduledActions/{name}/execute" + path_format_arguments = { + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_scheduled_actions_get_by_scope_request( # pylint: disable=name-too-long + scope: str, name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_create_or_update_by_scope_request( # pylint: disable=name-too-long + scope: str, + name: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["if-none-match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_delete_by_scope_request( # pylint: disable=name-too-long + scope: str, name: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_scheduled_actions_list_by_scope_request( # pylint: disable=name-too-long + scope: str, *, filter: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/scheduledActions" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_run_by_scope_request( # pylint: disable=name-too-long + scope: str, name: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_scheduled_actions_check_name_availability_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/checkNameAvailability" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_check_name_availability_by_scope_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/checkNameAvailability" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_settings_get_by_scope_request( + scope: str, type: Union[str, _models.SettingType], **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/settings/{type}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "type": _SERIALIZER.url("type", type, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_settings_create_or_update_by_scope_request( # pylint: disable=name-too-long + scope: str, type: Union[str, _models.SettingType], **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/settings/{type}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "type": _SERIALIZER.url("type", type, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_settings_delete_by_scope_request( + scope: str, type: Union[str, _models.SettingType], **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/settings/{type}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + "type": _SERIALIZER.url("type", type, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_settings_list_request(scope: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/settings" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_cost_details_report_get_operation_results_request( # pylint: disable=name-too-long + scope: str, operation_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_cost_details_report_create_operation_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cost_allocation_rules_get_request(billing_account_id: str, rule_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cost_allocation_rules_create_or_update_request( # pylint: disable=name-too-long + billing_account_id: str, rule_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cost_allocation_rules_delete_request( # pylint: disable=name-too-long + billing_account_id: str, rule_name: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_cost_allocation_rules_list_request(billing_account_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cost_allocation_rules_check_name_availability_request( # pylint: disable=name-too-long + billing_account_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_benefit_recommendations_list_request( # pylint: disable=name-too-long + billing_scope: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + expand: Optional[str] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations" + path_format_arguments = { + "billingScope": _SERIALIZER.url("billing_scope", billing_scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if orderby is not None: + _params["$orderby"] = _SERIALIZER.query("orderby", orderby, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_benefit_utilization_summaries_list_by_billing_account_id_request( # pylint: disable=name-too-long + billing_account_id: str, + *, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + filter: Optional[str] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if grain_parameter is not None: + _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") + if filter is not None: + _params["filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_benefit_utilization_summaries_list_by_billing_profile_id_request( # pylint: disable=name-too-long + billing_account_id: str, + billing_profile_id: str, + *, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + filter: Optional[str] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if grain_parameter is not None: + _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") + if filter is not None: + _params["filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_benefit_utilization_summaries_list_by_savings_plan_order_request( # pylint: disable=name-too-long + savings_plan_order_id: str, + *, + filter: Optional[str] = None, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" + path_format_arguments = { + "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if grain_parameter is not None: + _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_benefit_utilization_summaries_list_by_savings_plan_id_request( # pylint: disable=name-too-long + savings_plan_order_id: str, + savings_plan_id: str, + *, + filter: Optional[str] = None, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries" + path_format_arguments = { + "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), + "savingsPlanId": _SERIALIZER.url("savings_plan_id", savings_plan_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if grain_parameter is not None: + _params["grainParameter"] = _SERIALIZER.query("grain_parameter", grain_parameter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_benefit_utilization_summaries_report_generate_by_billing_account_request( # pylint: disable=name-too-long + billing_account_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_benefit_utilization_summaries_report_generate_by_billing_profile_request( # pylint: disable=name-too-long + billing_account_id: str, billing_profile_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_benefit_utilization_summaries_report_generate_by_reservation_order_id_request( # pylint: disable=name-too-long + reservation_order_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport" + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_benefit_utilization_summaries_report_generate_by_reservation_id_request( # pylint: disable=name-too-long + reservation_order_id: str, reservation_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport" + path_format_arguments = { + "reservationOrderId": _SERIALIZER.url("reservation_order_id", reservation_order_id, "str"), + "reservationId": _SERIALIZER.url("reservation_id", reservation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_order_id_request( # pylint: disable=name-too-long + savings_plan_order_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport" + path_format_arguments = { + "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_id_request( # pylint: disable=name-too-long + savings_plan_order_id: str, savings_plan_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport" + path_format_arguments = { + "savingsPlanOrderId": _SERIALIZER.url("savings_plan_order_id", savings_plan_order_id, "str"), + "savingsPlanId": _SERIALIZER.url("savings_plan_id", savings_plan_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_detailed_cost_report_create_operation_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_forecast_usage_request(scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/forecast" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_forecast_external_cloud_provider_usage_request( # pylint: disable=name-too-long + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + *, + filter: Optional[str] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast" + path_format_arguments = { + "externalCloudProviderType": _SERIALIZER.url( + "external_cloud_provider_type", external_cloud_provider_type, "str" + ), + "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_dimensions_list_request( + scope: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skiptoken: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/dimensions" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + if skiptoken is not None: + _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_dimensions_by_external_cloud_provider_type_request( # pylint: disable=name-too-long + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skiptoken: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions" + path_format_arguments = { + "externalCloudProviderType": _SERIALIZER.url( + "external_cloud_provider_type", external_cloud_provider_type, "str" + ), + "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + if skiptoken is not None: + _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_query_usage_request(scope: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{scope}/providers/Microsoft.CostManagement/query" + path_format_arguments = { + "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_query_usage_by_external_cloud_provider_type_request( # pylint: disable=name-too-long + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query" + path_format_arguments = { + "externalCloudProviderType": _SERIALIZER.url( + "external_cloud_provider_type", external_cloud_provider_type, "str" + ), + "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_reservation_details_report_by_billing_account_id_request( # pylint: disable=name-too-long + billing_account_id: str, *, start_date: str, end_date: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["startDate"] = _SERIALIZER.query("start_date", start_date, "str") + _params["endDate"] = _SERIALIZER.query("end_date", end_date, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_generate_reservation_details_report_by_billing_profile_id_request( # pylint: disable=name-too-long + billing_account_id: str, billing_profile_id: str, *, start_date: str, end_date: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "billingProfileId": _SERIALIZER.url("billing_profile_id", billing_profile_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["startDate"] = _SERIALIZER.query("start_date", start_date, "str") + _params["endDate"] = _SERIALIZER.query("end_date", end_date, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_price_sheet_download_by_invoice_request( # pylint: disable=name-too-long + billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download" + path_format_arguments = { + "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), + "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), + "invoiceName": _SERIALIZER.url("invoice_name", invoice_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_price_sheet_download_by_billing_profile_request( # pylint: disable=name-too-long + billing_account_name: str, billing_profile_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download" + path_format_arguments = { + "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), + "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_price_sheet_download_by_billing_account_request( # pylint: disable=name-too-long + billing_account_id: str, billing_period_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download" + path_format_arguments = { + "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), + "billingPeriodName": _SERIALIZER.url("billing_period_name", billing_period_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class GenerateDetailedCostReportOperationStatusOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`generate_detailed_cost_report_operation_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, operation_id: str, scope: str, **kwargs: Any) -> _models.GenerateDetailedCostReportOperationStatuses: + """Get the status of the specified operation. This link is provided in the + GenerateDetailedCostReport creation request response header. + + :param operation_id: The target operation Id. Required. + :type operation_id: str + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :return: GenerateDetailedCostReportOperationStatuses. The + GenerateDetailedCostReportOperationStatuses is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationStatuses + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateDetailedCostReportOperationStatuses] = kwargs.pop("cls", None) + + _request = build_generate_detailed_cost_report_operation_status_get_request( + operation_id=operation_id, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GenerateDetailedCostReportOperationStatuses, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.CostManagementOperation"]: + """List the operations for the provider. + + :return: An iterator like instance of CostManagementOperation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.CostManagementOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CostManagementOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CostManagementOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class BudgetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`budgets` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: + """Gets the budget for the scope by budget name. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + _request = build_budgets_get_request( + scope=scope, + budget_name=budget_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Budget, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + scope: str, + budget_name: str, + parameters: _models.Budget, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, scope: str, budget_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + scope: str, + budget_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, scope: str, budget_name: str, parameters: Union[_models.Budget, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Budget: + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. Is one of the following + types: Budget, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.Budget or JSON or IO[bytes] + :return: Budget. The Budget is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Budget + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Budget] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_budgets_create_or_update_request( + scope=scope, + budget_name=budget_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Budget, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, scope: str, budget_name: str, **kwargs: Any + ) -> None: + """The operation to delete a budget. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param budget_name: Budget Name. Required. + :type budget_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_budgets_delete_request( + scope=scope, + budget_name=budget_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> ItemPaged["_models.Budget"]: + """Lists all budgets for the defined scope. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :keyword filter: OData filter option. May be used to filter budgets by properties/category. The + filter supports 'eq' only. Default value is None. + :paramtype filter: str + :return: An iterator like instance of Budget + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Budget] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Budget]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_budgets_list_request( + scope=scope, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Budget], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ExportsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`exports` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, scope: str, export_name: str, *, expand: Optional[str] = None, **kwargs: Any) -> _models.Export: + """The operation to get the export for the defined scope by export name. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :keyword expand: May be used to expand the properties within an export. Currently only + 'runHistory' is supported and will return information for the last 10 runs of the export. + Default value is None. + :paramtype expand: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Export] = kwargs.pop("cls", None) + + _request = build_exports_get_request( + scope=scope, + export_name=export_name, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Export, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + scope: str, + export_name: str, + parameters: _models.Export, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.Export + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, scope: str, export_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + scope: str, + export_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, scope: str, export_name: str, parameters: Union[_models.Export, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Export: + """The operation to create or update a export. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the CreateOrUpdate Export operation. Is one of the + following types: Export, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.Export or JSON or IO[bytes] + :return: Export. The Export is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Export + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Export] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_exports_create_or_update_request( + scope=scope, + export_name=export_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Export, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, scope: str, export_name: str, **kwargs: Any + ) -> None: + """The operation to delete a export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_exports_delete_request( + scope=scope, + export_name=export_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, scope: str, *, expand: Optional[str] = None, **kwargs: Any) -> _models.ExportListResult: + """The operation to list all exports at the given scope. + + :param scope: The scope associated with alerts operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :keyword expand: May be used to expand the properties within an export. Currently only + 'runHistory' is supported and will return information for the last run of each export. Default + value is None. + :paramtype expand: str + :return: ExportListResult. The ExportListResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ExportListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExportListResult] = kwargs.pop("cls", None) + + _request = build_exports_list_request( + scope=scope, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ExportListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def execute( + self, + scope: str, + export_name: str, + parameters: Optional[_models.ExportRunRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def execute( + self, + scope: str, + export_name: str, + parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def execute( + self, + scope: str, + export_name: str, + parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Default value is None. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def execute( # pylint: disable=inconsistent-return-statements + self, + scope: str, + export_name: str, + parameters: Optional[Union[_models.ExportRunRequest, JSON, IO[bytes]]] = None, + **kwargs: Any, + ) -> None: + """The operation to run an export. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :param parameters: Parameters supplied to the Execute Export operation. Is one of the following + types: ExportRunRequest, JSON, IO[bytes] Default value is None. + :type parameters: ~azure.mgmt.costmanagement.models.ExportRunRequest or JSON or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if parameters else None + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if parameters else None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + if parameters is not None: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_exports_execute_request( + scope=scope, + export_name=export_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def get_execution_history(self, scope: str, export_name: str, **kwargs: Any) -> _models.ExportExecutionListResult: + """The operation to get the run history of an export for the defined scope and export name. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param export_name: Export Name. Required. + :type export_name: str + :return: ExportExecutionListResult. The ExportExecutionListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ExportExecutionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExportExecutionListResult] = kwargs.pop("cls", None) + + _request = build_exports_get_execution_history_request( + scope=scope, + export_name=export_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ExportExecutionListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GenerateDetailedCostReportOperationResultsOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`generate_detailed_cost_report_operation_results` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _get_initial(self, operation_id: str, scope: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_generate_detailed_cost_report_operation_results_get_request( + operation_id=operation_id, + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_get( + self, operation_id: str, scope: str, **kwargs: Any + ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Gets the result of the specified operation. The link with this operationId is provided as a + response header of the initial request. + + :param operation_id: The target operation Id. Required. + :type operation_id: str + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :return: An instance of LROPoller that returns GenerateDetailedCostReportOperationResult. The + GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._get_initial( + operation_id=operation_id, + scope=scope, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.GenerateDetailedCostReportOperationResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ViewsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`views` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, view_name: str, **kwargs: Any) -> _models.View: + """Gets the view by view name. + + :param view_name: View name. Required. + :type view_name: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + _request = build_views_get_request( + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, view_name: str, parameters: _models.View, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, view_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, view_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, view_name: str, parameters: Union[_models.View, JSON, IO[bytes]], **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is one of the + following types: View, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or JSON or IO[bytes] + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_views_create_or_update_request( + view_name=view_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """The operation to delete a view. + + :param view_name: View name. Required. + :type view_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_views_delete_request( + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.View"]: + """Lists all views by tenant and object. + + :return: An iterator like instance of View + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.View] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.View]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_views_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.View], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.View: + """Gets the view for the defined scope by view name. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + _request = build_views_get_by_scope_request( + scope=scope, + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update_by_scope( + self, + scope: str, + view_name: str, + parameters: _models.View, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.View + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_by_scope( + self, scope: str, view_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_by_scope( + self, + scope: str, + view_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update_by_scope( + self, scope: str, view_name: str, parameters: Union[_models.View, JSON, IO[bytes]], **kwargs: Any + ) -> _models.View: + """The operation to create or update a view. Update operation requires latest eTag to be set in + the request. You may obtain the latest eTag by performing a get operation. Create operation + does not require eTag. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is one of the + following types: View, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.View or JSON or IO[bytes] + :return: View. The View is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.View + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.View] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_views_create_or_update_by_scope_request( + scope=scope, + view_name=view_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.View, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_by_scope( # pylint: disable=inconsistent-return-statements + self, scope: str, view_name: str, **kwargs: Any + ) -> None: + """The operation to delete a view. + + :param scope: undefined. Required. + :type scope: str + :param view_name: View name. Required. + :type view_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_views_delete_by_scope_request( + scope=scope, + view_name=view_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_scope(self, scope: str, **kwargs: Any) -> ItemPaged["_models.View"]: + """Lists all views at the given scope. + + :param scope: undefined. Required. + :type scope: str + :return: An iterator like instance of View + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.View] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.View]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_views_list_by_scope_request( + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.View], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AlertsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`alerts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, scope: str, alert_id: str, **kwargs: Any) -> _models.Alert: + """Gets the alert for the scope by alert ID. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Alert] = kwargs.pop("cls", None) + + _request = build_alerts_get_request( + scope=scope, + alert_id=alert_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Alert, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def dismiss( + self, + scope: str, + alert_id: str, + parameters: _models.DismissAlertPayload, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def dismiss( + self, scope: str, alert_id: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def dismiss( + self, scope: str, alert_id: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def dismiss( + self, scope: str, alert_id: str, parameters: Union[_models.DismissAlertPayload, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Alert: + """Dismisses the specified alert. + + :param scope: The fully qualified Azure Resource manager identifier of the resource. Required. + :type scope: str + :param alert_id: Alert ID. Required. + :type alert_id: str + :param parameters: Parameters supplied to the Dismiss Alert operation. Is one of the following + types: DismissAlertPayload, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.DismissAlertPayload or JSON or IO[bytes] + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Alert] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_alerts_dismiss_request( + scope=scope, + alert_id=alert_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Alert, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list(self, scope: str, **kwargs: Any) -> _models.AlertsResult: + """Lists the alerts for scope defined. + + :param scope: The scope associated with alerts operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :return: AlertsResult. The AlertsResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) + + _request = build_alerts_list_request( + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AlertsResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_external( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + **kwargs: Any, + ) -> _models.AlertsResult: + """Lists the Alerts for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :return: AlertsResult. The AlertsResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.AlertsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AlertsResult] = kwargs.pop("cls", None) + + _request = build_alerts_list_external_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AlertsResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ScheduledActionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`scheduled_actions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: + """Get the private scheduled action by name. + + :param name: Scheduled action name. Required. + :type name: str + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_get_request( + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + name: str, + scheduled_action: _models.ScheduledAction, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + name: str, + scheduled_action: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + name: str, + scheduled_action: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + name: str, + scheduled_action: Union[_models.ScheduledAction, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Is one of the following + types: ScheduledAction, JSON, IO[bytes] Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(scheduled_action, (IOBase, bytes)): + _content = scheduled_action + else: + _content = json.dumps(scheduled_action, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_create_or_update_request( + name=name, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Delete a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_delete_request( + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> ItemPaged["_models.ScheduledAction"]: + """List all private scheduled actions. + + :keyword filter: May be used to filter scheduled actions by properties/viewId. Supported + operator is 'eq'. Default value is None. + :paramtype filter: str + :return: An iterator like instance of ScheduledAction + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_request( + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def run(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Processes a private scheduled action. + + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_run_request( + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.ScheduledAction: + """Get the shared scheduled action from the given scope by name. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_get_by_scope_request( + scope=scope, + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: _models.ScheduledAction, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Required. + :type scheduled_action: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update_by_scope( + self, + scope: str, + name: str, + scheduled_action: Union[_models.ScheduledAction, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any, + ) -> _models.ScheduledAction: + """Create or update a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :param scheduled_action: Scheduled action to be created or updated. Is one of the following + types: ScheduledAction, JSON, IO[bytes] Required. + :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(scheduled_action, (IOBase, bytes)): + _content = scheduled_action + else: + _content = json.dumps(scheduled_action, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_create_or_update_by_scope_request( + scope=scope, + name=name, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_by_scope( # pylint: disable=inconsistent-return-statements + self, scope: str, name: str, **kwargs: Any + ) -> None: + """Delete a scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_delete_by_scope_request( + scope=scope, + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_scope( + self, scope: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.ScheduledAction"]: + """List all shared scheduled actions within the given scope. + + :param scope: undefined. Required. + :type scope: str + :keyword filter: May be used to filter scheduled actions by properties/viewId. Supported + operator is 'eq'. Default value is None. + :paramtype filter: str + :return: An iterator like instance of ScheduledAction + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_by_scope_request( + scope=scope, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def run_by_scope( # pylint: disable=inconsistent-return-statements + self, scope: str, name: str, **kwargs: Any + ) -> None: + """Runs a shared scheduled action within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param name: Scheduled action name. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_run_by_scope_request( + scope=scope, + name=name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + def check_name_availability( + self, + check_name_availability_request: _models.CheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, check_name_availability_request: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Required. + :type check_name_availability_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, check_name_availability_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Required. + :type check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action. + + :param check_name_availability_request: The request body. Is one of the following types: + CheckNameAvailabilityRequest, JSON, IO[bytes] Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or JSON or IO[bytes] + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_request, (IOBase, bytes)): + _content = check_name_availability_request + else: + _content = json.dumps(check_name_availability_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_check_name_availability_request( + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: _models.CheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Required. + :type check_name_availability_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Required. + :type check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability_by_scope( + self, + scope: str, + check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> _models.CheckNameAvailabilityResponse: + """Checks availability and correctness of the name for a scheduled action within the given scope. + + :param scope: The scope associated with scheduled action operations. This includes + 'subscriptions/{subscriptionId}' for subscription scope, + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + Department scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for InvoiceSection scope, + 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for + External Billing Account scope and + 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for + External Subscription scope. Note: Insight Alerts are only available on subscription scope. + Required. + :type scope: str + :param check_name_availability_request: Scheduled action to be created or updated. Is one of + the following types: CheckNameAvailabilityRequest, JSON, IO[bytes] Required. + :type check_name_availability_request: + ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or JSON or IO[bytes] + :return: CheckNameAvailabilityResponse. The CheckNameAvailabilityResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_request, (IOBase, bytes)): + _content = check_name_availability_request + else: + _content = json.dumps(check_name_availability_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_check_name_availability_by_scope_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponseWithNestedDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> _models.Setting: + """Get the setting from the given scope by name. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + _request = build_settings_get_by_scope_request( + scope=scope, + type=type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Setting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: _models.Setting, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Required. + :type setting: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update_by_scope( + self, + scope: str, + type: Union[str, _models.SettingType], + setting: Union[_models.Setting, JSON, IO[bytes]], + **kwargs: Any, + ) -> _models.Setting: + """Create or update a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :param setting: Setting to be created or updated. Is one of the following types: Setting, JSON, + IO[bytes] Required. + :type setting: ~azure.mgmt.costmanagement.models.Setting or JSON or IO[bytes] + :return: Setting. The Setting is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.Setting + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Setting] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(setting, (IOBase, bytes)): + _content = setting + else: + _content = json.dumps(setting, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_settings_create_or_update_by_scope_request( + scope=scope, + type=type, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Setting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_by_scope( # pylint: disable=inconsistent-return-statements + self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any + ) -> None: + """Delete a setting within the given scope. + + :param scope: undefined. Required. + :type scope: str + :param type: Setting type. "taginheritance" Required. + :type type: str or ~azure.mgmt.costmanagement.models.SettingType + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_settings_delete_by_scope_request( + scope=scope, + type=type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, scope: str, **kwargs: Any) -> _models.SettingsListResult: + """List all cost management settings in the requested scope. + + :param scope: undefined. Required. + :type scope: str + :return: SettingsListResult. The SettingsListResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.SettingsListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SettingsListResult] = kwargs.pop("cls", None) + + _request = build_settings_list_request( + scope=scope, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SettingsListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GenerateCostDetailsReportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`generate_cost_details_report` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _get_operation_results_initial(self, scope: str, operation_id: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_generate_cost_details_report_get_operation_results_request( + scope=scope, + operation_id=operation_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_get_operation_results( + self, scope: str, operation_id: str, **kwargs: Any + ) -> LROPoller[_models.CostDetailsOperationResults]: + """Get the result of the specified operation. This link is provided in the CostDetails creation + request response Location header. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param operation_id: The target operation Id. Required. + :type operation_id: str + :return: An instance of LROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._get_operation_results_initial( + scope=scope, + operation_id=operation_id, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CostDetailsOperationResults, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CostDetailsOperationResults].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _create_operation_initial( + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_cost_details_report_create_operation_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.GenerateCostDetailsReportErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_operation( + self, + scope: str, + parameters: _models.GenerateCostDetailsReportRequestDefinition, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_operation( + self, scope: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_operation( + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_operation( + self, + scope: str, + parameters: Union[_models.GenerateCostDetailsReportRequestDefinition, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.CostDetailsOperationResults]: + """This API is the replacement for all previously release Usage Details APIs. Request to generate + a cost details report for the provided date range, billing period (Only enterprise customers) + or Invoice Id asynchronously at a certain scope. The initial call to request a report will + return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the + endpoint to poll to get the result of the report generation. The 'Retry-After' provides the + duration to wait before polling for the generated report. A call to poll the report operation + will provide a 202 response with a 'Location' header if the operation is still in progress. + Once the report generation operation completes, the polling endpoint will provide a 200 + response along with details on the report blob(s) that are available for download. The details + on the file(s) available for download will be available in the polling response body. To + Understand cost details (formerly known as usage details) fields found in files ,see + `https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields + `_. + + :param scope: The ARM Resource ID for subscription, billing account, or other billing + scopes.Currently Resource Group and Management Group are not supported. For details, see + `https://aka.ms/costmgmt/scopes `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create cost details operation. Is one of the + following types: GenerateCostDetailsReportRequestDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateCostDetailsReportRequestDefinition + or JSON or IO[bytes] + :return: An instance of LROPoller that returns CostDetailsOperationResults. The + CostDetailsOperationResults is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.CostDetailsOperationResults] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostDetailsOperationResults] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_operation_initial( + scope=scope, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CostDetailsOperationResults, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CostDetailsOperationResults].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CostDetailsOperationResults]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class CostAllocationRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`cost_allocation_rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, billing_account_id: str, rule_name: str, **kwargs: Any) -> _models.CostAllocationRuleDefinition: + """Get a cost allocation rule by rule name and billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + _request = build_cost_allocation_rules_get_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CostAllocationRuleDefinition, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: _models.CostAllocationRuleDefinition, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Required. + :type cost_allocation_rule: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + billing_account_id: str, + rule_name: str, + cost_allocation_rule: Union[_models.CostAllocationRuleDefinition, JSON, IO[bytes]], + **kwargs: Any, + ) -> _models.CostAllocationRuleDefinition: + """Create/Update a rule to allocate cost between different resources within a billing account or + enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :param cost_allocation_rule: Cost allocation rule to be created or updated. Is one of the + following types: CostAllocationRuleDefinition, JSON, IO[bytes] Required. + :type cost_allocation_rule: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition or + JSON or IO[bytes] + :return: CostAllocationRuleDefinition. The CostAllocationRuleDefinition is compatible with + MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleDefinition] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cost_allocation_rule, (IOBase, bytes)): + _content = cost_allocation_rule + else: + _content = json.dumps(cost_allocation_rule, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cost_allocation_rules_create_or_update_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CostAllocationRuleDefinition, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, billing_account_id: str, rule_name: str, **kwargs: Any + ) -> None: + """Delete cost allocation rule for billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param rule_name: Cost allocation rule name. The name cannot include spaces or any non + alphanumeric characters other than '_' and '-'. The max length is 260 characters. Required. + :type rule_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_cost_allocation_rules_delete_request( + billing_account_id=billing_account_id, + rule_name=rule_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, billing_account_id: str, **kwargs: Any) -> ItemPaged["_models.CostAllocationRuleDefinition"]: + """Get the list of all cost allocation rules for a billing account or enterprise enrollment. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :return: An iterator like instance of CostAllocationRuleDefinition + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.CostAllocationRuleDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CostAllocationRuleDefinition]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_cost_allocation_rules_list_request( + billing_account_id=billing_account_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CostAllocationRuleDefinition], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: _models.CostAllocationRuleCheckNameAvailabilityRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Required. + :type cost_allocation_rule_check_name_availability_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + billing_account_id: str, + cost_allocation_rule_check_name_availability_request: Union[ + _models.CostAllocationRuleCheckNameAvailabilityRequest, JSON, IO[bytes] + ], + **kwargs: Any, + ) -> _models.CostAllocationRuleCheckNameAvailabilityResponse: + """Checks availability and correctness of a name for a cost allocation rule. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param cost_allocation_rule_check_name_availability_request: Cost allocation rule to be created + or updated. Is one of the following types: CostAllocationRuleCheckNameAvailabilityRequest, + JSON, IO[bytes] Required. + :type cost_allocation_rule_check_name_availability_request: + ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest or JSON or + IO[bytes] + :return: CostAllocationRuleCheckNameAvailabilityResponse. The + CostAllocationRuleCheckNameAvailabilityResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.CostAllocationRuleCheckNameAvailabilityResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CostAllocationRuleCheckNameAvailabilityResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cost_allocation_rule_check_name_availability_request, (IOBase, bytes)): + _content = cost_allocation_rule_check_name_availability_request + else: + _content = json.dumps(cost_allocation_rule_check_name_availability_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cost_allocation_rules_check_name_availability_request( + billing_account_id=billing_account_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CostAllocationRuleCheckNameAvailabilityResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class BenefitRecommendationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`benefit_recommendations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + billing_scope: str, + *, + filter: Optional[str] = None, + orderby: Optional[str] = None, + expand: Optional[str] = None, + **kwargs: Any, + ) -> ItemPaged["_models.BenefitRecommendationModel"]: + """List of recommendations for purchasing savings plan. + + :param billing_scope: The scope associated with benefit recommendation operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, + /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement + scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billing profile scope. Required. + :type billing_scope: str + :keyword filter: Can be used to filter benefitRecommendations by: properties/scope with allowed + values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with + allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; + properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; + properties/subscriptionId; properties/resourceGroup. Default value is None. + :paramtype filter: str + :keyword orderby: May be used to order the recommendations by: properties/armSkuName. For the + savings plan, the results are in order by default. There is no need to use this clause. Default + value is None. + :paramtype orderby: str + :keyword expand: May be used to expand the properties by: properties/usage, + properties/allRecommendationDetails. Default value is None. + :paramtype expand: str + :return: An iterator like instance of BenefitRecommendationModel + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitRecommendationModel] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitRecommendationModel]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_recommendations_list_request( + billing_scope=billing_scope, + filter=filter, + orderby=orderby, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitRecommendationModel], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class BenefitUtilizationSummariesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`benefit_utilization_summaries` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_billing_account_id( + self, + billing_account_id: str, + *, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + filter: Optional[str] = None, + **kwargs: Any, + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: + """Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain + values: 'Daily' and 'Monthly'. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :keyword filter: Supports filtering by properties/benefitId, properties/benefitOrderId and + properties/usageDate. Default value is None. + :paramtype filter: str + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_billing_account_id_request( + billing_account_id=billing_account_id, + grain_parameter=grain_parameter, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_billing_profile_id( + self, + billing_account_id: str, + billing_profile_id: str, + *, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + filter: Optional[str] = None, + **kwargs: Any, + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: + """Lists savings plan utilization summaries for billing profile. Supported at grain values: + 'Daily' and 'Monthly'. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :keyword filter: Supports filtering by properties/benefitId, properties/benefitOrderId and + properties/usageDate. Default value is None. + :paramtype filter: str + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_billing_profile_id_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + grain_parameter=grain_parameter, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_savings_plan_order( + self, + savings_plan_order_id: str, + *, + filter: Optional[str] = None, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + **kwargs: Any, + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: + """Lists the savings plan utilization summaries for daily or monthly grain. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :keyword filter: Supports filtering by properties/usageDate. Default value is None. + :paramtype filter: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_savings_plan_order_request( + savings_plan_order_id=savings_plan_order_id, + filter=filter, + grain_parameter=grain_parameter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + *, + filter: Optional[str] = None, + grain_parameter: Optional[Union[str, _models.GrainParameter]] = None, + **kwargs: Any, + ) -> ItemPaged["_models.BenefitUtilizationSummary"]: + """Lists the savings plan utilization summaries for daily or monthly grain. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :keyword filter: Supports filtering by properties/usageDate. Default value is None. + :paramtype filter: str + :keyword grain_parameter: Grain. Known values are: "Hourly", "Daily", and "Monthly". Default + value is None. + :paramtype grain_parameter: str or ~azure.mgmt.costmanagement.models.GrainParameter + :return: An iterator like instance of BenefitUtilizationSummary + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.BenefitUtilizationSummary] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BenefitUtilizationSummary]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_benefit_utilization_summaries_list_by_savings_plan_id_request( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + filter=filter, + grain_parameter=grain_parameter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.BenefitUtilizationSummary], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class GenerateBenefitUtilizationSummariesReportOperations: # pylint: disable=name-too-long + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`generate_benefit_utilization_summaries_report` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _generate_by_billing_account_initial( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_billing_account_request( + billing_account_id=billing_account_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_billing_account( + self, + billing_account_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account. + This API supports only enrollment accounts. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_billing_account_initial( + billing_account_id=billing_account_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_billing_profile_initial( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_billing_profile_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_billing_profile( + self, + billing_account_id: str, + billing_profile_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided billing account + and billing profile. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_billing_profile_initial( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_reservation_order_id_initial( # pylint: disable=name-too-long + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_reservation_order_id_request( + reservation_order_id=reservation_order_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_reservation_order_id( + self, + reservation_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation + order. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_reservation_order_id_initial( + reservation_order_id=reservation_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_reservation_id_initial( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_reservation_id_request( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_reservation_id( + self, + reservation_order_id: str, + reservation_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided reservation. + + :param reservation_order_id: Reservation Order ID. Required. + :type reservation_order_id: str + :param reservation_id: Reservation ID. Required. + :type reservation_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_reservation_id_initial( + reservation_order_id=reservation_order_id, + reservation_id=reservation_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_savings_plan_order_id_initial( # pylint: disable=name-too-long + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_order_id_request( + savings_plan_order_id=savings_plan_order_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_savings_plan_order_id( + self, + savings_plan_order_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan + order. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_savings_plan_order_id_initial( + savings_plan_order_id=savings_plan_order_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _generate_by_savings_plan_id_initial( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(benefit_utilization_summaries_request, (IOBase, bytes)): + _content = benefit_utilization_summaries_request + else: + _content = json.dumps(benefit_utilization_summaries_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_benefit_utilization_summaries_report_generate_by_savings_plan_id_request( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: _models.BenefitUtilizationSummariesRequest, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Required. + :type benefit_utilization_summaries_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_by_savings_plan_id( + self, + savings_plan_order_id: str, + savings_plan_id: str, + benefit_utilization_summaries_request: Union[_models.BenefitUtilizationSummariesRequest, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.BenefitUtilizationSummariesOperationStatus]: + """Triggers generation of a benefit utilization summaries report for the provided savings plan. + + :param savings_plan_order_id: Savings plan order ID. Required. + :type savings_plan_order_id: str + :param savings_plan_id: Savings plan ID. Required. + :type savings_plan_id: str + :param benefit_utilization_summaries_request: Async Benefit Utilization Summary report to be + created. Is one of the following types: BenefitUtilizationSummariesRequest, JSON, IO[bytes] + Required. + :type benefit_utilization_summaries_request: + ~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns BenefitUtilizationSummariesOperationStatus. The + BenefitUtilizationSummariesOperationStatus is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.BenefitUtilizationSummariesOperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BenefitUtilizationSummariesOperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_by_savings_plan_id_initial( + savings_plan_order_id=savings_plan_order_id, + savings_plan_id=savings_plan_id, + benefit_utilization_summaries_request=benefit_utilization_summaries_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BenefitUtilizationSummariesOperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BenefitUtilizationSummariesOperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class GenerateDetailedCostReportOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`generate_detailed_cost_report` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _create_operation_initial( + self, + scope: str, + parameters: Union[_models.GenerateDetailedCostReportDefinition, JSON, IO[bytes]], + **kwargs: Any, + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_generate_detailed_cost_report_create_operation_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.GenerateDetailedCostReportErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-Consumption-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-Consumption-AsyncOperation") + ) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_operation( + self, + scope: str, + parameters: _models.GenerateDetailedCostReportDefinition, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GenerateDetailedCostReportOperationResult. The + GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_operation( + self, scope: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GenerateDetailedCostReportOperationResult. The + GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_operation( + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GenerateDetailedCostReportOperationResult. The + GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_operation( + self, + scope: str, + parameters: Union[_models.GenerateDetailedCostReportDefinition, JSON, IO[bytes]], + **kwargs: Any, + ) -> LROPoller[_models.GenerateDetailedCostReportOperationResult]: + """Generates the detailed cost report for provided date range, billing period(only enterprise + customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header + Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the + operation will provide the status and if the operation is completed the blob file where + generated detailed cost report is being stored. + + :param scope: The ARM Resource ID for subscription, resource group, billing account, or other + billing scopes. For details, see `https://aka.ms/costmgmt/scopes + `_. Required. + :type scope: str + :param parameters: Parameters supplied to the Create detailed cost report operation. Is one of + the following types: GenerateDetailedCostReportDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.GenerateDetailedCostReportDefinition or + JSON or IO[bytes] + :return: An instance of LROPoller that returns GenerateDetailedCostReportOperationResult. The + GenerateDetailedCostReportOperationResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.GenerateDetailedCostReportOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GenerateDetailedCostReportOperationResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_operation_initial( + scope=scope, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.GenerateDetailedCostReportOperationResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GenerateDetailedCostReportOperationResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GenerateDetailedCostReportOperationResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ForecastOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`forecast` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def usage( + self, + scope: str, + parameters: _models.ForecastDefinition, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any, + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. + Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def usage( + self, + scope: str, + parameters: JSON, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any, + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. + Required. + :type parameters: JSON + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def usage( + self, + scope: str, + parameters: IO[bytes], + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any, + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. + Required. + :type parameters: IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def usage( + self, + scope: str, + parameters: Union[_models.ForecastDefinition, JSON, IO[bytes]], + *, + filter: Optional[str] = None, + **kwargs: Any, + ) -> Optional[_models.ForecastResult]: + """Lists the forecast charges for scope defined. + + :param scope: The scope associated with forecast operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Forecast Config operation. Is one + of the following types: ForecastDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or JSON or IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :return: ForecastResult or None. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.ForecastResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_forecast_usage_request( + scope=scope, + filter=filter, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ForecastResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: _models.ForecastDefinition, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: JSON, + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: JSON + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: IO[bytes], + *, + filter: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def external_cloud_provider_usage( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: Union[_models.ForecastDefinition, JSON, IO[bytes]], + *, + filter: Optional[str] = None, + **kwargs: Any, + ) -> _models.ForecastResult: + """Lists the forecast charges for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Is one of the following types: ForecastDefinition, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.ForecastDefinition or JSON or IO[bytes] + :keyword filter: May be used to filter forecasts by properties/usageDate (Utc time), + properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + and 'and'. It does not currently support 'ne', 'or', or 'not'. Default value is None. + :paramtype filter: str + :return: ForecastResult. The ForecastResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.ForecastResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ForecastResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_forecast_external_cloud_provider_usage_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + filter=filter, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ForecastResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DimensionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`dimensions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, + scope: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skiptoken: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any, + ) -> ItemPaged["_models.Dimension"]: + """Lists the dimensions by the defined scope. + + :param scope: The scope associated with dimension operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :keyword filter: May be used to filter dimensions by properties/category, + properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', + 'ge'. Default value is None. + :paramtype filter: str + :keyword expand: May be used to expand the properties/data within a dimension category. By + default, data is not included when listing dimensions. Default value is None. + :paramtype expand: str + :keyword skiptoken: Skiptoken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skiptoken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skiptoken: str + :keyword top: May be used to limit the number of results to the most recent N dimension data. + Default value is None. + :paramtype top: int + :return: An iterator like instance of Dimension + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Dimension] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Dimension]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_dimensions_list_request( + scope=scope, + filter=filter, + expand=expand, + skiptoken=skiptoken, + top=top, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Dimension], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skiptoken: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any, + ) -> ItemPaged["_models.Dimension"]: + """Lists the dimensions by the external cloud provider type. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :keyword filter: May be used to filter dimensions by properties/category, + properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', + 'ge'. Default value is None. + :paramtype filter: str + :keyword expand: May be used to expand the properties/data within a dimension category. By + default, data is not included when listing dimensions. Default value is None. + :paramtype expand: str + :keyword skiptoken: Skiptoken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skiptoken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skiptoken: str + :keyword top: May be used to limit the number of results to the most recent N dimension data. + Default value is None. + :paramtype top: int + :return: An iterator like instance of Dimension + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.Dimension] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Dimension]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_dimensions_by_external_cloud_provider_type_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + filter=filter, + expand=expand, + skiptoken=skiptoken, + top=top, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Dimension], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class QueryOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`query` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def usage( + self, scope: str, parameters: _models.QueryDefinition, *, content_type: str = "application/json", **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def usage( + self, scope: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def usage( + self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def usage( + self, scope: str, parameters: Union[_models.QueryDefinition, JSON, IO[bytes]], **kwargs: Any + ) -> Optional[_models.QueryResult]: + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group + scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. Required. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is one of + the following types: QueryDefinition, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or JSON or IO[bytes] + :return: QueryResult or None. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.QueryResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_query_usage_request( + scope=scope, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QueryResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: _models.QueryDefinition, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + @overload + def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ -class Operations: + @overload + def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any, + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def usage_by_external_cloud_provider_type( + self, + external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], + external_cloud_provider_id: str, + parameters: Union[_models.QueryDefinition, JSON, IO[bytes]], + **kwargs: Any, + ) -> _models.QueryResult: + """Query the usage data for external cloud provider type defined. + + :param external_cloud_provider_type: The external cloud provider type associated with + dimension/query operations. This includes 'externalSubscriptions' for linked account and + 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" + and "externalBillingAccounts". Required. + :type external_cloud_provider_type: str or + ~azure.mgmt.costmanagement.models.ExternalCloudProviderType + :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or + '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + Required. + :type external_cloud_provider_id: str + :param parameters: The request body. Is one of the following types: QueryDefinition, JSON, + IO[bytes] Required. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or JSON or IO[bytes] + :return: QueryResult. The QueryResult is compatible with MutableMapping + :rtype: ~azure.mgmt.costmanagement.models.QueryResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.QueryResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_query_usage_by_external_cloud_provider_type_request( + external_cloud_provider_type=external_cloud_provider_type, + external_cloud_provider_id=external_cloud_provider_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.QueryResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class GenerateReservationDetailsReportOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`operations` attribute. + :attr:`generate_reservation_details_report` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") @@ -75,21 +10651,140 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + def _by_billing_account_id_initial( + self, billing_account_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_generate_reservation_details_report_by_billing_account_id_request( + billing_account_id=billing_account_id, + start_date=start_date, + end_date=end_date, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.CostManagementOperation"]: - """Lists all of the available cost management REST API operations. + def begin_by_billing_account_id( + self, billing_account_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> LROPoller[_models.OperationStatus]: + """Generates the reservations details report for provided date range asynchronously based on + enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. + For more details on the roles see, + `https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + `_. - :return: An iterator like instance of either CostManagementOperation or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.CostManagementOperation] + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :keyword start_date: Start Date. Required. + :paramtype start_date: str + :keyword end_date: End Date. Required. + :paramtype end_date: str + :return: An instance of LROPoller that returns OperationStatus. The OperationStatus is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatus] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._by_billing_account_id_initial( + billing_account_id=billing_account_id, + start_date=start_date, + end_date=end_date, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _by_billing_profile_id_initial( + self, billing_account_id: str, billing_profile_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -98,57 +10793,553 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.CostManagementOperation"]: } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + _request = build_generate_reservation_details_report_by_billing_profile_id_request( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + start_date=start_date, + end_date=end_date, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_by_billing_profile_id( + self, billing_account_id: str, billing_profile_id: str, *, start_date: str, end_date: str, **kwargs: Any + ) -> LROPoller[_models.OperationStatus]: + """Generates the reservations details report for provided date range asynchronously by billing + profile. The Reservation usage details can be viewed by only certain enterprise roles by + default. For more details on the roles see, + `https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access + `_. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_profile_id: Billing Profile ID. Required. + :type billing_profile_id: str + :keyword start_date: Start Date. Required. + :paramtype start_date: str + :keyword end_date: End Date. Required. + :paramtype end_date: str + :return: An instance of LROPoller that returns OperationStatus. The OperationStatus is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._by_billing_profile_id_initial( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + start_date=start_date, + end_date=end_date, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatus, response.json()) if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - def get_next(next_link=None): - _request = prepare_request(next_link) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class PriceSheetOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.costmanagement.CostManagementClient`'s + :attr:`price_sheet` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _download_by_invoice_initial( + self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_price_sheet_download_by_invoice_request( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + invoice_name=invoice_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_download_by_invoice( + self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any + ) -> LROPoller[_models.DownloadURL]: + """Gets a URL to download the pricesheet for an invoice. The operation is supported for billing + accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + + :param billing_account_name: BillingAccount ID. Required. + :type billing_account_name: str + :param billing_profile_name: Billing Profile Name. Required. + :type billing_profile_name: str + :param invoice_name: The ID that uniquely identifies an invoice. Required. + :type invoice_name: str + :return: An instance of LROPoller that returns DownloadURL. The DownloadURL is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.DownloadURL] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DownloadURL] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._download_by_invoice_initial( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + invoice_name=invoice_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): response = pipeline_response.http_response + deserialized = _deserialize(_models.DownloadURL, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - return pipeline_response + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DownloadURL].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DownloadURL]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - return ItemPaged(get_next, extract_data) + def _download_by_billing_profile_initial( + self, billing_account_name: str, billing_profile_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_price_sheet_download_by_billing_profile_request( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_download_by_billing_profile( + self, billing_account_name: str, billing_profile_name: str, **kwargs: Any + ) -> LROPoller[_models.PricesheetDownloadProperties]: + """Gets a URL to download the current month's pricesheet for a billing profile. The operation is + supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + Customer Agreement. + + You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure + Reserved Instance (RI) pricing is only available through the new version of the API. + + Due to Azure product growth, the Azure price sheet download experience in this preview version + will be updated from a single csv/json file to a Zip file containing multiple csv/json files, + each with max size of 75MB. + + :param billing_account_name: BillingAccount ID. Required. + :type billing_account_name: str + :param billing_profile_name: Billing Profile Name. Required. + :type billing_profile_name: str + :return: An instance of LROPoller that returns PricesheetDownloadProperties. The + PricesheetDownloadProperties is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.PricesheetDownloadProperties] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PricesheetDownloadProperties] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._download_by_billing_profile_initial( + billing_account_name=billing_account_name, + billing_profile_name=billing_profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PricesheetDownloadProperties, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PricesheetDownloadProperties].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PricesheetDownloadProperties]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _download_by_billing_account_initial( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_price_sheet_download_by_billing_account_request( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ArmErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_download_by_billing_account( + self, billing_account_id: str, billing_period_name: str, **kwargs: Any + ) -> LROPoller[_models.OperationStatus]: + """Generates the pricesheet for the provided billing period asynchronously based on the Enrollment + ID. This is for Enterprise Agreement customers. + + **Migrate to version 2025-03-01** + + You can use the 2025-03-01 API version with the new URI: + + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download' + + With a new schema detailed below, the new version of the price sheet provides additional + information and includes prices for Azure Reserved Instances (RI) for the current billing + period. We recommend downloading an Azure Price Sheet for when entering a new billing period if + you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing. + + The EA Azure price sheet is available for billing periods in the past 13 months. To request a + price sheet for a billing period older than 13 months, please contact support. + + The Azure price sheet download experience has been updated from a single .csv file to a zip + file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has + been upgraded to use http POST method; details can be found below. + + All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account + (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to + be retired on 01 June 2026 and will no longer be supported after this date. + + :param billing_account_id: BillingAccount ID. Required. + :type billing_account_id: str + :param billing_period_name: Billing Period Name. Required. + :type billing_period_name: str + :return: An instance of LROPoller that returns OperationStatus. The OperationStatus is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._download_by_billing_account_initial( + billing_account_id=billing_account_id, + billing_period_name=billing_period_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs, + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatus, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatus].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatus]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py deleted file mode 100644 index 5f36fb4b7369..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_price_sheet_operations.py +++ /dev/null @@ -1,563 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_download_by_invoice_request( - billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download", - ) - path_format_arguments = { - "billingAccountName": _SERIALIZER.url( - "billing_account_name", - billing_account_name, - "str", - pattern=r"([A-Za-z0-9]+(-[A-Za-z0-9]+)+):([A-Za-z0-9]+(-[A-Za-z0-9]+)+)_[0-9]{4}-[0-9]{2}-[0-9]{2}", - ), - "billingProfileName": _SERIALIZER.url( - "billing_profile_name", billing_profile_name, "str", pattern=r"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)" - ), - "invoiceName": _SERIALIZER.url("invoice_name", invoice_name, "str", pattern=r"[A-Za-z0-9]+"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_download_by_billing_profile_request( # pylint: disable=name-too-long - billing_account_name: str, billing_profile_name: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download", - ) - path_format_arguments = { - "billingAccountName": _SERIALIZER.url( - "billing_account_name", - billing_account_name, - "str", - pattern=r"([A-Za-z0-9]+(-[A-Za-z0-9]+)+):([A-Za-z0-9]+(-[A-Za-z0-9]+)+)_[0-9]{4}-[0-9]{2}-[0-9]{2}", - ), - "billingProfileName": _SERIALIZER.url( - "billing_profile_name", billing_profile_name, "str", pattern=r"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_download_by_billing_account_request( # pylint: disable=name-too-long - billing_account_id: str, billing_period_name: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download", - ) - path_format_arguments = { - "billingAccountId": _SERIALIZER.url("billing_account_id", billing_account_id, "str"), - "billingPeriodName": _SERIALIZER.url("billing_period_name", billing_period_name, "str", pattern=r"^[0-9]*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class PriceSheetOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`price_sheet` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _download_by_invoice_initial( - self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_by_invoice_request( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - invoice_name=invoice_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) - response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_download_by_invoice( - self, billing_account_name: str, billing_profile_name: str, invoice_name: str, **kwargs: Any - ) -> LROPoller[_models.DownloadURL]: - """Gets a URL to download the pricesheet for an invoice. The operation is supported for billing - accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. - - :param billing_account_name: The ID that uniquely identifies a billing account. Required. - :type billing_account_name: str - :param billing_profile_name: The ID that uniquely identifies a billing profile. Required. - :type billing_profile_name: str - :param invoice_name: The ID that uniquely identifies an invoice. Required. - :type invoice_name: str - :return: An instance of LROPoller that returns either DownloadURL or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.DownloadURL] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DownloadURL] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._download_by_invoice_initial( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - invoice_name=invoice_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DownloadURL", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DownloadURL].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DownloadURL]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _download_by_billing_profile_initial( - self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_by_billing_profile_request( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) - response_headers["OData-EntityId"] = self._deserialize("str", response.headers.get("OData-EntityId")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_download_by_billing_profile( - self, billing_account_name: str, billing_profile_name: str, **kwargs: Any - ) -> LROPoller[_models.PricesheetDownloadProperties]: - """Gets a URL to download the current month's pricesheet for a billing profile. The operation is - supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft - Customer Agreement. - - You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure - Reserved Instance (RI) pricing is only available through the new version of the API. - - Due to Azure product growth, the Azure price sheet download experience in this preview version - will be updated from a single csv/json file to a Zip file containing multiple csv/json files, - each with max size of 75MB. - - :param billing_account_name: The ID that uniquely identifies a billing account. Required. - :type billing_account_name: str - :param billing_profile_name: The ID that uniquely identifies a billing profile. Required. - :type billing_profile_name: str - :return: An instance of LROPoller that returns either PricesheetDownloadProperties or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.PricesheetDownloadProperties] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PricesheetDownloadProperties] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._download_by_billing_profile_initial( - billing_account_name=billing_account_name, - billing_profile_name=billing_profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PricesheetDownloadProperties", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PricesheetDownloadProperties].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PricesheetDownloadProperties]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _download_by_billing_account_initial( - self, billing_account_id: str, billing_period_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_by_billing_account_request( - billing_account_id=billing_account_id, - billing_period_name=billing_period_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseAutoGenerated2, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("str", response.headers.get("Retry-After")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_download_by_billing_account( - self, billing_account_id: str, billing_period_name: str, **kwargs: Any - ) -> LROPoller[_models.OperationStatusAutoGenerated]: - """Generates the pricesheet for the provided billing period asynchronously based on the Enrollment - ID. This is for Enterprise Agreement customers. - - **Migrate to version 2025-03-01** - - You can use the 2025-03-01 API version with the new URI: - - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download' - - With a new schema detailed below, the new version of the price sheet provides additional - information and includes prices for Azure Reserved Instances (RI) for the current billing - period. We recommend downloading an Azure Price Sheet for when entering a new billing period if - you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing. - - The EA Azure price sheet is available for billing periods in the past 13 months. To request a - price sheet for a billing period older than 13 months, please contact support. - - The Azure price sheet download experience has been updated from a single .csv file to a zip - file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has - been upgraded to use http POST method; details can be found below. - - All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account - (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to - be retired on 01 June 2026 and will no longer be supported after this date. - - :param billing_account_id: BillingAccount ID. Required. - :type billing_account_id: str - :param billing_period_name: Billing Period Name. Required. - :type billing_period_name: str - :return: An instance of LROPoller that returns either OperationStatusAutoGenerated or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.costmanagement.models.OperationStatusAutoGenerated] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusAutoGenerated] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._download_by_billing_account_initial( - billing_account_id=billing_account_id, - billing_period_name=billing_period_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OperationStatusAutoGenerated", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OperationStatusAutoGenerated].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OperationStatusAutoGenerated]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py deleted file mode 100644 index c6a84d9dda29..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py +++ /dev/null @@ -1,441 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_usage_request(scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/query") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str", skip_quote=True), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_usage_by_external_cloud_provider_type_request( # pylint: disable=name-too-long - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query", - ) - path_format_arguments = { - "externalCloudProviderType": _SERIALIZER.url( - "external_cloud_provider_type", external_cloud_provider_type, "str" - ), - "externalCloudProviderId": _SERIALIZER.url("external_cloud_provider_id", external_cloud_provider_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class QueryOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`query` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def usage( - self, scope: str, parameters: _models.QueryDefinition, *, content_type: str = "application/json", **kwargs: Any - ) -> Optional[_models.QueryResult]: - """Query the usage data for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with query and export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def usage( - self, scope: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> Optional[_models.QueryResult]: - """Query the usage data for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with query and export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def usage( - self, scope: str, parameters: Union[_models.QueryDefinition, IO[bytes]], **kwargs: Any - ) -> Optional[_models.QueryResult]: - """Query the usage data for scope defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with query and export operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group - scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope, and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' - specific for partners. Required. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] - :return: QueryResult or None or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.QueryResult]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QueryDefinition") - - _request = build_usage_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize("QueryResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def usage_by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: _models.QueryDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QueryResult: - """Query the usage data for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def usage_by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.QueryResult: - """Query the usage data for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def usage_by_external_cloud_provider_type( - self, - external_cloud_provider_type: Union[str, _models.ExternalCloudProviderType], - external_cloud_provider_id: str, - parameters: Union[_models.QueryDefinition, IO[bytes]], - **kwargs: Any - ) -> _models.QueryResult: - """Query the usage data for external cloud provider type defined. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param external_cloud_provider_type: The external cloud provider type associated with - dimension/query operations. This includes 'externalSubscriptions' for linked account and - 'externalBillingAccounts' for consolidated account. Known values are: "externalSubscriptions" - and "externalBillingAccounts". Required. - :type external_cloud_provider_type: str or - ~azure.mgmt.costmanagement.models.ExternalCloudProviderType - :param external_cloud_provider_id: This can be '{externalSubscriptionId}' for linked account or - '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - Required. - :type external_cloud_provider_id: str - :param parameters: Parameters supplied to the CreateOrUpdate Query Config operation. Is either - a QueryDefinition type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition or IO[bytes] - :return: QueryResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.QueryResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.QueryResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "QueryDefinition") - - _request = build_usage_by_external_cloud_provider_type_request( - external_cloud_provider_type=external_cloud_provider_type, - external_cloud_provider_id=external_cloud_provider_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("QueryResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py deleted file mode 100644 index 18978c5985da..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_scheduled_actions_operations.py +++ /dev/null @@ -1,1541 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(*, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/scheduledActions") - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_scope_request(scope: str, *, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/scheduledActions") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request(name: str, *, if_match: Optional[str] = None, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/scheduledActions/{name}") - path_format_arguments = { - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/scheduledActions/{name}") - path_format_arguments = { - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request(name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/scheduledActions/{name}") - path_format_arguments = { - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_by_scope_request( - scope: str, name: str, *, if_match: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_run_request(name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/scheduledActions/{name}/execute") - path_format_arguments = { - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_run_by_scope_request(scope: str, name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/checkNameAvailability") - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_by_scope_request( # pylint: disable=name-too-long - scope: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/checkNameAvailability") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ScheduledActionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`scheduled_actions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, filter: Optional[str] = None, **kwargs: Any) -> ItemPaged["_models.ScheduledAction"]: - """List all private scheduled actions. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator - is 'eq'. Default value is None. - :type filter: str - :return: An iterator like instance of either ScheduledAction or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_scope( - self, scope: str, filter: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.ScheduledAction"]: - """List all shared scheduled actions within the given scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param filter: May be used to filter scheduled actions by properties/viewId. Supported operator - is 'eq'. Default value is None. - :type filter: str - :return: An iterator like instance of either ScheduledAction or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.ScheduledAction] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledActionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_scope_request( - scope=scope, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ScheduledActionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @overload - def create_or_update( - self, - name: str, - scheduled_action: _models.ScheduledAction, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - name: str, - scheduled_action: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - name: str, - scheduled_action: Union[_models.ScheduledAction, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO[bytes] type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scheduled_action, (IOBase, bytes)): - _content = scheduled_action - else: - _json = self._serialize.body(scheduled_action, "ScheduledAction") - - _request = build_create_or_update_request( - name=name, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get(self, name: str, **kwargs: Any) -> _models.ScheduledAction: - """Get the private scheduled action by name. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param name: Scheduled action name. Required. - :type name: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - _request = build_get_request( - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements - """Delete a private scheduled action. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def create_or_update_by_scope( - self, - scope: str, - name: str, - scheduled_action: _models.ScheduledAction, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update_by_scope( - self, - scope: str, - name: str, - scheduled_action: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Required. - :type scheduled_action: IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update_by_scope( - self, - scope: str, - name: str, - scheduled_action: Union[_models.ScheduledAction, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.ScheduledAction: - """Create or update a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :param scheduled_action: Scheduled action to be created or updated. Is either a ScheduledAction - type or a IO[bytes] type. Required. - :type scheduled_action: ~azure.mgmt.costmanagement.models.ScheduledAction or IO[bytes] - :param if_match: ETag of the Entity. Not required when creating an entity. Optional when - updating an entity and can be specified to achieve optimistic concurrency. Default value is - None. - :type if_match: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scheduled_action, (IOBase, bytes)): - _content = scheduled_action - else: - _json = self._serialize.body(scheduled_action, "ScheduledAction") - - _request = build_create_or_update_by_scope_request( - scope=scope, - name=name, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_by_scope(self, scope: str, name: str, **kwargs: Any) -> _models.ScheduledAction: - """Get the shared scheduled action from the given scope by name. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :return: ScheduledAction or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.ScheduledAction - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) - - _request = build_get_by_scope_request( - scope=scope, - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ScheduledAction", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete_by_scope( # pylint: disable=inconsistent-return-statements - self, scope: str, name: str, **kwargs: Any - ) -> None: - """Delete a scheduled action within the given scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_by_scope_request( - scope=scope, - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def run(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements - """Processes a private scheduled action. - - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_run_request( - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def run_by_scope( # pylint: disable=inconsistent-return-statements - self, scope: str, name: str, **kwargs: Any - ) -> None: - """Runs a shared scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param name: Scheduled action name. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_run_by_scope_request( - scope=scope, - name=name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @overload - def check_name_availability( - self, - check_name_availability_request: _models.CheckNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action. - - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, check_name_availability_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action. - - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action. - - :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO[bytes] type. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_request, (IOBase, bytes)): - _content = check_name_availability_request - else: - _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - - _request = build_check_name_availability_request( - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def check_name_availability_by_scope( - self, - scope: str, - check_name_availability_request: _models.CheckNameAvailabilityRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability_by_scope( - self, - scope: str, - check_name_availability_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param check_name_availability_request: Scheduled action to be created or updated. Required. - :type check_name_availability_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability_by_scope( - self, - scope: str, - check_name_availability_request: Union[_models.CheckNameAvailabilityRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameAvailabilityResponse: - """Checks availability and correctness of the name for a scheduled action within the given scope. - - :param scope: The scope associated with scheduled action operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Note: Insight Alerts are only available on subscription scope. - Required. - :type scope: str - :param check_name_availability_request: Scheduled action to be created or updated. Is either a - CheckNameAvailabilityRequest type or a IO[bytes] type. Required. - :type check_name_availability_request: - ~azure.mgmt.costmanagement.models.CheckNameAvailabilityRequest or IO[bytes] - :return: CheckNameAvailabilityResponse or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.CheckNameAvailabilityResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_request, (IOBase, bytes)): - _content = check_name_availability_request - else: - _json = self._serialize.body(check_name_availability_request, "CheckNameAvailabilityRequest") - - _request = build_check_name_availability_by_scope_request( - scope=scope, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponseWithNestedDetails, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py deleted file mode 100644 index 406e7cbda747..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_settings_operations.py +++ /dev/null @@ -1,489 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_by_scope_request( - scope: str, type: Union[str, _models.SettingType], **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings/{type}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "type": _SERIALIZER.url("type", type, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_scope_request(scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings/{type}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "type": _SERIALIZER.url("type", type, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_by_scope_request(scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/settings/{type}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "type": _SERIALIZER.url("type", type, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class SettingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`settings` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, scope: str, **kwargs: Any) -> _models.SettingsListResult: - """List all cost management settings in the requested scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :return: SettingsListResult or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.SettingsListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SettingsListResult] = kwargs.pop("cls", None) - - _request = build_list_request( - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SettingsListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update_by_scope( - self, - scope: str, - type: Union[str, _models.SettingType], - setting: _models.Setting, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Setting: - """Create or update a setting within the given scope. - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :param setting: Setting to be created or updated. Required. - :type setting: ~azure.mgmt.costmanagement.models.Setting - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update_by_scope( - self, - scope: str, - type: Union[str, _models.SettingType], - setting: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Setting: - """Create or update a setting within the given scope. - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :param setting: Setting to be created or updated. Required. - :type setting: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update_by_scope( - self, - scope: str, - type: Union[str, _models.SettingType], - setting: Union[_models.Setting, IO[bytes]], - **kwargs: Any - ) -> _models.Setting: - """Create or update a setting within the given scope. - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :param setting: Setting to be created or updated. Is either a Setting type or a IO[bytes] type. - Required. - :type setting: ~azure.mgmt.costmanagement.models.Setting or IO[bytes] - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Setting] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(setting, (IOBase, bytes)): - _content = setting - else: - _json = self._serialize.body(setting, "Setting") - - _request = build_create_or_update_by_scope_request( - scope=scope, - type=type, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Setting", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_by_scope(self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any) -> _models.Setting: - """Get the setting from the given scope by name. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :return: Setting or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.Setting - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Setting] = kwargs.pop("cls", None) - - _request = build_get_by_scope_request( - scope=scope, - type=type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Setting", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete_by_scope( # pylint: disable=inconsistent-return-statements - self, scope: str, type: Union[str, _models.SettingType], **kwargs: Any - ) -> None: - """Delete a setting within the given scope. - - .. seealso:: - - https://docs.microsoft.com/rest/api/cost-management/ - - :param scope: The scope associated with this setting. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billing profile scope. Required. - :type scope: str - :param type: Setting type. "taginheritance" Required. - :type type: str or ~azure.mgmt.costmanagement.models.SettingType - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_by_scope_request( - scope=scope, - type=type, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py deleted file mode 100644 index 11a7faa058d0..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_views_operations.py +++ /dev/null @@ -1,1005 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CostManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/views") - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_scope_request(scope: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/views") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(view_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/views/{viewName}") - path_format_arguments = { - "viewName": _SERIALIZER.url("view_name", view_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request(view_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/views/{viewName}") - path_format_arguments = { - "viewName": _SERIALIZER.url("view_name", view_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request(view_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.CostManagement/views/{viewName}") - path_format_arguments = { - "viewName": _SERIALIZER.url("view_name", view_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/views/{viewName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "viewName": _SERIALIZER.url("view_name", view_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/views/{viewName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "viewName": _SERIALIZER.url("view_name", view_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_by_scope_request(scope: str, view_name: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.CostManagement/views/{viewName}") - path_format_arguments = { - "scope": _SERIALIZER.url("scope", scope, "str"), - "viewName": _SERIALIZER.url("view_name", view_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ViewsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.costmanagement.CostManagementClient`'s - :attr:`views` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CostManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.View"]: - """Lists all views by tenant and object. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :return: An iterator like instance of either View or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.View] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ViewListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_scope(self, scope: str, **kwargs: Any) -> ItemPaged["_models.View"]: - """Lists all views at the given scope. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :return: An iterator like instance of either View or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.costmanagement.models.View] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ViewListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_scope_request( - scope=scope, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ViewListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, view_name: str, **kwargs: Any) -> _models.View: - """Gets the view by view name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - _request = build_get_request( - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, view_name: str, parameters: _models.View, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, view_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "View") - - _request = build_create_or_update_request( - view_name=view_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete(self, view_name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements - """The operation to delete a view. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param view_name: View name. Required. - :type view_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def get_by_scope(self, scope: str, view_name: str, **kwargs: Any) -> _models.View: - """Gets the view for the defined scope by view name. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - _request = build_get_by_scope_request( - scope=scope, - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update_by_scope( - self, - scope: str, - view_name: str, - parameters: _models.View, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update_by_scope( - self, - scope: str, - view_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update_by_scope( - self, scope: str, view_name: str, parameters: Union[_models.View, IO[bytes]], **kwargs: Any - ) -> _models.View: - """The operation to create or update a view. Update operation requires latest eTag to be set in - the request. You may obtain the latest eTag by performing a get operation. Create operation - does not require eTag. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :param parameters: Parameters supplied to the CreateOrUpdate View operation. Is either a View - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.costmanagement.models.View or IO[bytes] - :return: View or the result of cls(response) - :rtype: ~azure.mgmt.costmanagement.models.View - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.View] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "View") - - _request = build_create_or_update_by_scope_request( - scope=scope, - view_name=view_name, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("View", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete_by_scope( # pylint: disable=inconsistent-return-statements - self, scope: str, view_name: str, **kwargs: Any - ) -> None: - """The operation to delete a view. - - .. seealso:: - - https://docs.microsoft.com/en-us/rest/api/costmanagement/ - - :param scope: The scope associated with view operations. This includes - 'subscriptions/{subscriptionId}' for subscription scope, - 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for - Department scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for BillingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for - External Billing Account scope and - 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for - External Subscription scope. Required. - :type scope: str - :param view_name: View name. Required. - :type view_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_by_scope_request( - scope=scope, - view_name=view_name, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/code_report_typespec.json b/sdk/costmanagement/azure-mgmt-costmanagement/code_report_typespec.json new file mode 100644 index 000000000000..659c04f111c7 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/code_report_typespec.json @@ -0,0 +1,60191 @@ +{ + "azure.mgmt.costmanagement": { + "class_nodes": { + "CostManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "HttpResponse", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "generate_detailed_cost_report_operation_status": { + "attr_type": "GenerateDetailedCostReportOperationStatusOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "budgets": { + "attr_type": "BudgetsOperations" + }, + "exports": { + "attr_type": "ExportsOperations" + }, + "generate_detailed_cost_report_operation_results": { + "attr_type": "GenerateDetailedCostReportOperationResultsOperations" + }, + "views": { + "attr_type": "ViewsOperations" + }, + "alerts": { + "attr_type": "AlertsOperations" + }, + "scheduled_actions": { + "attr_type": "ScheduledActionsOperations" + }, + "settings": { + "attr_type": "SettingsOperations" + }, + "generate_cost_details_report": { + "attr_type": "GenerateCostDetailsReportOperations" + }, + "cost_allocation_rules": { + "attr_type": "CostAllocationRulesOperations" + }, + "benefit_recommendations": { + "attr_type": "BenefitRecommendationsOperations" + }, + "benefit_utilization_summaries": { + "attr_type": "BenefitUtilizationSummariesOperations" + }, + "generate_benefit_utilization_summaries_report": { + "attr_type": "GenerateBenefitUtilizationSummariesReportOperations" + }, + "generate_detailed_cost_report": { + "attr_type": "GenerateDetailedCostReportOperations" + }, + "forecast": { + "attr_type": "ForecastOperations" + }, + "dimensions": { + "attr_type": "DimensionsOperations" + }, + "query": { + "attr_type": "QueryOperations" + }, + "generate_reservation_details_report": { + "attr_type": "GenerateReservationDetailsReportOperations" + }, + "price_sheet": { + "attr_type": "PriceSheetOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.aio": { + "class_nodes": { + "CostManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Awaitable[AsyncHttpResponse]", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "generate_detailed_cost_report_operation_status": { + "attr_type": "GenerateDetailedCostReportOperationStatusOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "budgets": { + "attr_type": "BudgetsOperations" + }, + "exports": { + "attr_type": "ExportsOperations" + }, + "generate_detailed_cost_report_operation_results": { + "attr_type": "GenerateDetailedCostReportOperationResultsOperations" + }, + "views": { + "attr_type": "ViewsOperations" + }, + "alerts": { + "attr_type": "AlertsOperations" + }, + "scheduled_actions": { + "attr_type": "ScheduledActionsOperations" + }, + "settings": { + "attr_type": "SettingsOperations" + }, + "generate_cost_details_report": { + "attr_type": "GenerateCostDetailsReportOperations" + }, + "cost_allocation_rules": { + "attr_type": "CostAllocationRulesOperations" + }, + "benefit_recommendations": { + "attr_type": "BenefitRecommendationsOperations" + }, + "benefit_utilization_summaries": { + "attr_type": "BenefitUtilizationSummariesOperations" + }, + "generate_benefit_utilization_summaries_report": { + "attr_type": "GenerateBenefitUtilizationSummariesReportOperations" + }, + "generate_detailed_cost_report": { + "attr_type": "GenerateDetailedCostReportOperations" + }, + "forecast": { + "attr_type": "ForecastOperations" + }, + "dimensions": { + "attr_type": "DimensionsOperations" + }, + "query": { + "attr_type": "QueryOperations" + }, + "generate_reservation_details_report": { + "attr_type": "GenerateReservationDetailsReportOperations" + }, + "price_sheet": { + "attr_type": "PriceSheetOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.aio.operations": { + "class_nodes": { + "AlertsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "dismiss": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Alert", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DismissAlertPayload", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Alert" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Alert" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Alert" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Alert", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AlertsResult", + "overloads": [] + }, + "list_external": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AlertsResult", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitRecommendationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitRecommendationModel]", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitUtilizationSummariesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_order": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + } + }, + "properties": {} + }, + "BudgetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Budget", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Budget", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Budget" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Budget" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Budget" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Budget", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Budget]", + "overloads": [] + } + }, + "properties": {} + }, + "CostAllocationRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "CostAllocationRuleCheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "CostAllocationRuleDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CostAllocationRuleDefinition", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CostAllocationRuleDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "DimensionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "skiptoken": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Dimension]", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "skiptoken": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Dimension]", + "overloads": [] + } + }, + "properties": {} + }, + "ExportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Export", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Export", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Export" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Export" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Export" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "execute": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ExportRunRequest]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "None" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Export", + "overloads": [] + }, + "get_execution_history": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ExportExecutionListResult", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ExportListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ForecastOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "external_cloud_provider_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ForecastResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ForecastResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ForecastResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ForecastResult" + } + ] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Optional[ForecastResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[ForecastResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[ForecastResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[ForecastResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateBenefitUtilizationSummariesReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_generate_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + } + }, + "properties": {} + }, + "GenerateCostDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateCostDetailsReportRequestDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]" + } + ] + }, + "begin_get_operation_results": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CostDetailsOperationResults]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "GenerateDetailedCostReportOperationStatuses", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateDetailedCostReportDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GenerateDetailedCostReportOperationResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateReservationDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatus]", + "overloads": [] + }, + "begin_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatus]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CostManagementOperation]", + "overloads": [] + } + }, + "properties": {} + }, + "PriceSheetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_download_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_period_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatus]", + "overloads": [] + }, + "begin_download_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PricesheetDownloadProperties]", + "overloads": [] + }, + "begin_download_by_invoice": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "invoice_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DownloadURL]", + "overloads": [] + } + }, + "properties": {} + }, + "QueryOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Optional[QueryResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[QueryResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[QueryResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Optional[QueryResult]" + } + ] + }, + "usage_by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "QueryResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "QueryResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "QueryResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "QueryResult" + } + ] + } + }, + "properties": {} + }, + "ScheduledActionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "check_name_availability_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ScheduledAction" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ScheduledAction", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "run": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "run_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "SettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Setting", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "Setting", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Setting" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Setting" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "Setting" + } + ] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Setting", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SettingsListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ViewsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "View" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "View", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.View]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.View]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.models": { + "class_nodes": { + "AccumulatedType": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "INTERNAL": "INTERNAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Alert": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AlertProperties]", + "default": null, + "param_type": "keyword_only" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "e_tag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AlertCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "BILLING": "BILLING", + "COST": "COST", + "SYSTEM": "SYSTEM", + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertCriteria": { + "type": "Enum", + "methods": {}, + "properties": { + "COST_THRESHOLD_EXCEEDED": "COST_THRESHOLD_EXCEEDED", + "CREDIT_THRESHOLD_APPROACHING": "CREDIT_THRESHOLD_APPROACHING", + "CREDIT_THRESHOLD_REACHED": "CREDIT_THRESHOLD_REACHED", + "CROSS_CLOUD_COLLECTION_ERROR": "CROSS_CLOUD_COLLECTION_ERROR", + "CROSS_CLOUD_NEW_DATA_AVAILABLE": "CROSS_CLOUD_NEW_DATA_AVAILABLE", + "FORECAST_COST_THRESHOLD_EXCEEDED": "FORECAST_COST_THRESHOLD_EXCEEDED", + "FORECAST_USAGE_THRESHOLD_EXCEEDED": "FORECAST_USAGE_THRESHOLD_EXCEEDED", + "GENERAL_THRESHOLD_ERROR": "GENERAL_THRESHOLD_ERROR", + "INVOICE_DUE_DATE_APPROACHING": "INVOICE_DUE_DATE_APPROACHING", + "INVOICE_DUE_DATE_REACHED": "INVOICE_DUE_DATE_REACHED", + "MULTI_CURRENCY": "MULTI_CURRENCY", + "QUOTA_THRESHOLD_APPROACHING": "QUOTA_THRESHOLD_APPROACHING", + "QUOTA_THRESHOLD_REACHED": "QUOTA_THRESHOLD_REACHED", + "USAGE_THRESHOLD_EXCEEDED": "USAGE_THRESHOLD_EXCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL_TO": "EQUAL_TO", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL_TO": "GREATER_THAN_OR_EQUAL_TO", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL_TO": "LESS_THAN_OR_EQUAL_TO", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "definition": { + "type": "Optional[_models.AlertPropertiesDefinition]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "source": { + "type": "Optional[Union[str, _models.AlertSource]]", + "default": null, + "param_type": "keyword_only" + }, + "details": { + "type": "Optional[_models.AlertPropertiesDetails]", + "default": null, + "param_type": "keyword_only" + }, + "cost_entity_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[Union[str, _models.AlertStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "creation_time": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "close_time": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "modification_time": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "status_modification_user_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "status_modification_time": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "definition": "Optional", + "description": "Optional", + "source": "Optional", + "details": "Optional", + "cost_entity_id": "Optional", + "status": "Optional", + "creation_time": "Optional", + "close_time": "Optional", + "modification_time": "Optional", + "status_modification_user_name": "Optional", + "status_modification_time": "Optional" + } + }, + "AlertPropertiesDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.AlertType]]", + "default": null, + "param_type": "keyword_only" + }, + "category": { + "type": "Optional[Union[str, _models.AlertCategory]]", + "default": null, + "param_type": "keyword_only" + }, + "criteria": { + "type": "Optional[Union[str, _models.AlertCriteria]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "category": "Optional", + "criteria": "Optional" + } + }, + "AlertPropertiesDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "time_grain_type": { + "type": "Optional[Union[str, _models.AlertTimeGrainType]]", + "default": null, + "param_type": "keyword_only" + }, + "period_start_date": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "triggered_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_group_filter": { + "type": "Optional[list[Any]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_filter": { + "type": "Optional[list[Any]]", + "default": null, + "param_type": "keyword_only" + }, + "meter_filter": { + "type": "Optional[list[Any]]", + "default": null, + "param_type": "keyword_only" + }, + "tag_filter": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + }, + "threshold": { + "type": "Optional[Decimal]", + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "type": "Optional[Union[str, _models.AlertOperator]]", + "default": null, + "param_type": "keyword_only" + }, + "amount": { + "type": "Optional[Decimal]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "current_spend": { + "type": "Optional[Decimal]", + "default": null, + "param_type": "keyword_only" + }, + "contact_emails": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "contact_groups": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "contact_roles": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "overriding_alert": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "department_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "company_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enrollment_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enrollment_start_date": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enrollment_end_date": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "invoicing_threshold": { + "type": "Optional[Decimal]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "time_grain_type": "Optional", + "period_start_date": "Optional", + "triggered_by": "Optional", + "resource_group_filter": "Optional", + "resource_filter": "Optional", + "meter_filter": "Optional", + "tag_filter": "Optional", + "threshold": "Optional", + "operator": "Optional", + "amount": "Optional", + "unit": "Optional", + "current_spend": "Optional", + "contact_emails": "Optional", + "contact_groups": "Optional", + "contact_roles": "Optional", + "overriding_alert": "Optional", + "department_name": "Optional", + "company_name": "Optional", + "enrollment_number": "Optional", + "enrollment_start_date": "Optional", + "enrollment_end_date": "Optional", + "invoicing_threshold": "Optional" + } + }, + "AlertSource": { + "type": "Enum", + "methods": {}, + "properties": { + "PRESET": "PRESET", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "DISMISSED": "DISMISSED", + "NONE": "NONE", + "OVERRIDDEN": "OVERRIDDEN", + "RESOLVED": "RESOLVED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertTimeGrainType": { + "type": "Enum", + "methods": {}, + "properties": { + "ANNUALLY": "ANNUALLY", + "BILLING_ANNUAL": "BILLING_ANNUAL", + "BILLING_MONTH": "BILLING_MONTH", + "BILLING_QUARTER": "BILLING_QUARTER", + "MONTHLY": "MONTHLY", + "NONE": "NONE", + "QUARTERLY": "QUARTERLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertType": { + "type": "Enum", + "methods": {}, + "properties": { + "BUDGET": "BUDGET", + "BUDGET_FORECAST": "BUDGET_FORECAST", + "CREDIT": "CREDIT", + "GENERAL": "GENERAL", + "INVOICE": "INVOICE", + "QUOTA": "QUOTA", + "X_CLOUD": "X_CLOUD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AlertsResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "next_link": "Optional" + } + }, + "AllSavingsBenefitDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "overage_cost": "Optional", + "benefit_cost": "Optional", + "total_cost": "Optional", + "savings_amount": "Optional", + "savings_percentage": "Optional", + "coverage_percentage": "Optional", + "commitment_amount": "Optional", + "average_utilization_percentage": "Optional", + "wastage_cost": "Optional" + } + }, + "AllSavingsList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "next_link": "Optional" + } + }, + "ArmErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "AsyncOperationStatusProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "report_url": { + "type": "Optional[Union[str, _models.BenefitUtilizationSummaryReportSchema]]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_report_url": { + "type": "Optional[Union[str, _models.BenefitUtilizationSummaryReportSchema]]", + "default": null, + "param_type": "keyword_only" + }, + "valid_until": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "report_url": "Optional", + "secondary_report_url": "Optional", + "valid_until": "Optional" + } + }, + "BenefitKind": { + "type": "Enum", + "methods": {}, + "properties": { + "INCLUDED_QUANTITY": "INCLUDED_QUANTITY", + "RESERVATION": "RESERVATION", + "SAVINGS_PLAN": "SAVINGS_PLAN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BenefitRecommendationModel": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.BenefitRecommendationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "BenefitRecommendationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "look_back_period": { + "type": "Optional[Union[str, _models.LookBackPeriod]]", + "default": null, + "param_type": "keyword_only" + }, + "usage": { + "type": "Optional[_models.RecommendationUsageDetails]", + "default": null, + "param_type": "keyword_only" + }, + "term": { + "type": "Optional[Union[str, _models.Term]]", + "default": null, + "param_type": "keyword_only" + }, + "commitment_granularity": { + "type": "Optional[Union[str, _models.Grain]]", + "default": null, + "param_type": "keyword_only" + }, + "recommendation_details": { + "type": "Optional[_models.AllSavingsBenefitDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "first_consumption_date": "Optional", + "last_consumption_date": "Optional", + "look_back_period": "Optional", + "total_hours": "Optional", + "usage": "Optional", + "arm_sku_name": "Optional", + "term": "Optional", + "commitment_granularity": "Optional", + "currency_code": "Optional", + "cost_without_benefit": "Optional", + "recommendation_details": "Optional", + "all_recommendation_details": "Optional", + "scope": null + } + }, + "BenefitResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "kind": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "BenefitUtilizationSummariesOperationStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "Optional[_models.BenefitUtilizationSummariesRequest]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[Union[str, _models.OperationStatusType]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.AsyncOperationStatusProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "input": "Optional", + "status": "Optional", + "properties": "Optional" + } + }, + "BenefitUtilizationSummariesRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "grain": { + "type": "Union[str, _models.Grain]", + "default": null, + "param_type": "keyword_only" + }, + "start_date": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "billing_account_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "billing_profile_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "benefit_order_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "benefit_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "kind": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "billing_account_id": "Optional", + "billing_profile_id": "Optional", + "benefit_order_id": "Optional", + "benefit_id": "Optional", + "grain": "Union", + "start_date": "datetime", + "end_date": "datetime", + "kind": "Optional" + } + }, + "BenefitUtilizationSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "BenefitUtilizationSummaryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "arm_sku_name": "Optional", + "benefit_id": "Optional", + "benefit_order_id": "Optional", + "benefit_type": "Optional", + "usage_date": "Optional" + } + }, + "BenefitUtilizationSummaryReportSchema": { + "type": "Enum", + "methods": {}, + "properties": { + "AVG_UTILIZATION_PERCENTAGE": "AVG_UTILIZATION_PERCENTAGE", + "BENEFIT_ID": "BENEFIT_ID", + "BENEFIT_ORDER_ID": "BENEFIT_ORDER_ID", + "BENEFIT_TYPE": "BENEFIT_TYPE", + "KIND": "KIND", + "MAX_UTILIZATION_PERCENTAGE": "MAX_UTILIZATION_PERCENTAGE", + "MIN_UTILIZATION_PERCENTAGE": "MIN_UTILIZATION_PERCENTAGE", + "USAGE_DATE": "USAGE_DATE", + "UTILIZED_PERCENTAGE": "UTILIZED_PERCENTAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BlobInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "blob_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "byte_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "blob_link": "Optional", + "byte_count": "Optional" + } + }, + "Budget": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.BudgetProperties]", + "default": null, + "param_type": "keyword_only" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "e_tag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "BudgetComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "type": "Union[str, _models.BudgetOperatorType]", + "default": null, + "param_type": "keyword_only" + }, + "values_property": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "operator": "Union", + "values_property": "list" + } + }, + "BudgetFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "type": "Optional[list[_models.BudgetFilterProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "dimensions": { + "type": "Optional[_models.BudgetComparisonExpression]", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[_models.BudgetComparisonExpression]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "and_property": "Optional", + "dimensions": "Optional", + "tags": "Optional" + } + }, + "BudgetFilterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "dimensions": { + "type": "Optional[_models.BudgetComparisonExpression]", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[_models.BudgetComparisonExpression]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "dimensions": "Optional", + "tags": "Optional" + } + }, + "BudgetNotificationOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL_TO": "EQUAL_TO", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL_TO": "GREATER_THAN_OR_EQUAL_TO", + "LESS_THAN": "LESS_THAN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BudgetOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BudgetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "category": { + "type": "Union[str, _models.CategoryType]", + "default": null, + "param_type": "keyword_only" + }, + "time_grain": { + "type": "Union[str, _models.TimeGrainType]", + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "type": "_models.BudgetTimePeriod", + "default": null, + "param_type": "keyword_only" + }, + "amount": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "filter": { + "type": "Optional[_models.BudgetFilter]", + "default": null, + "param_type": "keyword_only" + }, + "notifications": { + "type": "Optional[dict[str, _models.Notification]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "category": "Union", + "amount": "Optional", + "time_grain": "Union", + "time_period": null, + "filter": "Optional", + "current_spend": "Optional", + "notifications": "Optional", + "forecast_spend": "Optional" + } + }, + "BudgetTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "start_date": "datetime", + "end_date": "Optional" + } + }, + "CategoryType": { + "type": "Enum", + "methods": {}, + "properties": { + "COST": "COST", + "RESERVATION_UTILIZATION": "RESERVATION_UTILIZATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ChartType": { + "type": "Enum", + "methods": {}, + "properties": { + "AREA": "AREA", + "GROUPED_COLUMN": "GROUPED_COLUMN", + "LINE": "LINE", + "STACKED_COLUMN": "STACKED_COLUMN", + "TABLE": "TABLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckNameAvailabilityReason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckNameAvailabilityRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "type": "Optional" + } + }, + "CheckNameAvailabilityResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name_available": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "reason": { + "type": "Optional[Union[str, _models.CheckNameAvailabilityReason]]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name_available": "Optional", + "reason": "Optional", + "message": "Optional" + } + }, + "CommonExportProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "delivery_info": { + "type": "_models.ExportDeliveryInfo", + "default": null, + "param_type": "keyword_only" + }, + "definition": { + "type": "_models.ExportDefinition", + "default": null, + "param_type": "keyword_only" + }, + "format": { + "type": "Optional[Union[str, _models.FormatType]]", + "default": null, + "param_type": "keyword_only" + }, + "run_history": { + "type": "Optional[_models.ExportExecutionListResult]", + "default": null, + "param_type": "keyword_only" + }, + "partition_data": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "data_overwrite_behavior": { + "type": "Optional[Union[str, _models.DataOverwriteBehaviorType]]", + "default": null, + "param_type": "keyword_only" + }, + "compression_mode": { + "type": "Optional[Union[str, _models.CompressionModeType]]", + "default": null, + "param_type": "keyword_only" + }, + "export_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "format": "Optional", + "delivery_info": null, + "definition": null, + "run_history": "Optional", + "partition_data": "Optional", + "data_overwrite_behavior": "Optional", + "compression_mode": "Optional", + "export_description": "Optional", + "next_run_time_estimate": "Optional", + "system_suspension_context": "Optional" + } + }, + "CompressionModeType": { + "type": "Enum", + "methods": {}, + "properties": { + "GZIP": "GZIP", + "NONE": "NONE", + "SNAPPY": "SNAPPY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostAllocationPolicyType": { + "type": "Enum", + "methods": {}, + "properties": { + "FIXED_PROPORTION": "FIXED_PROPORTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostAllocationProportion": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "percentage": { + "type": "float", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "percentage": null + } + }, + "CostAllocationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "type": "Union[str, _models.CostAllocationResourceType]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_type": "Union", + "name": null + } + }, + "CostAllocationResourceType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIMENSION": "DIMENSION", + "TAG": "TAG", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostAllocationRuleCheckNameAvailabilityRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "type": "Optional" + } + }, + "CostAllocationRuleCheckNameAvailabilityResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name_available": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "reason": { + "type": "Optional[Union[str, _models.Reason]]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name_available": "Optional", + "reason": "Optional", + "message": "Optional" + } + }, + "CostAllocationRuleDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CostAllocationRuleProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CostAllocationRuleDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_resources": { + "type": "Optional[list[_models.SourceCostAllocationResource]]", + "default": null, + "param_type": "keyword_only" + }, + "target_resources": { + "type": "Optional[list[_models.TargetCostAllocationResource]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "source_resources": "Optional", + "target_resources": "Optional" + } + }, + "CostAllocationRuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "details": { + "type": "_models.CostAllocationRuleDetails", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Union[str, _models.RuleStatus]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "details": null, + "status": "Union", + "created_date": "Optional", + "updated_date": "Optional" + } + }, + "CostDetailsDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "CSV_COST_DETAILS_DATA_FORMAT": "CSV_COST_DETAILS_DATA_FORMAT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostDetailsMetricType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST_COST_DETAILS_METRIC_TYPE": "ACTUAL_COST_COST_DETAILS_METRIC_TYPE", + "AMORTIZED_COST_COST_DETAILS_METRIC_TYPE": "AMORTIZED_COST_COST_DETAILS_METRIC_TYPE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostDetailsOperationResults": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[Union[str, _models.CostDetailsStatusType]]", + "default": null, + "param_type": "keyword_only" + }, + "manifest": { + "type": "Optional[_models.ReportManifest]", + "default": null, + "param_type": "keyword_only" + }, + "valid_till": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "status": "Optional", + "manifest": "Optional", + "valid_till": "Optional", + "error": "Optional" + } + }, + "CostDetailsStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED_COST_DETAILS_STATUS_TYPE": "COMPLETED_COST_DETAILS_STATUS_TYPE", + "FAILED_COST_DETAILS_STATUS_TYPE": "FAILED_COST_DETAILS_STATUS_TYPE", + "NO_DATA_FOUND_COST_DETAILS_STATUS_TYPE": "NO_DATA_FOUND_COST_DETAILS_STATUS_TYPE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CostDetailsTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "start": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "end": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "start": null, + "end": null + } + }, + "CostManagementOperation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "is_data_action": "Optional", + "display": "Optional", + "origin": "Optional", + "action_type": "Optional" + } + }, + "CostManagementProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "e_tag": "Optional" + } + }, + "CostManagementResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "location": "Optional", + "sku": "Optional", + "e_tag": "Optional", + "tags": "Optional" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CultureCode": { + "type": "Enum", + "methods": {}, + "properties": { + "CS_CZ": "CS_CZ", + "DA_DK": "DA_DK", + "DE_DE": "DE_DE", + "EN_GB": "EN_GB", + "EN_US": "EN_US", + "ES_ES": "ES_ES", + "FR_FR": "FR_FR", + "HU_HU": "HU_HU", + "IT_IT": "IT_IT", + "JA_JP": "JA_JP", + "KO_KR": "KO_KR", + "NB_NO": "NB_NO", + "NL_NL": "NL_NL", + "PL_PL": "PL_PL", + "PT_BR": "PT_BR", + "PT_PT": "PT_PT", + "RU_RU": "RU_RU", + "SV_SE": "SV_SE", + "TR_TR": "TR_TR", + "ZH_CN": "ZH_CN", + "ZH_TW": "ZH_TW", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CurrentSpend": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "amount": "Optional", + "unit": "Optional" + } + }, + "DataOverwriteBehaviorType": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATE_NEW_REPORT": "CREATE_NEW_REPORT", + "OVERWRITE_PREVIOUS_REPORT": "OVERWRITE_PREVIOUS_REPORT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DaysOfWeek": { + "type": "Enum", + "methods": {}, + "properties": { + "FRIDAY": "FRIDAY", + "MONDAY": "MONDAY", + "SATURDAY": "SATURDAY", + "SUNDAY": "SUNDAY", + "THURSDAY": "THURSDAY", + "TUESDAY": "TUESDAY", + "WEDNESDAY": "WEDNESDAY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DestinationType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_BLOB": "AZURE_BLOB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Dimension": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DimensionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "location": "Optional", + "sku": "Optional", + "e_tag": "Optional", + "tags": "Optional" + } + }, + "DimensionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "data": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "filter_enabled": "Optional", + "grouping_enabled": "Optional", + "data": "Optional", + "total": "Optional", + "category": "Optional", + "usage_start": "Optional", + "usage_end": "Optional", + "next_link": "Optional" + } + }, + "DismissAlertPayload": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AlertProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "DownloadURL": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "valid_till": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "download_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "expiry_time": "Optional", + "valid_till": "Optional", + "download_url": "Optional" + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "info": "Optional" + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "target": "Optional", + "details": "Optional", + "additional_info": "Optional" + } + }, + "ErrorDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional" + } + }, + "ErrorDetailsWithNestedDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "details": "Optional", + "code": "Optional", + "message": "Optional" + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "ErrorResponseWithNestedDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetailsWithNestedDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "ExecutionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "DATA_NOT_AVAILABLE": "DATA_NOT_AVAILABLE", + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "NEW_DATA_NOT_AVAILABLE": "NEW_DATA_NOT_AVAILABLE", + "QUEUED": "QUEUED", + "TIMEOUT": "TIMEOUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExecutionType": { + "type": "Enum", + "methods": {}, + "properties": { + "ON_DEMAND": "ON_DEMAND", + "SCHEDULED": "SCHEDULED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Export": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ExportProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.SystemAssignedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "location": "Optional", + "e_tag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ExportDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "type": "Optional[Union[str, _models.GranularityType]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration": { + "type": "Optional[_models.ExportDatasetConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "granularity": "Optional", + "configuration": "Optional" + } + }, + "ExportDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "data_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "filters": { + "type": "Optional[list[_models.FilterItems]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "columns": "Optional", + "data_version": "Optional", + "filters": "Optional" + } + }, + "ExportDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ExportType]", + "default": null, + "param_type": "keyword_only" + }, + "timeframe": { + "type": "Union[str, _models.TimeframeType]", + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "type": "Optional[_models.ExportTimePeriod]", + "default": null, + "param_type": "keyword_only" + }, + "data_set": { + "type": "Optional[_models.ExportDataset]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Union", + "timeframe": "Union", + "time_period": "Optional", + "data_set": "Optional" + } + }, + "ExportDeliveryDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.DestinationType]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "root_folder_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sas_token": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "resource_id": "Optional", + "container": null, + "root_folder_path": "Optional", + "sas_token": "Optional", + "storage_account": "Optional" + } + }, + "ExportDeliveryInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "destination": { + "type": "_models.ExportDeliveryDestination", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "destination": null + } + }, + "ExportExecutionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "ExportListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "ExportProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "delivery_info": { + "type": "_models.ExportDeliveryInfo", + "default": null, + "param_type": "keyword_only" + }, + "definition": { + "type": "_models.ExportDefinition", + "default": null, + "param_type": "keyword_only" + }, + "format": { + "type": "Optional[Union[str, _models.FormatType]]", + "default": null, + "param_type": "keyword_only" + }, + "run_history": { + "type": "Optional[_models.ExportExecutionListResult]", + "default": null, + "param_type": "keyword_only" + }, + "partition_data": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "data_overwrite_behavior": { + "type": "Optional[Union[str, _models.DataOverwriteBehaviorType]]", + "default": null, + "param_type": "keyword_only" + }, + "compression_mode": { + "type": "Optional[Union[str, _models.CompressionModeType]]", + "default": null, + "param_type": "keyword_only" + }, + "export_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "schedule": { + "type": "Optional[_models.ExportSchedule]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "delivery_info": { + "type": "_models.ExportDeliveryInfo", + "default": null, + "param_type": "keyword_only" + }, + "definition": { + "type": "_models.ExportDefinition", + "default": null, + "param_type": "keyword_only" + }, + "format": { + "type": "Optional[Union[str, _models.FormatType]]", + "default": null, + "param_type": "keyword_only" + }, + "run_history": { + "type": "Optional[_models.ExportExecutionListResult]", + "default": null, + "param_type": "keyword_only" + }, + "partition_data": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "data_overwrite_behavior": { + "type": "Optional[Union[str, _models.DataOverwriteBehaviorType]]", + "default": null, + "param_type": "keyword_only" + }, + "compression_mode": { + "type": "Optional[Union[str, _models.CompressionModeType]]", + "default": null, + "param_type": "keyword_only" + }, + "export_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "schedule": "Optional", + "format": "Optional", + "delivery_info": null, + "definition": null, + "run_history": "Optional", + "partition_data": "Optional", + "data_overwrite_behavior": "Optional", + "compression_mode": "Optional", + "export_description": "Optional", + "next_run_time_estimate": "Optional", + "system_suspension_context": "Optional" + } + }, + "ExportRecurrencePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "to": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "from_property": "datetime", + "to": "Optional" + } + }, + "ExportRun": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ExportRunProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "e_tag": "Optional" + } + }, + "ExportRunProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "execution_type": { + "type": "Optional[Union[str, _models.ExecutionType]]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[Union[str, _models.ExecutionStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "submitted_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "submitted_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "processing_start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "processing_end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "start_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "file_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "manifest_file": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "run_settings": { + "type": "Optional[_models.CommonExportProperties]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "execution_type": "Optional", + "status": "Optional", + "submitted_by": "Optional", + "submitted_time": "Optional", + "processing_start_time": "Optional", + "processing_end_time": "Optional", + "start_date": "Optional", + "end_date": "Optional", + "file_name": "Optional", + "manifest_file": "Optional", + "run_settings": "Optional", + "error": "Optional" + } + }, + "ExportRunRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "time_period": { + "type": "Optional[_models.ExportTimePeriod]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "time_period": "Optional" + } + }, + "ExportSchedule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Optional[Union[str, _models.StatusType]]", + "default": null, + "param_type": "keyword_only" + }, + "recurrence": { + "type": "Optional[Union[str, _models.RecurrenceType]]", + "default": null, + "param_type": "keyword_only" + }, + "recurrence_period": { + "type": "Optional[_models.ExportRecurrencePeriod]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "status": "Optional", + "recurrence": "Optional", + "recurrence_period": "Optional" + } + }, + "ExportSuspensionContext": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "suspension_code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "suspension_reason": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "suspension_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "suspension_code": "Optional", + "suspension_reason": "Optional", + "suspension_time": "Optional" + } + }, + "ExportTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "to": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "from_property": "datetime", + "to": "datetime" + } + }, + "ExportType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AMORTIZED_COST": "AMORTIZED_COST", + "FOCUS_COST": "FOCUS_COST", + "PRICE_SHEET": "PRICE_SHEET", + "RESERVATION_DETAILS": "RESERVATION_DETAILS", + "RESERVATION_RECOMMENDATIONS": "RESERVATION_RECOMMENDATIONS", + "RESERVATION_TRANSACTIONS": "RESERVATION_TRANSACTIONS", + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExtensionResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ExternalCloudProviderType": { + "type": "Enum", + "methods": {}, + "properties": { + "EXTERNAL_BILLING_ACCOUNTS": "EXTERNAL_BILLING_ACCOUNTS", + "EXTERNAL_SUBSCRIPTIONS": "EXTERNAL_SUBSCRIPTIONS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FileDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "file_formats": { + "type": "Optional[list[Union[str, _models.FileFormat]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "file_formats": "Optional" + } + }, + "FileFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "CSV": "CSV", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FilterItemNames": { + "type": "Enum", + "methods": {}, + "properties": { + "LOOK_BACK_PERIOD": "LOOK_BACK_PERIOD", + "RESERVATION_SCOPE": "RESERVATION_SCOPE", + "RESOURCE_TYPE": "RESOURCE_TYPE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FilterItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[Union[str, _models.FilterItemNames]]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "value": "Optional" + } + }, + "ForecastAggregation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Union[str, _models.FunctionName]", + "default": null, + "param_type": "keyword_only" + }, + "function": { + "type": "Union[str, _models.FunctionType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Union", + "function": "Union" + } + }, + "ForecastColumn": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "type": "Optional" + } + }, + "ForecastComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "type": "Union[str, _models.ForecastOperatorType]", + "default": null, + "param_type": "keyword_only" + }, + "values_property": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "operator": "Union", + "values_property": "list" + } + }, + "ForecastDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "aggregation": { + "type": "dict[str, _models.ForecastAggregation]", + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "type": "Optional[Union[str, _models.GranularityType]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration": { + "type": "Optional[_models.ForecastDatasetConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "filter": { + "type": "Optional[_models.ForecastFilter]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "granularity": "Optional", + "configuration": "Optional", + "aggregation": "dict", + "filter": "Optional" + } + }, + "ForecastDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "columns": "Optional" + } + }, + "ForecastDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ForecastType]", + "default": null, + "param_type": "keyword_only" + }, + "timeframe": { + "type": "Union[str, _models.ForecastTimeframe]", + "default": null, + "param_type": "keyword_only" + }, + "dataset": { + "type": "_models.ForecastDataset", + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "type": "Optional[_models.ForecastTimePeriod]", + "default": null, + "param_type": "keyword_only" + }, + "include_actual_cost": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "include_fresh_partial_cost": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Union", + "timeframe": "Union", + "time_period": "Optional", + "dataset": null, + "include_actual_cost": "Optional", + "include_fresh_partial_cost": "Optional" + } + }, + "ForecastFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "type": "Optional[list[_models.ForecastFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "or_property": { + "type": "Optional[list[_models.ForecastFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "dimensions": { + "type": "Optional[_models.ForecastComparisonExpression]", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[_models.ForecastComparisonExpression]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "and_property": "Optional", + "or_property": "Optional", + "dimensions": "Optional", + "tags": "Optional" + } + }, + "ForecastOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ForecastProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "columns": { + "type": "Optional[list[_models.ForecastColumn]]", + "default": null, + "param_type": "keyword_only" + }, + "rows": { + "type": "Optional[list[list[Any]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "next_link": "Optional", + "columns": "Optional", + "rows": "Optional" + } + }, + "ForecastResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ForecastProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "location": "Optional", + "sku": "Optional", + "e_tag": "Optional", + "tags": "Optional" + } + }, + "ForecastSpend": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "amount": "Optional", + "unit": "Optional" + } + }, + "ForecastTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "to": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "from_property": "datetime", + "to": "datetime" + } + }, + "ForecastTimeframe": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM": "CUSTOM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ForecastType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AMORTIZED_COST": "AMORTIZED_COST", + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FormatType": { + "type": "Enum", + "methods": {}, + "properties": { + "CSV": "CSV", + "PARQUET": "PARQUET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Frequency": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "WEEKLY": "WEEKLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FunctionName": { + "type": "Enum", + "methods": {}, + "properties": { + "COST": "COST", + "COST_USD": "COST_USD", + "PRE_TAX_COST": "PRE_TAX_COST", + "PRE_TAX_COST_USD": "PRE_TAX_COST_USD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FunctionType": { + "type": "Enum", + "methods": {}, + "properties": { + "SUM": "SUM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GenerateCostDetailsReportErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "GenerateCostDetailsReportRequestDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "type": "Optional[Union[str, _models.CostDetailsMetricType]]", + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "type": "Optional[_models.CostDetailsTimePeriod]", + "default": null, + "param_type": "keyword_only" + }, + "billing_period": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "invoice_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "metric": "Optional", + "time_period": "Optional", + "billing_period": "Optional", + "invoice_id": "Optional" + } + }, + "GenerateDetailedCostReportDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "type": "Optional[Union[str, _models.GenerateDetailedCostReportMetricType]]", + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "type": "Optional[_models.GenerateDetailedCostReportTimePeriod]", + "default": null, + "param_type": "keyword_only" + }, + "billing_period": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "invoice_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "customer_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "metric": "Optional", + "time_period": "Optional", + "billing_period": "Optional", + "invoice_id": "Optional", + "customer_id": "Optional" + } + }, + "GenerateDetailedCostReportErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "GenerateDetailedCostReportMetricType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AMORTIZED_COST": "AMORTIZED_COST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GenerateDetailedCostReportOperationResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DownloadURL]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GenerateDetailedCostReportOperationStatuses": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DownloadURL]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[_models.Status]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "status": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "error": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "GenerateDetailedCostReportTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "start": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "end": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "start": null, + "end": null + } + }, + "Grain": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "HOURLY": "HOURLY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GrainParameter": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "HOURLY": "HOURLY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GranularityType": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IncludedQuantityUtilizationSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IncludedQuantityUtilizationSummaryProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IncludedQuantityUtilizationSummaryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "utilization_percentage": "Optional", + "arm_sku_name": "Optional", + "benefit_id": "Optional", + "benefit_order_id": "Optional", + "benefit_type": "Optional", + "usage_date": "Optional" + } + }, + "KpiProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.KpiTypeType]]", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "id": "Optional", + "enabled": "Optional" + } + }, + "KpiTypeType": { + "type": "Enum", + "methods": {}, + "properties": { + "BUDGET": "BUDGET", + "FORECAST": "FORECAST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LookBackPeriod": { + "type": "Enum", + "methods": {}, + "properties": { + "LAST30_DAYS": "LAST30_DAYS", + "LAST60_DAYS": "LAST60_DAYS", + "LAST7_DAYS": "LAST7_DAYS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MCAPriceSheetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "billing_account_id": "Optional", + "billing_account_name": "Optional", + "billing_profile_id": "Optional", + "billing_profile_name": "Optional", + "product_order_name": "Optional", + "service_family": "Optional", + "product": "Optional", + "product_id": "Optional", + "sku_id": "Optional", + "unit_of_measure": "Optional", + "meter_id": "Optional", + "meter_name": "Optional", + "meter_type": "Optional", + "meter_category": "Optional", + "meter_sub_category": "Optional", + "meter_region": "Optional", + "tier_minimum_units": "Optional", + "effective_start_date": "Optional", + "effective_end_date": "Optional", + "unit_price": "Optional", + "base_price": "Optional", + "market_price": "Optional", + "currency": "Optional", + "billing_currency": "Optional", + "term": "Optional", + "price_type": "Optional" + } + }, + "MetricType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL_COST": "ACTUAL_COST", + "AHUB": "AHUB", + "AMORTIZED_COST": "AMORTIZED_COST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Notification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "type": "Union[str, _models.BudgetNotificationOperatorType]", + "default": null, + "param_type": "keyword_only" + }, + "threshold": { + "type": "float", + "default": null, + "param_type": "keyword_only" + }, + "contact_emails": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "frequency": { + "type": "Optional[Union[str, _models.Frequency]]", + "default": null, + "param_type": "keyword_only" + }, + "contact_roles": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "contact_groups": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "threshold_type": { + "type": "Optional[Union[str, _models.ThresholdType]]", + "default": null, + "param_type": "keyword_only" + }, + "locale": { + "type": "Optional[Union[str, _models.CultureCode]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "enabled": null, + "operator": "Union", + "threshold": null, + "frequency": "Optional", + "contact_emails": "list", + "contact_roles": "Optional", + "contact_groups": "Optional", + "threshold_type": "Optional", + "locale": "Optional" + } + }, + "NotificationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "to": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "subject": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "language": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "regional_format": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "to": "list", + "language": "Optional", + "message": "Optional", + "regional_format": "Optional", + "subject": null + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "is_data_action": "Optional", + "display": "Optional", + "origin": "Optional", + "action_type": "Optional" + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "resource": "Optional", + "operation": "Optional", + "description": "Optional" + } + }, + "OperationStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Optional[Union[str, _models.OperationStatusType]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ReportURL]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "status": "Optional", + "properties": "Optional" + } + }, + "OperationStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "RUNNING": "RUNNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTAINS": "CONTAINS", + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Origin": { + "type": "Enum", + "methods": {}, + "properties": { + "SYSTEM": "SYSTEM", + "USER": "USER", + "USER_SYSTEM": "USER_SYSTEM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PivotProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.PivotTypeType]]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "name": "Optional" + } + }, + "PivotTypeType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIMENSION": "DIMENSION", + "TAG_KEY": "TAG_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PricesheetDownloadProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "download_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "download_file_properties": { + "type": "Optional[_models.MCAPriceSheetProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "expiry_time": "Optional", + "download_url": "Optional", + "download_file_properties": "Optional" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "QueryAggregation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "function": { + "type": "Union[str, _models.FunctionType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "function": "Union" + } + }, + "QueryColumn": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "type": "Optional" + } + }, + "QueryColumnType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIMENSION": "DIMENSION", + "TAG_KEY": "TAG_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "type": "Union[str, _models.QueryOperatorType]", + "default": null, + "param_type": "keyword_only" + }, + "values_property": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "operator": "Union", + "values_property": "list" + } + }, + "QueryDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "type": "Optional[Union[str, _models.GranularityType]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration": { + "type": "Optional[_models.QueryDatasetConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "aggregation": { + "type": "Optional[dict[str, _models.QueryAggregation]]", + "default": null, + "param_type": "keyword_only" + }, + "grouping": { + "type": "Optional[list[_models.QueryGrouping]]", + "default": null, + "param_type": "keyword_only" + }, + "filter": { + "type": "Optional[_models.QueryFilter]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "granularity": "Optional", + "configuration": "Optional", + "aggregation": "Optional", + "grouping": "Optional", + "filter": "Optional" + } + }, + "QueryDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "columns": "Optional" + } + }, + "QueryDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ExportType]", + "default": null, + "param_type": "keyword_only" + }, + "timeframe": { + "type": "Union[str, _models.TimeframeType]", + "default": null, + "param_type": "keyword_only" + }, + "dataset": { + "type": "_models.QueryDataset", + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "type": "Optional[_models.QueryTimePeriod]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Union", + "timeframe": "Union", + "time_period": "Optional", + "dataset": null + } + }, + "QueryFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "type": "Optional[list[_models.QueryFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "or_property": { + "type": "Optional[list[_models.QueryFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "dimensions": { + "type": "Optional[_models.QueryComparisonExpression]", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[_models.QueryComparisonExpression]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "and_property": "Optional", + "or_property": "Optional", + "dimensions": "Optional", + "tags": "Optional" + } + }, + "QueryGrouping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.QueryColumnType]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Union", + "name": null + } + }, + "QueryOperatorType": { + "type": "Enum", + "methods": {}, + "properties": { + "IN": "IN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "columns": { + "type": "Optional[list[_models.QueryColumn]]", + "default": null, + "param_type": "keyword_only" + }, + "rows": { + "type": "Optional[list[list[Any]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "next_link": "Optional", + "columns": "Optional", + "rows": "Optional" + } + }, + "QueryResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.QueryProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "location": "Optional", + "sku": "Optional", + "e_tag": "Optional", + "tags": "Optional" + } + }, + "QueryTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "to": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "from_property": "datetime", + "to": "datetime" + } + }, + "Reason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "VALID": "VALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RecommendationUsageDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "usage_grain": { + "type": "Optional[Union[str, _models.Grain]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "usage_grain": "Optional", + "charges": "Optional" + } + }, + "RecurrenceType": { + "type": "Enum", + "methods": {}, + "properties": { + "ANNUALLY": "ANNUALLY", + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "WEEKLY": "WEEKLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportConfigAggregation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "function": { + "type": "Union[str, _models.FunctionType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "function": "Union" + } + }, + "ReportConfigComparisonExpression": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "type": "Union[str, _models.OperatorType]", + "default": null, + "param_type": "keyword_only" + }, + "values_property": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "operator": "Union", + "values_property": "list" + } + }, + "ReportConfigDataset": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "type": "Optional[Union[str, _models.ReportGranularityType]]", + "default": null, + "param_type": "keyword_only" + }, + "configuration": { + "type": "Optional[_models.ReportConfigDatasetConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "aggregation": { + "type": "Optional[dict[str, _models.ReportConfigAggregation]]", + "default": null, + "param_type": "keyword_only" + }, + "grouping": { + "type": "Optional[list[_models.ReportConfigGrouping]]", + "default": null, + "param_type": "keyword_only" + }, + "sorting": { + "type": "Optional[list[_models.ReportConfigSorting]]", + "default": null, + "param_type": "keyword_only" + }, + "filter": { + "type": "Optional[_models.ReportConfigFilter]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "granularity": "Optional", + "configuration": "Optional", + "aggregation": "Optional", + "grouping": "Optional", + "sorting": "Optional", + "filter": "Optional" + } + }, + "ReportConfigDatasetConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "columns": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "columns": "Optional" + } + }, + "ReportConfigDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ReportType]", + "default": null, + "param_type": "keyword_only" + }, + "timeframe": { + "type": "Union[str, _models.ReportTimeframeType]", + "default": null, + "param_type": "keyword_only" + }, + "time_period": { + "type": "Optional[_models.ReportConfigTimePeriod]", + "default": null, + "param_type": "keyword_only" + }, + "data_set": { + "type": "Optional[_models.ReportConfigDataset]", + "default": null, + "param_type": "keyword_only" + }, + "include_monetary_commitment": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Union", + "timeframe": "Union", + "time_period": "Optional", + "data_set": "Optional", + "include_monetary_commitment": "Optional" + } + }, + "ReportConfigFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "and_property": { + "type": "Optional[list[_models.ReportConfigFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "or_property": { + "type": "Optional[list[_models.ReportConfigFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "dimensions": { + "type": "Optional[_models.ReportConfigComparisonExpression]", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[_models.ReportConfigComparisonExpression]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "and_property": "Optional", + "or_property": "Optional", + "dimensions": "Optional", + "tags": "Optional" + } + }, + "ReportConfigGrouping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.QueryColumnType]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Union", + "name": null + } + }, + "ReportConfigSorting": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "direction": { + "type": "Optional[Union[str, _models.ReportConfigSortingType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "direction": "Optional", + "name": null + } + }, + "ReportConfigSortingType": { + "type": "Enum", + "methods": {}, + "properties": { + "ASCENDING": "ASCENDING", + "DESCENDING": "DESCENDING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportConfigTimePeriod": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "from_property": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "to": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "from_property": "datetime", + "to": "datetime" + } + }, + "ReportGranularityType": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportManifest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "manifest_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "data_format": { + "type": "Optional[Union[str, _models.CostDetailsDataFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "byte_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "blob_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "compress_data": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "request_context": { + "type": "Optional[_models.RequestContext]", + "default": null, + "param_type": "keyword_only" + }, + "blobs": { + "type": "Optional[list[_models.BlobInfo]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "manifest_version": "Optional", + "data_format": "Optional", + "byte_count": "Optional", + "blob_count": "Optional", + "compress_data": "Optional", + "request_context": "Optional", + "blobs": "Optional" + } + }, + "ReportOperationStatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETED": "COMPLETED", + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "NO_DATA_FOUND": "NO_DATA_FOUND", + "QUEUED": "QUEUED", + "READY_TO_DOWNLOAD": "READY_TO_DOWNLOAD", + "TIMED_OUT": "TIMED_OUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportTimeframeType": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM": "CUSTOM", + "MONTH_TO_DATE": "MONTH_TO_DATE", + "WEEK_TO_DATE": "WEEK_TO_DATE", + "YEAR_TO_DATE": "YEAR_TO_DATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportType": { + "type": "Enum", + "methods": {}, + "properties": { + "USAGE": "USAGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReportURL": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "report_url": { + "type": "Optional[Union[str, _models.ReservationReportSchema]]", + "default": null, + "param_type": "keyword_only" + }, + "valid_until": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "report_url": "Optional", + "valid_until": "Optional" + } + }, + "RequestContext": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "request_scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request_body": { + "type": "Optional[_models.GenerateCostDetailsReportRequestDefinition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "request_scope": "Optional", + "request_body": "Optional" + } + }, + "ReservationReportSchema": { + "type": "Enum", + "methods": {}, + "properties": { + "INSTANCE_FLEXIBILITY_GROUP": "INSTANCE_FLEXIBILITY_GROUP", + "INSTANCE_FLEXIBILITY_RATIO": "INSTANCE_FLEXIBILITY_RATIO", + "INSTANCE_ID": "INSTANCE_ID", + "KIND": "KIND", + "RESERVATION_ID": "RESERVATION_ID", + "RESERVATION_ORDER_ID": "RESERVATION_ORDER_ID", + "RESERVED_HOURS": "RESERVED_HOURS", + "SKU_NAME": "SKU_NAME", + "TOTAL_RESERVED_QUANTITY": "TOTAL_RESERVED_QUANTITY", + "USAGE_DATE": "USAGE_DATE", + "USED_HOURS": "USED_HOURS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RuleStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "NOT_ACTIVE": "NOT_ACTIVE", + "PROCESSING": "PROCESSING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SavingsPlanUtilizationSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SavingsPlanUtilizationSummaryProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "SavingsPlanUtilizationSummaryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_type": { + "type": "Optional[Union[str, _models.BenefitKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "avg_utilization_percentage": "Optional", + "min_utilization_percentage": "Optional", + "max_utilization_percentage": "Optional", + "arm_sku_name": "Optional", + "benefit_id": "Optional", + "benefit_order_id": "Optional", + "benefit_type": "Optional", + "usage_date": "Optional" + } + }, + "ScheduleFrequency": { + "type": "Enum", + "methods": {}, + "properties": { + "DAILY": "DAILY", + "MONTHLY": "MONTHLY", + "WEEKLY": "WEEKLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScheduleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "frequency": { + "type": "Union[str, _models.ScheduleFrequency]", + "default": null, + "param_type": "keyword_only" + }, + "start_date": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "hour_of_day": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "days_of_week": { + "type": "Optional[list[Union[str, _models.DaysOfWeek]]]", + "default": null, + "param_type": "keyword_only" + }, + "weeks_of_month": { + "type": "Optional[list[Union[str, _models.WeeksOfMonth]]]", + "default": null, + "param_type": "keyword_only" + }, + "day_of_month": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "frequency": "Union", + "hour_of_day": "Optional", + "days_of_week": "Optional", + "weeks_of_month": "Optional", + "day_of_month": "Optional", + "start_date": "datetime", + "end_date": "datetime" + } + }, + "ScheduledAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ScheduledActionProperties]", + "default": null, + "param_type": "keyword_only" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "kind": { + "type": "Optional[Union[str, _models.ScheduledActionKind]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "e_tag": "Optional", + "kind": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ScheduledActionKind": { + "type": "Enum", + "methods": {}, + "properties": { + "EMAIL": "EMAIL", + "INSIGHT_ALERT": "INSIGHT_ALERT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScheduledActionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "notification": { + "type": "_models.NotificationProperties", + "default": null, + "param_type": "keyword_only" + }, + "schedule": { + "type": "_models.ScheduleProperties", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Union[str, _models.ScheduledActionStatus]", + "default": null, + "param_type": "keyword_only" + }, + "view_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "file_destination": { + "type": "Optional[_models.FileDestination]", + "default": null, + "param_type": "keyword_only" + }, + "notification_email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "display_name": null, + "file_destination": "Optional", + "notification": null, + "notification_email": "Optional", + "schedule": null, + "scope": "Optional", + "status": "Union", + "view_id": null + } + }, + "ScheduledActionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "EXPIRED": "EXPIRED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Scope": { + "type": "Enum", + "methods": {}, + "properties": { + "SHARED": "SHARED", + "SINGLE": "SINGLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Setting": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "SettingType": { + "type": "Enum", + "methods": {}, + "properties": { + "TAGINHERITANCE": "TAGINHERITANCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SettingsKind": { + "type": "Enum", + "methods": {}, + "properties": { + "TAGINHERITANCE": "TAGINHERITANCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SettingsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "SharedScopeBenefitRecommendationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "look_back_period": { + "type": "Optional[Union[str, _models.LookBackPeriod]]", + "default": null, + "param_type": "keyword_only" + }, + "usage": { + "type": "Optional[_models.RecommendationUsageDetails]", + "default": null, + "param_type": "keyword_only" + }, + "term": { + "type": "Optional[Union[str, _models.Term]]", + "default": null, + "param_type": "keyword_only" + }, + "commitment_granularity": { + "type": "Optional[Union[str, _models.Grain]]", + "default": null, + "param_type": "keyword_only" + }, + "recommendation_details": { + "type": "Optional[_models.AllSavingsBenefitDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "look_back_period": { + "type": "Optional[Union[str, _models.LookBackPeriod]]", + "default": null, + "param_type": "keyword_only" + }, + "usage": { + "type": "Optional[_models.RecommendationUsageDetails]", + "default": null, + "param_type": "keyword_only" + }, + "term": { + "type": "Optional[Union[str, _models.Term]]", + "default": null, + "param_type": "keyword_only" + }, + "commitment_granularity": { + "type": "Optional[Union[str, _models.Grain]]", + "default": null, + "param_type": "keyword_only" + }, + "recommendation_details": { + "type": "Optional[_models.AllSavingsBenefitDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "scope": null, + "first_consumption_date": "Optional", + "last_consumption_date": "Optional", + "look_back_period": "Optional", + "total_hours": "Optional", + "usage": "Optional", + "arm_sku_name": "Optional", + "term": "Optional", + "commitment_granularity": "Optional", + "currency_code": "Optional", + "cost_without_benefit": "Optional", + "recommendation_details": "Optional", + "all_recommendation_details": "Optional" + } + }, + "SingleScopeBenefitRecommendationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "look_back_period": { + "type": "Optional[Union[str, _models.LookBackPeriod]]", + "default": null, + "param_type": "keyword_only" + }, + "usage": { + "type": "Optional[_models.RecommendationUsageDetails]", + "default": null, + "param_type": "keyword_only" + }, + "term": { + "type": "Optional[Union[str, _models.Term]]", + "default": null, + "param_type": "keyword_only" + }, + "commitment_granularity": { + "type": "Optional[Union[str, _models.Grain]]", + "default": null, + "param_type": "keyword_only" + }, + "recommendation_details": { + "type": "Optional[_models.AllSavingsBenefitDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "look_back_period": { + "type": "Optional[Union[str, _models.LookBackPeriod]]", + "default": null, + "param_type": "keyword_only" + }, + "usage": { + "type": "Optional[_models.RecommendationUsageDetails]", + "default": null, + "param_type": "keyword_only" + }, + "term": { + "type": "Optional[Union[str, _models.Term]]", + "default": null, + "param_type": "keyword_only" + }, + "commitment_granularity": { + "type": "Optional[Union[str, _models.Grain]]", + "default": null, + "param_type": "keyword_only" + }, + "recommendation_details": { + "type": "Optional[_models.AllSavingsBenefitDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "subscription_id": "Optional", + "resource_group": "Optional", + "scope": null, + "first_consumption_date": "Optional", + "last_consumption_date": "Optional", + "look_back_period": "Optional", + "total_hours": "Optional", + "usage": "Optional", + "arm_sku_name": "Optional", + "term": "Optional", + "commitment_granularity": "Optional", + "currency_code": "Optional", + "cost_without_benefit": "Optional", + "recommendation_details": "Optional", + "all_recommendation_details": "Optional" + } + }, + "SourceCostAllocationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "type": "Union[str, _models.CostAllocationResourceType]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "values_property": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "type": "Union[str, _models.CostAllocationResourceType]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "values_property": "list", + "resource_type": "Union", + "name": null + } + }, + "Status": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Optional[Union[str, _models.ReportOperationStatusType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "status": "Optional" + } + }, + "StatusType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "INACTIVE": "INACTIVE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SystemAssignedServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.SystemAssignedServiceIdentityType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "tenant_id": "Optional", + "type": "Union" + } + }, + "SystemAssignedServiceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "created_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "created_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "created_by": "Optional", + "created_by_type": "Optional", + "created_at": "Optional", + "last_modified_by": "Optional", + "last_modified_by_type": "Optional", + "last_modified_at": "Optional" + } + }, + "TagInheritanceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefer_container_tags": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefer_container_tags": null + } + }, + "TagInheritanceSetting": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.TagInheritanceProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TargetCostAllocationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "type": "Union[str, _models.CostAllocationResourceType]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "values_property": { + "type": "list[_models.CostAllocationProportion]", + "default": null, + "param_type": "keyword_only" + }, + "policy_type": { + "type": "Union[str, _models.CostAllocationPolicyType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "type": "Union[str, _models.CostAllocationResourceType]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "values_property": "list", + "policy_type": "Union", + "resource_type": "Union", + "name": null + } + }, + "Term": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_Y": "P1_Y", + "P3_Y": "P3_Y", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ThresholdType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTUAL": "ACTUAL", + "FORECASTED": "FORECASTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TimeGrainType": { + "type": "Enum", + "methods": {}, + "properties": { + "ANNUALLY": "ANNUALLY", + "BILLING_ANNUAL": "BILLING_ANNUAL", + "BILLING_MONTH": "BILLING_MONTH", + "BILLING_QUARTER": "BILLING_QUARTER", + "LAST30_DAYS": "LAST30_DAYS", + "LAST7_DAYS": "LAST7_DAYS", + "MONTHLY": "MONTHLY", + "QUARTERLY": "QUARTERLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TimeframeType": { + "type": "Enum", + "methods": {}, + "properties": { + "BILLING_MONTH_TO_DATE": "BILLING_MONTH_TO_DATE", + "CUSTOM": "CUSTOM", + "MONTH_TO_DATE": "MONTH_TO_DATE", + "THE_CURRENT_MONTH": "THE_CURRENT_MONTH", + "THE_LAST_BILLING_MONTH": "THE_LAST_BILLING_MONTH", + "THE_LAST_MONTH": "THE_LAST_MONTH", + "WEEK_TO_DATE": "WEEK_TO_DATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "View": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ViewProperties]", + "default": null, + "param_type": "keyword_only" + }, + "e_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "e_tag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ViewProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "modified_on": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "date_range": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "query": { + "type": "Optional[_models.ReportConfigDefinition]", + "default": null, + "param_type": "keyword_only" + }, + "chart": { + "type": "Optional[Union[str, _models.ChartType]]", + "default": null, + "param_type": "keyword_only" + }, + "accumulated": { + "type": "Optional[Union[str, _models.AccumulatedType]]", + "default": null, + "param_type": "keyword_only" + }, + "metric": { + "type": "Optional[Union[str, _models.MetricType]]", + "default": null, + "param_type": "keyword_only" + }, + "kpis": { + "type": "Optional[list[_models.KpiProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "pivots": { + "type": "Optional[list[_models.PivotProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "display_name": "Optional", + "scope": "Optional", + "created_on": "Optional", + "modified_on": "Optional", + "date_range": "Optional", + "currency": "Optional", + "query": "Optional", + "chart": "Optional", + "accumulated": "Optional", + "metric": "Optional", + "kpis": "Optional", + "pivots": "Optional" + } + }, + "WeeksOfMonth": { + "type": "Enum", + "methods": {}, + "properties": { + "FIRST": "FIRST", + "FOURTH": "FOURTH", + "LAST": "LAST", + "SECOND": "SECOND", + "THIRD": "THIRD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.costmanagement.operations": { + "class_nodes": { + "AlertsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "dismiss": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Alert", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DismissAlertPayload", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Alert" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Alert" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Alert" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "alert_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Alert", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AlertsResult", + "overloads": [] + }, + "list_external": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AlertsResult", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitRecommendationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "orderby": { + "default": "none", + "param_type": "keyword_only" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitRecommendationModel]", + "overloads": [] + } + }, + "properties": {} + }, + "BenefitUtilizationSummariesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + }, + "list_by_savings_plan_order": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "grain_parameter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.BenefitUtilizationSummary]", + "overloads": [] + } + }, + "properties": {} + }, + "BudgetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Budget", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Budget", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Budget" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Budget" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Budget" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "budget_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Budget", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Budget]", + "overloads": [] + } + }, + "properties": {} + }, + "CostAllocationRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "CostAllocationRuleCheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule_check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleCheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "CostAllocationRuleDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cost_allocation_rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CostAllocationRuleDefinition", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CostAllocationRuleDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "DimensionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "skiptoken": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Dimension]", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "skiptoken": { + "default": "none", + "param_type": "keyword_only" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Dimension]", + "overloads": [] + } + }, + "properties": {} + }, + "ExportsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Export", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Export", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Export" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Export" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Export" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "execute": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[ExportRunRequest]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Export", + "overloads": [] + }, + "get_execution_history": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ExportExecutionListResult", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ExportListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ForecastOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "external_cloud_provider_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ForecastResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ForecastResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ForecastResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ForecastResult" + } + ] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Optional[ForecastResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ForecastDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[ForecastResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[ForecastResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[ForecastResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateBenefitUtilizationSummariesReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_generate_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_reservation_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reservation_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + }, + "begin_generate_by_savings_plan_order_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "BenefitUtilizationSummariesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "savings_plan_order_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "benefit_utilization_summaries_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[BenefitUtilizationSummariesOperationStatus]" + } + ] + } + }, + "properties": {} + }, + "GenerateCostDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateCostDetailsReportRequestDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]" + } + ] + }, + "begin_get_operation_results": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CostDetailsOperationResults]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperationStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "GenerateDetailedCostReportOperationStatuses", + "overloads": [] + } + }, + "properties": {} + }, + "GenerateDetailedCostReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_operation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "GenerateDetailedCostReportDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[GenerateDetailedCostReportOperationResult]" + } + ] + } + }, + "properties": {} + }, + "GenerateReservationDetailsReportOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_by_billing_account_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatus]", + "overloads": [] + }, + "begin_by_billing_profile_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_date": { + "default": null, + "param_type": "keyword_only" + }, + "end_date": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatus]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CostManagementOperation]", + "overloads": [] + } + }, + "properties": {} + }, + "PriceSheetOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_download_by_billing_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_period_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatus]", + "overloads": [] + }, + "begin_download_by_billing_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[PricesheetDownloadProperties]", + "overloads": [] + }, + "begin_download_by_invoice": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "billing_profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "invoice_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DownloadURL]", + "overloads": [] + } + }, + "properties": {} + }, + "QueryOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Optional[QueryResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[QueryResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[QueryResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Optional[QueryResult]" + } + ] + }, + "usage_by_external_cloud_provider_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "QueryResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "QueryDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "QueryResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "QueryResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_type": { + "type": "Union[str, ExternalCloudProviderType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_cloud_provider_id": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "QueryResult" + } + ] + } + }, + "properties": {} + }, + "ScheduledActionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "check_name_availability_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "CheckNameAvailabilityRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityResponse" + } + ] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "ScheduledAction", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "scheduled_action": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ScheduledAction" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ScheduledAction", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ScheduledAction]", + "overloads": [] + }, + "run": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "run_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "SettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Setting", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "Setting", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Setting" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Setting" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, SettingType]", + "default": null, + "param_type": "positional_or_keyword" + }, + "setting": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "Setting" + } + ] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Setting", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SettingsListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ViewsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + } + ] + }, + "create_or_update_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "View", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "View" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "delete_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [] + }, + "get_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "view_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "View", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.View]", + "overloads": [] + }, + "list_by_scope": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scope": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.View]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py index 612c58597644..ec8b3883e61b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_recommendations_by_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitRecommendationsByBillingAccount.json +# x-ms-original-file: 2025-03-01/BenefitRecommendationsByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py index 92e00f98c257..5d87b00a7f7f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -31,11 +30,11 @@ def main(): ) response = client.alerts.list( - scope="providers/Microsoft.Billing/billingAccounts/12345:6789", + scope="providers/Microsoft.Billing/billingAccounts/12345-6789", ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountAlerts.json +# x-ms-original-file: 2025-03-01/BillingAccountAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_ea.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_ea.py index 36c3983eb57e..8d75a4214926 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_ea.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/BillingAccountBudgetsList-EA.json +# x-ms-original-file: 2025-03-01/Budgets/List/EA/BillingAccountBudgetsList-EA.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_ea_category_type_filter.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea_category_type_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_ea_category_type_filter.py index e50a69dbf38a..3595ece1af5c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/billing_account_budgets_list_ea_category_type_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_ea_category_type_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/BillingAccountBudgetsList-EA-CategoryTypeFilter.json +# x-ms-original-file: 2025-03-01/Budgets/List/EA/BillingAccountBudgetsList-EA-CategoryTypeFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_mca.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_mca.py index 943f90f42551..490adcbb7e45 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_mca.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingAccountBudgetsList-MCA.json +# x-ms-original-file: 2025-03-01/Budgets/List/MCA/BillingAccountBudgetsList-MCA.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_mca_category_type_filter.py similarity index 84% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca_category_type_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_mca_category_type_filter.py index 1f510a2998d4..6d7eeddb47cd 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_account_budgets_list_mca_category_type_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_budgets_list_mca_category_type_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingAccountBudgetsList-MCA-CategoryTypeFilter.json +# x-ms-original-file: 2025-03-01/Budgets/List/MCA/BillingAccountBudgetsList-MCA-CategoryTypeFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py index dfdb7469fb47..6cfc0d3d6976 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountDimensionsList.json +# x-ms-original-file: 2025-03-01/BillingAccountDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py index f44db2779e80..aeae70afa558 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/BillingAccountDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py index d632afe7fec3..844f3cb7ab71 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/BillingAccountDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule.py similarity index 86% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule.py index c6b588264e14..fde51d69b407 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -56,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reservation_id_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule_reservation_id_filter.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reservation_id_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule_reservation_id_filter.py index 3d5d7fe8adef..b1a738110f35 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reservation_id_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule_reservation_id_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservationIdFilter.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservationIdFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reserved_resource_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule_reserved_resource_type_filter.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reserved_resource_type_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule_reserved_resource_type_filter.py index 6a816fb850a3..2c8ae74c7b6b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/ea/billing_account_ea_alert_rule_reserved_resource_type_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_ea_alert_rule_reserved_resource_type_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservedResourceTypeFilter.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservedResourceTypeFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py index 94870eeb8362..0e251be17dce 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -64,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountForecast.json +# x-ms-original-file: 2025-03-01/BillingAccountForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py index ebbf48683105..c57d230b120a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountQuery.json +# x-ms-original-file: 2025-03-01/BillingAccountQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py index a328d2ebf0f2..2290798dbcbe 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_account_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingAccountQueryGrouping.json +# x-ms-original-file: 2025-03-01/BillingAccountQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule.py index 4267a32838c3..57334db61f8f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reservation_id_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule_reservation_id_filter.py similarity index 90% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reservation_id_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule_reservation_id_filter.py index 4fb514bbe429..a5723814cddc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reservation_id_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule_reservation_id_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservationIdFilter.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservationIdFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reserved_resource_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule_reserved_resource_type_filter.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reserved_resource_type_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule_reserved_resource_type_filter.py index 72021b8b67f6..187149ea7436 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/billing_profile_alert_rule_reserved_resource_type_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alert_rule_reserved_resource_type_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservedResourceTypeFilter.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservedResourceTypeFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py index 7ebd258735c3..e491d39f77bf 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -31,11 +30,11 @@ def main(): ) response = client.alerts.list( - scope="providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + scope="providers/Microsoft.Billing/billingAccounts/12345-6789/billingProfiles/13579", ) print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingProfileAlerts.json +# x-ms-original-file: 2025-03-01/BillingProfileAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_budgets_list.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_budgets_list.py index 9b9c56cc8e61..e8fe66aa661e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_budgets_list.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingProfileBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/MCA/BillingProfileBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_budgets_list_category_type_filter.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list_category_type_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_budgets_list_category_type_filter.py index 944a732cfd7f..0204bc807ed6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/billing_profile_budgets_list_category_type_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_budgets_list_category_type_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/BillingProfileBudgetsList-CategoryTypeFilter.json +# x-ms-original-file: 2025-03-01/Budgets/List/MCA/BillingProfileBudgetsList-CategoryTypeFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py index 5ec003d550d8..ec800a8d292c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/billing_profile_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -64,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BillingProfileForecast.json +# x-ms-original-file: 2025-03-01/BillingProfileForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilityprivatescheduled_action.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/check_name_availabilityprivatescheduled_action.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilityprivatescheduled_action.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/check_name_availabilityprivatescheduled_action.py index 55573870a52f..a85be0fb4482 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilityprivatescheduled_action.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/check_name_availabilityprivatescheduled_action.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/checkNameAvailability-private-scheduledAction.json +# x-ms-original-file: 2025-03-01/scheduledActions/checkNameAvailability-private-scheduledAction.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilitysharedscheduled_action.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/check_name_availabilitysharedscheduled_action.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilitysharedscheduled_action.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/check_name_availabilitysharedscheduled_action.py index 2cba534dd18a..80d0a10dce7a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/check_name_availabilitysharedscheduled_action.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/check_name_availabilitysharedscheduled_action.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/checkNameAvailability-shared-scheduledAction.json +# x-ms-original-file: 2025-03-01/scheduledActions/checkNameAvailability-shared-scheduledAction.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py index 4879496d5c2d..4c6ffd11c61f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_check_name_availability.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleCheckNameAvailability.json +# x-ms-original-file: 2025-03-01/CostAllocationRuleCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py index 27b360f6258d..550a292444a9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -59,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleCreate.json +# x-ms-original-file: 2025-03-01/CostAllocationRuleCreate.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py index 23fb9d8b51d6..1e76a6f51e2a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_create_tag.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -58,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleCreateTag.json +# x-ms-original-file: 2025-03-01/CostAllocationRuleCreateTag.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py index ff697b5767f6..4502b2ee48ea 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleDelete.json +# x-ms-original-file: 2025-03-01/CostAllocationRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py index 51a5f4678b1e..c5df519398bc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rule_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRuleGet.json +# x-ms-original-file: 2025-03-01/CostAllocationRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py index b765a11f9225..74d0a67f8b46 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_allocation_rules_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostAllocationRulesList.json +# x-ms-original-file: 2025-03-01/CostAllocationRulesList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py index 4669ccb5f418..b05572b8bae3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/cost_details_operation_results_by_subscription_scope.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/CostDetailsOperationResultsBySubscriptionScope.json +# x-ms-original-file: 2025-03-01/CostDetailsOperationResultsBySubscriptionScope.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/cost/create_or_update_cost_subscription_budget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/create_or_update_cost_subscription_budget.py similarity index 92% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/cost/create_or_update_cost_subscription_budget.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/create_or_update_cost_subscription_budget.py index 17fca5a2d872..f024d992fbcc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/cost/create_or_update_cost_subscription_budget.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/create_or_update_cost_subscription_budget.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -76,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/Cost/CreateOrUpdate-Cost-Subscription-Budget.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/Cost/CreateOrUpdate-Cost-Subscription-Budget.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule.py index 7da0b6b1af56..72aebe7a0823 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reservation_id_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule_reservation_id_filter.py similarity index 90% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reservation_id_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule_reservation_id_filter.py index ba8824d4649e..81b8f4b5c104 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reservation_id_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule_reservation_id_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservationIdFilter.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservationIdFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reserved_resource_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule_reserved_resource_type_filter.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reserved_resource_type_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule_reserved_resource_type_filter.py index ba957076b7d8..8c61da3bc246 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/create_or_update/reservation_utilization/mca/customer_alert_rule_reserved_resource_type_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_alert_rule_reserved_resource_type_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservedResourceTypeFilter.json +# x-ms-original-file: 2025-03-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservedResourceTypeFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_budgets_list.py similarity index 86% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_budgets_list.py index 169f0a04d416..c85537f0e6c2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_budgets_list.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/CustomerBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/MCA/CustomerBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list_category_type_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_budgets_list_category_type_filter.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list_category_type_filter.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_budgets_list_category_type_filter.py index 8be52de4b3cf..bce9a1339b46 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/customer_budgets_list_category_type_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/customer_budgets_list_category_type_filter.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/CustomerBudgetsList-CategoryTypeFilter.json +# x-ms-original-file: 2025-03-01/Budgets/List/MCA/CustomerBudgetsList-CategoryTypeFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/delete/delete_budget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/delete_budget.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/delete/delete_budget.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/delete_budget.py index 99ad50c7c041..a128316b6aa4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/delete/delete_budget.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/delete_budget.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/Delete/DeleteBudget.json +# x-ms-original-file: 2025-03-01/Budgets/Delete/DeleteBudget.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py index 76b3f62e64c9..c1e1b1de892b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentAlerts.json +# x-ms-original-file: 2025-03-01/DepartmentAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/department_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_budgets_list.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/department_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_budgets_list.py index 81e270c06207..45a477306b83 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/department_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_budgets_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/DepartmentBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/EA/DepartmentBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py index 75cbfcde9300..e18c62e0f75c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentDimensionsList.json +# x-ms-original-file: 2025-03-01/DepartmentDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py index 315aafc5bc9c..231d4aca76f6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/DepartmentDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py index 3a2042c8d8a8..84d9b906a6bd 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/DepartmentDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py index 727d73fdc9b7..cba5d45864d7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -64,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentForecast.json +# x-ms-original-file: 2025-03-01/DepartmentForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py index bc9a6b04d8c2..5c327bce2f3d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentQuery.json +# x-ms-original-file: 2025-03-01/DepartmentQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py index 8cca507f43f1..41aace75eadc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/department_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DepartmentQueryGrouping.json +# x-ms-original-file: 2025-03-01/DepartmentQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py index 380c097bd043..2d218026c874 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_resource_group_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DismissResourceGroupAlerts.json +# x-ms-original-file: 2025-03-01/DismissResourceGroupAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py index 0af4d0bd5b18..3940f00b4afb 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/dismiss_subscription_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/DismissSubscriptionAlerts.json +# x-ms-original-file: 2025-03-01/DismissSubscriptionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py index 6f18ba780a20..7254f8701da3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/ea_price_sheet_for_billing_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EAPriceSheetForBillingPeriod.json +# x-ms-original-file: 2025-03-01/EAPriceSheetForBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py index d94acff72e24..4b6d24cbea28 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountAlerts.json +# x-ms-original-file: 2025-03-01/EnrollmentAccountAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/enrollment_account_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_budgets_list.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/enrollment_account_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_budgets_list.py index 7c3e70849652..51a25e3da3e9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/ea/enrollment_account_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_budgets_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/EA/EnrollmentAccountBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/EA/EnrollmentAccountBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py index 2c332c60f181..1cee1cd01b11 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountDimensionsList.json +# x-ms-original-file: 2025-03-01/EnrollmentAccountDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py index 5e2ead1c842b..f7e62c86f993 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/EnrollmentAccountDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py index 8668f861415d..c9b10dc3d0e1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/EnrollmentAccountDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py index 578b516ece2f..27f30bf85b99 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -64,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountForecast.json +# x-ms-original-file: 2025-03-01/EnrollmentAccountForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py index 8ffc049f028a..8deab51a2b05 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountQuery.json +# x-ms-original-file: 2025-03-01/EnrollmentAccountQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py index e065739b7805..a61f6b5fa596 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/enrollment_account_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/EnrollmentAccountQueryGrouping.json +# x-ms-original-file: 2025-03-01/EnrollmentAccountQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py index 2f299aa6b4fe..b340b155f19d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccount.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py index eed4d7cf4255..63cd2fdd45c4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_custom.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -63,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountCustom.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByBillingAccountCustom.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py index 2ac8ee09d15d..e466b3953fdc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_monthly.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountMonthly.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByBillingAccountMonthly.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py index 615d883c59ea..122e57949e0a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_pricesheet.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountPricesheet.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByBillingAccountPricesheet.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py index a0e46233e4a6..abd6012403de 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_details.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountReservationDetails.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByBillingAccountReservationDetails.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py index ae64f7b51155..14513c97237f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_recommendation.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -75,6 +75,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountReservationRecommendation.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByBillingAccountReservationRecommendation.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py index eaf95b495723..16e432261126 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_billing_account_reservation_transactions.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByBillingAccountReservationTransactions.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByBillingAccountReservationTransactions.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py index 82c7e9405fe6..6139b67b3177 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_department.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByDepartment.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py index a08795a7c3d5..9262134e9974 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_enrollment_account.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByEnrollmentAccount.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py index 0b5b8d28856a..b00b1093b35f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_management_group.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByManagementGroup.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py index 635c5020c917..b412ca96087b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_resource_group.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateByResourceGroup.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py index 133275a1f86b..813a58dfd66c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_create_or_update_by_subscription.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportCreateOrUpdateBySubscription.json +# x-ms-original-file: 2025-03-01/ExportCreateOrUpdateBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py index 5aedb7238e94..3f9567d95796 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByBillingAccount.json +# x-ms-original-file: 2025-03-01/ExportDeleteByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py index 6445e7244c40..b7d9451dee91 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_department.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByDepartment.json +# x-ms-original-file: 2025-03-01/ExportDeleteByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py index bbf8d5a52014..7e7480e13985 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_enrollment_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByEnrollmentAccount.json +# x-ms-original-file: 2025-03-01/ExportDeleteByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py index 0932634a8d25..fa17aa0f3a70 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_management_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByManagementGroup.json +# x-ms-original-file: 2025-03-01/ExportDeleteByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py index 55443708a31c..1478c2a33c4d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteByResourceGroup.json +# x-ms-original-file: 2025-03-01/ExportDeleteByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py index 7e3e39575b3e..f851f2ce1db3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_delete_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportDeleteBySubscription.json +# x-ms-original-file: 2025-03-01/ExportDeleteBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py index cd1287c4afa5..1190b9d57887 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByBillingAccount.json +# x-ms-original-file: 2025-03-01/ExportGetByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py index aeb0275b9460..1980c7c6d1b1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_department.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByDepartment.json +# x-ms-original-file: 2025-03-01/ExportGetByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py index 7d3e38b32485..e11b5d5e5f9c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_enrollment_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByEnrollmentAccount.json +# x-ms-original-file: 2025-03-01/ExportGetByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py index 030da76f263f..fac1976e83cf 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_management_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByManagementGroup.json +# x-ms-original-file: 2025-03-01/ExportGetByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py index 27d9d4a19bf5..fffd2848f87e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetByResourceGroup.json +# x-ms-original-file: 2025-03-01/ExportGetByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py index 39e5563e0bd7..a52f9148663b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_get_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportGetBySubscription.json +# x-ms-original-file: 2025-03-01/ExportGetBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py index c6ab7ba80538..5bb1de335470 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByBillingAccount.json +# x-ms-original-file: 2025-03-01/ExportRunByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py index a117490546aa..96df2c28f29b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_billing_account_with_optional_request_body.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByBillingAccountWithOptionalRequestBody.json +# x-ms-original-file: 2025-03-01/ExportRunByBillingAccountWithOptionalRequestBody.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py index d1f07ccb7868..388eb951d245 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_department.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByDepartment.json +# x-ms-original-file: 2025-03-01/ExportRunByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py index 96e33eb59171..be75f3890703 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_enrollment_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByEnrollmentAccount.json +# x-ms-original-file: 2025-03-01/ExportRunByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py index bb72980febad..59315c880017 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_management_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByManagementGroup.json +# x-ms-original-file: 2025-03-01/ExportRunByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py index 53c58e2a59c7..8c8df27d24d0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunByResourceGroup.json +# x-ms-original-file: 2025-03-01/ExportRunByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py index 3b219b7ad500..965b3511d6e2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunBySubscription.json +# x-ms-original-file: 2025-03-01/ExportRunBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py index ac87b998995f..fdcb702927c3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByBillingAccount.json +# x-ms-original-file: 2025-03-01/ExportRunHistoryGetByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py index 1e422b7f8408..395f21a07c62 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_department.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByDepartment.json +# x-ms-original-file: 2025-03-01/ExportRunHistoryGetByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py index 1a2910a082c4..1335c55b3f9b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_enrollment_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByEnrollmentAccount.json +# x-ms-original-file: 2025-03-01/ExportRunHistoryGetByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py index ed86fe0b2925..d6c34086adf0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_management_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByManagementGroup.json +# x-ms-original-file: 2025-03-01/ExportRunHistoryGetByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py index 4e9a999a78d8..1c0703311db8 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetByResourceGroup.json +# x-ms-original-file: 2025-03-01/ExportRunHistoryGetByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py index 0713fb814637..035ecb9e3da8 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/export_run_history_get_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportRunHistoryGetBySubscription.json +# x-ms-original-file: 2025-03-01/ExportRunHistoryGetBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py index f4227157199c..a904248ea988 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByBillingAccount.json +# x-ms-original-file: 2025-03-01/ExportsGetByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py index c782bad0d9ef..082c8eeac22d 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_department.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByDepartment.json +# x-ms-original-file: 2025-03-01/ExportsGetByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py index 675d16f86d4b..2cb8707b098c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_enrollment_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByEnrollmentAccount.json +# x-ms-original-file: 2025-03-01/ExportsGetByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py index aa523a521eb5..6a9f424d7338 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_management_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByManagementGroup.json +# x-ms-original-file: 2025-03-01/ExportsGetByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py index e5b7b23857d2..e85854404eec 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetByResourceGroup.json +# x-ms-original-file: 2025-03-01/ExportsGetByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py index 7fbe424a7df6..3b563687d369 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/exports_get_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExportsGetBySubscription.json +# x-ms-original-file: 2025-03-01/ExportsGetBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py index 9afca71e3a4a..4010921a42a2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountAlerts.json +# x-ms-original-file: 2025-03-01/ExternalBillingAccountAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py index a07b0214a796..68b55d00622a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_account_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -63,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountForecast.json +# x-ms-original-file: 2025-03-01/ExternalBillingAccountForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py index 745a444219e1..f94f36846836 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_dimensions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountsDimensions.json +# x-ms-original-file: 2025-03-01/ExternalBillingAccountsDimensions.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py index e47dcc6b22b6..5af956080086 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_billing_accounts_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -61,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalBillingAccountsQuery.json +# x-ms-original-file: 2025-03-01/ExternalBillingAccountsQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py index b2175a812e57..dc60c6e607a4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionAlerts.json +# x-ms-original-file: 2025-03-01/ExternalSubscriptionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py index 8afadf89ae41..6b4cc8582626 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscription_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -63,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionForecast.json +# x-ms-original-file: 2025-03-01/ExternalSubscriptionForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py index 55539a132ed3..aa1f1b49ea74 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_dimensions.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionsDimensions.json +# x-ms-original-file: 2025-03-01/ExternalSubscriptionsDimensions.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py index 1cd67c934740..093080e70d9e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/external_subscriptions_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -61,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ExternalSubscriptionsQuery.json +# x-ms-original-file: 2025-03-01/ExternalSubscriptionsQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_billing_account.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_account.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_billing_account.py index 94edb7624a58..21762ea227b0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_billing_account.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_billing_profile.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_profile.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_billing_profile.py index 035478b68725..87e6dbea27db 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_billing_profile.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_billing_profile.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_reservation.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_reservation.py index 2425fed0405d..afebb720c206 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_reservation.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation_order.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_reservation_order.py similarity index 84% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation_order.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_reservation_order.py index e265eb0c2c9c..0da03f1cf242 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_reservation_order.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_reservation_order.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_savings_plan.py similarity index 85% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_savings_plan.py index 96b19aba4c43..25eb73994f48 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_savings_plan.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan_order.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_savings_plan_order.py similarity index 84% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan_order.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_savings_plan_order.py index 8e9bbd27cd72..72d02e320d9f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/async/generate_benefit_utilization_summaries_report_by_savings_plan_order.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_benefit_utilization_summaries_report_by_savings_plan_order.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py index 9459fe36420b..5aaef639dbb5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_account_enterprise_agreement_customer_and_billing_period.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json +# x-ms-original-file: 2025-03-01/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py index e66acff6f176..e226df381fb1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json +# x-ms-original-file: 2025-03-01/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py index 7df5a04a709d..f10f5f7a248b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_billing_profile_and_invoice_id_and_customer_id.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json +# x-ms-original-file: 2025-03-01/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py index bd923b0d0552..b8830cd88e0a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_customer_and_time_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByCustomerAndTimePeriod.json +# x-ms-original-file: 2025-03-01/GenerateCostDetailsReportByCustomerAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py index 6ee2c89bed2c..dd18d06d2df6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_departments_and_time_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json +# x-ms-original-file: 2025-03-01/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py index 3a83d55907ac..caccd7a71096 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_enrollment_accounts_and_time_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json +# x-ms-original-file: 2025-03-01/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py index d39af3c271b3..aa5036d44d50 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_cost_details_report_by_subscription_and_time_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json +# x-ms-original-file: 2025-03-01/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py index dd73f92a5c52..e7d9258f5ff3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_account_legacy_and_billing_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json +# x-ms-original-file: 2025-03-01/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py index 765b4f5a07c2..c5ada03c6ece 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json +# x-ms-original-file: 2025-03-01/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py index 6810fc22a909..7791a25f3401 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_billing_profile_and_invoice_id_and_customer_id.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json +# x-ms-original-file: 2025-03-01/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py index bc6dfa654c34..b756a02b3845 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_customer_and_time_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportByCustomerAndTimePeriod.json +# x-ms-original-file: 2025-03-01/GenerateDetailedCostReportByCustomerAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py index 71351d46dc2e..271427c47906 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_by_subscription_and_time_period.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json +# x-ms-original-file: 2025-03-01/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py index 8e6fc54eff83..9a68189852c9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_results_by_subscription_scope.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json +# x-ms-original-file: 2025-03-01/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py index ac6b691ba5bb..0b8c22a154f2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_detailed_cost_report_operation_status_by_subscription_scope.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json +# x-ms-original-file: 2025-03-01/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py index 85a21f8e4225..f2687d976b22 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateReservationDetailsReportByBillingAccount.json +# x-ms-original-file: 2025-03-01/GenerateReservationDetailsReportByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py index 98d5297fa9d6..700e4494dbb6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/generate_reservation_details_report_by_billing_profile.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/GenerateReservationDetailsReportByBillingProfile.json +# x-ms-original-file: 2025-03-01/GenerateReservationDetailsReportByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/cost/get_cost_budget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/get_cost_budget.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/cost/get_cost_budget.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/get_cost_budget.py index b263f05e33ee..6c5149868373 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/cost/get_cost_budget.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/get_cost_budget.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/Get/Cost/Get-Cost-Budget.json +# x-ms-original-file: 2025-03-01/Budgets/Get/Cost/Get-Cost-Budget.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/reservation_utilization/get_reservation_utilization_alert_rule.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/get_reservation_utilization_alert_rule.py similarity index 84% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/reservation_utilization/get_reservation_utilization_alert_rule.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/get_reservation_utilization_alert_rule.py index 3310bf763a21..c6fdcfef7f5a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/get/reservation_utilization/get_reservation_utilization_alert_rule.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/get_reservation_utilization_alert_rule.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/Get/ReservationUtilization/Get-ReservationUtilization-AlertRule.json +# x-ms-original-file: 2025-03-01/Budgets/Get/ReservationUtilization/Get-ReservationUtilization-AlertRule.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py index 953e4f91450f..73a561acdca5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/InvoiceSectionAlerts.json +# x-ms-original-file: 2025-03-01/InvoiceSectionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/invoice_section_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_budgets_list.py similarity index 86% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/invoice_section_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_budgets_list.py index b1f3de21555d..48622fd40d35 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/mca/invoice_section_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_budgets_list.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/MCA/InvoiceSectionBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/MCA/InvoiceSectionBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py index c85ae203b4d0..86b927cfe78b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/invoice_section_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -64,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/InvoiceSectionForecast.json +# x-ms-original-file: 2025-03-01/InvoiceSectionForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/management_group_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_budgets_list.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/management_group_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_budgets_list.py index ccfba3eb79ff..31abcbba2bc3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/management_group_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_budgets_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/RBAC/ManagementGroupBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/RBAC/ManagementGroupBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py index e09214247b69..a0630fa21e0a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupDimensionsList.json +# x-ms-original-file: 2025-03-01/ManagementGroupDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py index ce5239794200..74e03c48ce44 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/ManagementGroupDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py index b39181f1db5b..76d1311f35f0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/ManagementGroupDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py index 7ebf43cb9d30..8e7130d381a4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupQuery.json +# x-ms-original-file: 2025-03-01/ManagementGroupQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py index e6f136f2c7c5..3b32d10405ea 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/management_group_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ManagementGroupQueryGrouping.json +# x-ms-original-file: 2025-03-01/ManagementGroupQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py index 9c1c003082da..1ea1f70d0bfc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountDimensionsList.json +# x-ms-original-file: 2025-03-01/MCABillingAccountDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py index b2d44c880793..1327cba7583a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/MCABillingAccountDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py index 54659ebc559d..136bcfee2175 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/MCABillingAccountDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py index b0298ae579f7..6b5e8fbd58f3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountQuery.json +# x-ms-original-file: 2025-03-01/MCABillingAccountQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py index f85c7ebf2ab2..b217b7c4d78a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_account_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingAccountQueryGrouping.json +# x-ms-original-file: 2025-03-01/MCABillingAccountQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py index e463bab5dd8f..b978f69490c4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileDimensionsList.json +# x-ms-original-file: 2025-03-01/MCABillingProfileDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py index 524aff62c500..efb7cd2bda04 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/MCABillingProfileDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py index dbd445ac1179..1b504eb2e7f1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/MCABillingProfileDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py index 48a0246ad38b..79c3eeeb319f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileQuery.json +# x-ms-original-file: 2025-03-01/MCABillingProfileQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py index db5546e85639..aba874312d74 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_billing_profile_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCABillingProfileQueryGrouping.json +# x-ms-original-file: 2025-03-01/MCABillingProfileQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py index 42f6d787dd6d..ae97a340d307 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerDimensionsList.json +# x-ms-original-file: 2025-03-01/MCACustomerDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py index d20f915cc794..a6c4b9691925 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/MCACustomerDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py index 1a9e79382e27..eed2b3a5011f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/MCACustomerDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py index c422e8584df9..ec5fa1c2949a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerQuery.json +# x-ms-original-file: 2025-03-01/MCACustomerQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py index 5412f6ce9683..781bae723e7e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_customer_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCACustomerQueryGrouping.json +# x-ms-original-file: 2025-03-01/MCACustomerQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py index dab7839695d8..3d35221acc44 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionDimensionsList.json +# x-ms-original-file: 2025-03-01/MCAInvoiceSectionDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py index 47bc4b10b679..4cd46c3474e5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_expand_and_top.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json +# x-ms-original-file: 2025-03-01/MCAInvoiceSectionDimensionsListExpandAndTop.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py index e84873cd461b..58a56f5d4588 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_dimensions_list_with_filter.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionDimensionsListWithFilter.json +# x-ms-original-file: 2025-03-01/MCAInvoiceSectionDimensionsListWithFilter.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py index ca424d04324c..dab1b1976438 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionQuery.json +# x-ms-original-file: 2025-03-01/MCAInvoiceSectionQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py index 52ba155efcd9..e7fb8f44f0d5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/mca_invoice_section_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/MCAInvoiceSectionQueryGrouping.json +# x-ms-original-file: 2025-03-01/MCAInvoiceSectionQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py index 891c15a9bd74..54c1be6799e9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/operation_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/OperationList.json +# x-ms-original-file: 2025-03-01/OperationList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py index 1a34a96818ef..03f1f1066dc6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PricesheetDownload.json +# x-ms-original-file: 2025-03-01/PricesheetDownload.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py index 3b0e15d521b9..dd2d2ab44d38 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/pricesheet_download_by_billing_profile.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PricesheetDownloadByBillingProfile.json +# x-ms-original-file: 2025-03-01/PricesheetDownloadByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py index 9672406831d5..6e8790773dc2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateView.json +# x-ms-original-file: 2025-03-01/PrivateView.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py index 4f0b165354b7..22d473770186 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_create_or_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateViewCreateOrUpdate.json +# x-ms-original-file: 2025-03-01/PrivateViewCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py index 5712d18e0f8b..51f0b2ac20e9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +34,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateViewDelete.json +# x-ms-original-file: 2025-03-01/PrivateViewDelete.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py index 0b10793e9291..76582b0aab37 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/private_view_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/PrivateViewList.json +# x-ms-original-file: 2025-03-01/PrivateViewList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py index 76ead9159e9d..82df8e4ad470 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupAlerts.json +# x-ms-original-file: 2025-03-01/ResourceGroupAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/resource_group_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_budgets_list.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/resource_group_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_budgets_list.py index ebf35c6ee4f0..d68cc0700832 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/resource_group_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_budgets_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/RBAC/ResourceGroupBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/RBAC/ResourceGroupBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py index 4c32f737c9b0..c6b608096178 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupDimensionsList.json +# x-ms-original-file: 2025-03-01/ResourceGroupDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py index ce8b3e3143f0..2db6787e266b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -64,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupForecast.json +# x-ms-original-file: 2025-03-01/ResourceGroupForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py index b77e257fb3b3..adfc9f412485 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupQuery.json +# x-ms-original-file: 2025-03-01/ResourceGroupQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py index 4a849390a54f..2cbdc8cd7740 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/resource_group_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ResourceGroupQueryGrouping.json +# x-ms-original-file: 2025-03-01/ResourceGroupQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_account.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_billing_account.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_account.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_billing_account.py index 22cf51fd626c..8376f63bd755 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_account.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_billing_account.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_profile.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_billing_profile.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_profile.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_billing_profile.py index 9e58ad25bcb9..298f82f47900 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_billing_profile.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_billing_profile.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_id_monthly.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_savings_plan_id_monthly.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_id_monthly.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_savings_plan_id_monthly.py index b4e6133583a2..28ee909b52cd 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_id_monthly.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_savings_plan_id_monthly.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_order_id_daily.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_savings_plan_order_id_daily.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_order_id_daily.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_savings_plan_order_id_daily.py index 04d9724be6cb..65e380642d34 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/benefit_utilization_summaries/savings_plan_savings_plan_order_id_daily.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/savings_plan_savings_plan_order_id_daily.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json +# x-ms-original-file: 2025-03-01/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioncreate_or_updateprivate.py similarity index 87% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateprivate.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioncreate_or_updateprivate.py index d3bb5b00bd52..3039e686f3f0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioncreate_or_updateprivate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -53,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-createOrUpdate-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioncreate_or_updateshared.py similarity index 87% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateshared.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioncreate_or_updateshared.py index 6c8a7c28d650..a5ec731e048f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioncreate_or_updateshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioncreate_or_updateshared.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -55,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-createOrUpdate-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiondeleteprivate.py similarity index 80% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteprivate.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiondeleteprivate.py index c6ce3688f44e..cf0f63c4a788 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiondeleteprivate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +34,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-delete-private.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-delete-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiondeleteshared.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteshared.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiondeleteshared.py index fbf453691dc6..1645f83e0e31 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiondeleteshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiondeleteshared.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-delete-shared.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-delete-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiongetprivate.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetprivate.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiongetprivate.py index 73a9d476dc72..98d1f323f9e0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiongetprivate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-get-private.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-get-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiongetshared.py similarity index 82% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetshared.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiongetshared.py index a5d2b12fd70a..a91b67e014e7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actiongetshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actiongetshared.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-get-shared.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-get-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioninsight_alertcreate_or_updateshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioninsight_alertcreate_or_updateshared.py similarity index 86% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioninsight_alertcreate_or_updateshared.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioninsight_alertcreate_or_updateshared.py index 09efab59a275..3751ffb71ae1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actioninsight_alertcreate_or_updateshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actioninsight_alertcreate_or_updateshared.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -54,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionsend_nowprivate.py similarity index 80% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowprivate.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionsend_nowprivate.py index b6111c765747..44eefbb3b3d9 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionsend_nowprivate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +34,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-sendNow-private.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-sendNow-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionsend_nowshared.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowshared.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionsend_nowshared.py index 4153a4fb1cbf..8cc8e36a7f8a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionsend_nowshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionsend_nowshared.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledAction-sendNow-shared.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledAction-sendNow-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filterprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslist_with_filterprivate.py similarity index 80% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filterprivate.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslist_with_filterprivate.py index 8ff22dab0b8d..12588bedd145 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filterprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslist_with_filterprivate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-listWithFilter-private.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledActions-listWithFilter-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filtershared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslist_with_filtershared.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filtershared.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslist_with_filtershared.py index 373d4ed622d3..0d34fdc40bcb 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslist_with_filtershared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslist_with_filtershared.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-listWithFilter-shared.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledActions-listWithFilter-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistprivate.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslistprivate.py similarity index 80% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistprivate.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslistprivate.py index 073a871e1635..1ea6cbc874e5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistprivate.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslistprivate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-list-private.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledActions-list-private.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistshared.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslistshared.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistshared.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslistshared.py index af54313ef407..2dfb9071f63c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actions/scheduled_actionslistshared.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/scheduled_actionslistshared.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/scheduledActions/scheduledActions-list-shared.json +# x-ms-original-file: 2025-03-01/scheduledActions/scheduledActions-list-shared.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py index 42aef7af432b..5895df4a0b31 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingdelete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/setting-delete.json +# x-ms-original-file: 2025-03-01/setting-delete.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py index 7bb4df45adb0..e390fe75e547 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingget.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/setting-get.json +# x-ms-original-file: 2025-03-01/setting-get.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py index 9103b8270c4d..93672fe1c5f0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settings_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/settingsList.json +# x-ms-original-file: 2025-03-01/settingsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py index 2b143f9c7fed..2d0c1aababe0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/settingscreate_or_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/settings-createOrUpdate.json +# x-ms-original-file: 2025-03-01/settings-createOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py index 3347192fc6d1..072dcb8e94f1 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_resource_group_alert.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SingleResourceGroupAlert.json +# x-ms-original-file: 2025-03-01/SingleResourceGroupAlert.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py index 554674fa9fc9..dd47d48bd6dc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/single_subscription_alert.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SingleSubscriptionAlert.json +# x-ms-original-file: 2025-03-01/SingleSubscriptionAlert.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py index 5fa74358490b..fcd60a9f7034 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_alerts.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionAlerts.json +# x-ms-original-file: 2025-03-01/SubscriptionAlerts.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/subscription_budgets_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_budgets_list.py similarity index 81% rename from sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/subscription_budgets_list.py rename to sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_budgets_list.py index 9f6e86a0ff9e..f142db7edcb4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/budgets/list/rbac/subscription_budgets_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_budgets_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/Budgets/List/RBAC/SubscriptionBudgetsList.json +# x-ms-original-file: 2025-03-01/Budgets/List/RBAC/SubscriptionBudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py index b6ed50dece32..a947f3d74001 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_dimensions_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionDimensionsList.json +# x-ms-original-file: 2025-03-01/SubscriptionDimensionsList.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py index 43492864c30f..f7e57b692c89 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_forecast.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -64,6 +63,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionForecast.json +# x-ms-original-file: 2025-03-01/SubscriptionForecast.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py index e332ab4c55aa..00887e2c924e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionQuery.json +# x-ms-original-file: 2025-03-01/SubscriptionQuery.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py index 88061351299c..7be3584118c4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/subscription_query_grouping.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/SubscriptionQueryGrouping.json +# x-ms-original-file: 2025-03-01/SubscriptionQueryGrouping.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py index 623956ffc0b5..d90c90903781 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewByResourceGroup.json +# x-ms-original-file: 2025-03-01/ViewByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py index e6b8e7474a97..71b5b506334c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_create_or_update_by_resource_group.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -69,6 +69,6 @@ def main(): print(response) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewCreateOrUpdateByResourceGroup.json +# x-ms-original-file: 2025-03-01/ViewCreateOrUpdateByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py index 6443a534a816..98aa5aca672e 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_delete_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewDeleteByResourceGroup.json +# x-ms-original-file: 2025-03-01/ViewDeleteByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py index 5fc394880d9d..932b4725a9a7 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/view_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -37,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/stable/2025-03-01/examples/ViewListByResourceGroup.json +# x-ms-original-file: 2025-03-01/ViewListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py index 2c1c2a183ef0..fc171811f946 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py index a64cd8d406a2..284c85b7835c 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_alerts_list(self, resource_group): - response = self.client.alerts.list( + def test_alerts_get(self, resource_group): + response = self.client.alerts.get( scope="str", - api_version="2025-03-01", + alert_id="str", ) # please add some check logic here by yourself @@ -31,11 +31,48 @@ def test_alerts_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_alerts_get(self, resource_group): - response = self.client.alerts.get( + def test_alerts_dismiss(self, resource_group): + response = self.client.alerts.dismiss( scope="str", alert_id="str", - api_version="2025-03-01", + parameters={ + "properties": { + "closeTime": "str", + "costEntityId": "str", + "creationTime": "str", + "definition": {"category": "str", "criteria": "str", "type": "str"}, + "description": "str", + "details": { + "amount": 0.0, + "companyName": "str", + "contactEmails": ["str"], + "contactGroups": ["str"], + "contactRoles": ["str"], + "currentSpend": 0.0, + "departmentName": "str", + "enrollmentEndDate": "str", + "enrollmentNumber": "str", + "enrollmentStartDate": "str", + "invoicingThreshold": 0.0, + "meterFilter": [{}], + "operator": "str", + "overridingAlert": "str", + "periodStartDate": "str", + "resourceFilter": [{}], + "resourceGroupFilter": [{}], + "tagFilter": {}, + "threshold": 0.0, + "timeGrainType": "str", + "triggeredBy": "str", + "unit": "str", + }, + "modificationTime": "str", + "source": "str", + "status": "str", + "statusModificationTime": "str", + "statusModificationUserName": "str", + } + }, ) # please add some check logic here by yourself @@ -43,47 +80,9 @@ def test_alerts_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_alerts_dismiss(self, resource_group): - response = self.client.alerts.dismiss( + def test_alerts_list(self, resource_group): + response = self.client.alerts.list( scope="str", - alert_id="str", - parameters={ - "closeTime": "str", - "costEntityId": "str", - "creationTime": "str", - "definition": {"category": "str", "criteria": "str", "type": "str"}, - "description": "str", - "details": { - "amount": 0.0, - "companyName": "str", - "contactEmails": ["str"], - "contactGroups": ["str"], - "contactRoles": ["str"], - "currentSpend": 0.0, - "departmentName": "str", - "enrollmentEndDate": "str", - "enrollmentNumber": "str", - "enrollmentStartDate": "str", - "invoicingThreshold": 0.0, - "meterFilter": [{}], - "operator": "str", - "overridingAlert": "str", - "periodStartDate": "str", - "resourceFilter": [{}], - "resourceGroupFilter": [{}], - "tagFilter": {}, - "threshold": 0.0, - "timeGrainType": "str", - "triggeredBy": "str", - "unit": "str", - }, - "modificationTime": "str", - "source": "str", - "status": "str", - "statusModificationTime": "str", - "statusModificationUserName": "str", - }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -95,7 +94,6 @@ def test_alerts_list_external(self, resource_group): response = self.client.alerts.list_external( external_cloud_provider_type="str", external_cloud_provider_id="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py index 29ae48233d26..6a3eefa208b5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_alerts_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_alerts_list(self, resource_group): - response = await self.client.alerts.list( + async def test_alerts_get(self, resource_group): + response = await self.client.alerts.get( scope="str", - api_version="2025-03-01", + alert_id="str", ) # please add some check logic here by yourself @@ -32,11 +32,48 @@ async def test_alerts_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_alerts_get(self, resource_group): - response = await self.client.alerts.get( + async def test_alerts_dismiss(self, resource_group): + response = await self.client.alerts.dismiss( scope="str", alert_id="str", - api_version="2025-03-01", + parameters={ + "properties": { + "closeTime": "str", + "costEntityId": "str", + "creationTime": "str", + "definition": {"category": "str", "criteria": "str", "type": "str"}, + "description": "str", + "details": { + "amount": 0.0, + "companyName": "str", + "contactEmails": ["str"], + "contactGroups": ["str"], + "contactRoles": ["str"], + "currentSpend": 0.0, + "departmentName": "str", + "enrollmentEndDate": "str", + "enrollmentNumber": "str", + "enrollmentStartDate": "str", + "invoicingThreshold": 0.0, + "meterFilter": [{}], + "operator": "str", + "overridingAlert": "str", + "periodStartDate": "str", + "resourceFilter": [{}], + "resourceGroupFilter": [{}], + "tagFilter": {}, + "threshold": 0.0, + "timeGrainType": "str", + "triggeredBy": "str", + "unit": "str", + }, + "modificationTime": "str", + "source": "str", + "status": "str", + "statusModificationTime": "str", + "statusModificationUserName": "str", + } + }, ) # please add some check logic here by yourself @@ -44,47 +81,9 @@ async def test_alerts_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_alerts_dismiss(self, resource_group): - response = await self.client.alerts.dismiss( + async def test_alerts_list(self, resource_group): + response = await self.client.alerts.list( scope="str", - alert_id="str", - parameters={ - "closeTime": "str", - "costEntityId": "str", - "creationTime": "str", - "definition": {"category": "str", "criteria": "str", "type": "str"}, - "description": "str", - "details": { - "amount": 0.0, - "companyName": "str", - "contactEmails": ["str"], - "contactGroups": ["str"], - "contactRoles": ["str"], - "currentSpend": 0.0, - "departmentName": "str", - "enrollmentEndDate": "str", - "enrollmentNumber": "str", - "enrollmentStartDate": "str", - "invoicingThreshold": 0.0, - "meterFilter": [{}], - "operator": "str", - "overridingAlert": "str", - "periodStartDate": "str", - "resourceFilter": [{}], - "resourceGroupFilter": [{}], - "tagFilter": {}, - "threshold": 0.0, - "timeGrainType": "str", - "triggeredBy": "str", - "unit": "str", - }, - "modificationTime": "str", - "source": "str", - "status": "str", - "statusModificationTime": "str", - "statusModificationUserName": "str", - }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -96,7 +95,6 @@ async def test_alerts_list_external(self, resource_group): response = await self.client.alerts.list_external( external_cloud_provider_type="str", external_cloud_provider_id="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py index 3e9eb702e3c5..4db8d35e52a4 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -23,7 +23,6 @@ def setup_method(self, method): def test_benefit_recommendations_list(self, resource_group): response = self.client.benefit_recommendations.list( billing_scope="str", - api_version="2025-03-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py index f217374a011c..3b0cab4a6b98 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_recommendations_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def setup_method(self, method): async def test_benefit_recommendations_list(self, resource_group): response = self.client.benefit_recommendations.list( billing_scope="str", - api_version="2025-03-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py index 38d53ef6ed4e..3199553cf120 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -23,7 +23,6 @@ def setup_method(self, method): def test_benefit_utilization_summaries_list_by_billing_account_id(self, resource_group): response = self.client.benefit_utilization_summaries.list_by_billing_account_id( billing_account_id="str", - api_version="2025-03-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -35,7 +34,6 @@ def test_benefit_utilization_summaries_list_by_billing_profile_id(self, resource response = self.client.benefit_utilization_summaries.list_by_billing_profile_id( billing_account_id="str", billing_profile_id="str", - api_version="2025-03-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -46,7 +44,6 @@ def test_benefit_utilization_summaries_list_by_billing_profile_id(self, resource def test_benefit_utilization_summaries_list_by_savings_plan_order(self, resource_group): response = self.client.benefit_utilization_summaries.list_by_savings_plan_order( savings_plan_order_id="str", - api_version="2025-03-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -58,7 +55,6 @@ def test_benefit_utilization_summaries_list_by_savings_plan_id(self, resource_gr response = self.client.benefit_utilization_summaries.list_by_savings_plan_id( savings_plan_order_id="str", savings_plan_id="str", - api_version="2025-03-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py index 80c112de8c0b..79ac5349b532 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_benefit_utilization_summaries_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def setup_method(self, method): async def test_benefit_utilization_summaries_list_by_billing_account_id(self, resource_group): response = self.client.benefit_utilization_summaries.list_by_billing_account_id( billing_account_id="str", - api_version="2025-03-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -36,7 +35,6 @@ async def test_benefit_utilization_summaries_list_by_billing_profile_id(self, re response = self.client.benefit_utilization_summaries.list_by_billing_profile_id( billing_account_id="str", billing_profile_id="str", - api_version="2025-03-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -47,7 +45,6 @@ async def test_benefit_utilization_summaries_list_by_billing_profile_id(self, re async def test_benefit_utilization_summaries_list_by_savings_plan_order(self, resource_group): response = self.client.benefit_utilization_summaries.list_by_savings_plan_order( savings_plan_order_id="str", - api_version="2025-03-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -59,7 +56,6 @@ async def test_benefit_utilization_summaries_list_by_savings_plan_id(self, resou response = self.client.benefit_utilization_summaries.list_by_savings_plan_id( savings_plan_order_id="str", savings_plan_id="str", - api_version="2025-03-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py index a79b86cf9aba..865c1d7e7719 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,24 +18,12 @@ class TestCostManagementBudgetsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_budgets_list(self, resource_group): - response = self.client.budgets.list( - scope="str", - api_version="2025-03-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_budgets_get(self, resource_group): response = self.client.budgets.get( scope="str", budget_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -48,41 +36,50 @@ def test_budgets_create_or_update(self, resource_group): scope="str", budget_name="str", parameters={ - "amount": 0.0, - "category": "str", - "currentSpend": {"amount": 0.0, "unit": "str"}, "eTag": "str", - "filter": { - "and": [ - { - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - } - ], - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - }, - "forecastSpend": {"amount": 0.0, "unit": "str"}, "id": "str", "name": "str", - "notifications": { - "str": { - "contactEmails": ["str"], - "enabled": bool, - "operator": "str", - "threshold": 0.0, - "contactGroups": ["str"], - "contactRoles": ["str"], - "frequency": "str", - "locale": "str", - "thresholdType": "Actual", - } + "properties": { + "category": "str", + "timeGrain": "str", + "timePeriod": {"startDate": "2020-02-20 00:00:00", "endDate": "2020-02-20 00:00:00"}, + "amount": 0.0, + "currentSpend": {"amount": 0.0, "unit": "str"}, + "filter": { + "and": [ + { + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + } + ], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "forecastSpend": {"amount": 0.0, "unit": "str"}, + "notifications": { + "str": { + "contactEmails": ["str"], + "enabled": bool, + "operator": "str", + "threshold": 0.0, + "contactGroups": ["str"], + "contactRoles": ["str"], + "frequency": "str", + "locale": "str", + "thresholdType": "str", + } + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "timeGrain": "str", - "timePeriod": {"startDate": "2020-02-20 00:00:00", "endDate": "2020-02-20 00:00:00"}, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -94,8 +91,17 @@ def test_budgets_delete(self, resource_group): response = self.client.budgets.delete( scope="str", budget_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_budgets_list(self, resource_group): + response = self.client.budgets.list( + scope="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py index 87032c317642..548f7eb81382 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_budgets_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,24 +19,12 @@ class TestCostManagementBudgetsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_budgets_list(self, resource_group): - response = self.client.budgets.list( - scope="str", - api_version="2025-03-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_budgets_get(self, resource_group): response = await self.client.budgets.get( scope="str", budget_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -49,41 +37,50 @@ async def test_budgets_create_or_update(self, resource_group): scope="str", budget_name="str", parameters={ - "amount": 0.0, - "category": "str", - "currentSpend": {"amount": 0.0, "unit": "str"}, "eTag": "str", - "filter": { - "and": [ - { - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - } - ], - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - }, - "forecastSpend": {"amount": 0.0, "unit": "str"}, "id": "str", "name": "str", - "notifications": { - "str": { - "contactEmails": ["str"], - "enabled": bool, - "operator": "str", - "threshold": 0.0, - "contactGroups": ["str"], - "contactRoles": ["str"], - "frequency": "str", - "locale": "str", - "thresholdType": "Actual", - } + "properties": { + "category": "str", + "timeGrain": "str", + "timePeriod": {"startDate": "2020-02-20 00:00:00", "endDate": "2020-02-20 00:00:00"}, + "amount": 0.0, + "currentSpend": {"amount": 0.0, "unit": "str"}, + "filter": { + "and": [ + { + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + } + ], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "forecastSpend": {"amount": 0.0, "unit": "str"}, + "notifications": { + "str": { + "contactEmails": ["str"], + "enabled": bool, + "operator": "str", + "threshold": 0.0, + "contactGroups": ["str"], + "contactRoles": ["str"], + "frequency": "str", + "locale": "str", + "thresholdType": "str", + } + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, - "timeGrain": "str", - "timePeriod": {"startDate": "2020-02-20 00:00:00", "endDate": "2020-02-20 00:00:00"}, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -95,8 +92,17 @@ async def test_budgets_delete(self, resource_group): response = await self.client.budgets.delete( scope="str", budget_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_budgets_list(self, resource_group): + response = self.client.budgets.list( + scope="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py index e3ef9498db0a..09d796d3ef46 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,36 +18,12 @@ class TestCostManagementCostAllocationRulesOperations(AzureMgmtRecordedTestCase) def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cost_allocation_rules_list(self, resource_group): - response = self.client.cost_allocation_rules.list( - billing_account_id="str", - api_version="2025-03-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cost_allocation_rules_check_name_availability(self, resource_group): - response = self.client.cost_allocation_rules.check_name_availability( - billing_account_id="str", - cost_allocation_rule_check_name_availability_request={"name": "str", "type": "str"}, - api_version="2025-03-01", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_cost_allocation_rules_get(self, resource_group): response = self.client.cost_allocation_rules.get( billing_account_id="str", rule_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -79,9 +55,16 @@ def test_cost_allocation_rules_create_or_update(self, resource_group): "description": "str", "updatedDate": "2020-02-20 00:00:00", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -93,7 +76,27 @@ def test_cost_allocation_rules_delete(self, resource_group): response = self.client.cost_allocation_rules.delete( billing_account_id="str", rule_name="str", - api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cost_allocation_rules_list(self, resource_group): + response = self.client.cost_allocation_rules.list( + billing_account_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cost_allocation_rules_check_name_availability(self, resource_group): + response = self.client.cost_allocation_rules.check_name_availability( + billing_account_id="str", + cost_allocation_rule_check_name_availability_request={"name": "str", "type": "str"}, ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py index 5f71ccf25b7a..979b489c84ba 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_cost_allocation_rules_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,36 +19,12 @@ class TestCostManagementCostAllocationRulesOperationsAsync(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cost_allocation_rules_list(self, resource_group): - response = self.client.cost_allocation_rules.list( - billing_account_id="str", - api_version="2025-03-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cost_allocation_rules_check_name_availability(self, resource_group): - response = await self.client.cost_allocation_rules.check_name_availability( - billing_account_id="str", - cost_allocation_rule_check_name_availability_request={"name": "str", "type": "str"}, - api_version="2025-03-01", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_cost_allocation_rules_get(self, resource_group): response = await self.client.cost_allocation_rules.get( billing_account_id="str", rule_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -80,9 +56,16 @@ async def test_cost_allocation_rules_create_or_update(self, resource_group): "description": "str", "updatedDate": "2020-02-20 00:00:00", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -94,7 +77,27 @@ async def test_cost_allocation_rules_delete(self, resource_group): response = await self.client.cost_allocation_rules.delete( billing_account_id="str", rule_name="str", - api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cost_allocation_rules_list(self, resource_group): + response = self.client.cost_allocation_rules.list( + billing_account_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cost_allocation_rules_check_name_availability(self, resource_group): + response = await self.client.cost_allocation_rules.check_name_availability( + billing_account_id="str", + cost_allocation_rule_check_name_availability_request={"name": "str", "type": "str"}, ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py index c2ab92061b8c..66b5b955a66b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -23,7 +23,6 @@ def setup_method(self, method): def test_dimensions_list(self, resource_group): response = self.client.dimensions.list( scope="str", - api_version="2025-03-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -35,7 +34,6 @@ def test_dimensions_by_external_cloud_provider_type(self, resource_group): response = self.client.dimensions.by_external_cloud_provider_type( external_cloud_provider_type="str", external_cloud_provider_id="str", - api_version="2025-03-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py index 900c5b7c1bfe..d2235b9a5ac5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_dimensions_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def setup_method(self, method): async def test_dimensions_list(self, resource_group): response = self.client.dimensions.list( scope="str", - api_version="2025-03-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -36,7 +35,6 @@ async def test_dimensions_by_external_cloud_provider_type(self, resource_group): response = self.client.dimensions.by_external_cloud_provider_type( external_cloud_provider_type="str", external_cloud_provider_id="str", - api_version="2025-03-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py index 0ff2f55fc9cc..7a6321630cb5 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,24 +18,12 @@ class TestCostManagementExportsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_exports_list(self, resource_group): - response = self.client.exports.list( - scope="str", - api_version="2025-03-01", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_exports_get(self, resource_group): response = self.client.exports.get( scope="str", export_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -48,111 +36,122 @@ def test_exports_create_or_update(self, resource_group): scope="str", export_name="str", parameters={ - "compressionMode": "str", - "dataOverwriteBehavior": "str", - "definition": { - "timeframe": "str", - "type": "str", - "dataSet": { - "configuration": { - "columns": ["str"], - "dataVersion": "str", - "filters": [{"name": "str", "value": "str"}], - }, - "granularity": "str", - }, - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - }, - "deliveryInfo": { - "destination": { - "container": "str", - "resourceId": "str", - "rootFolderPath": "str", - "sasToken": "str", - "storageAccount": "str", - "type": "str", - } - }, "eTag": "str", - "exportDescription": "str", - "format": "str", "id": "str", "identity": {"type": "str", "principalId": "str", "tenantId": "str"}, "location": "str", "name": "str", - "nextRunTimeEstimate": "2020-02-20 00:00:00", - "partitionData": bool, - "runHistory": { - "value": [ - { - "eTag": "str", - "endDate": "2020-02-20 00:00:00", - "error": {"code": "str", "message": "str"}, - "executionType": "str", - "fileName": "str", - "id": "str", - "manifestFile": "str", - "name": "str", - "processingEndTime": "2020-02-20 00:00:00", - "processingStartTime": "2020-02-20 00:00:00", - "runSettings": { - "definition": { - "timeframe": "str", - "type": "str", - "dataSet": { - "configuration": { - "columns": ["str"], - "dataVersion": "str", - "filters": [{"name": "str", "value": "str"}], - }, - "granularity": "str", - }, - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - }, - "deliveryInfo": { - "destination": { - "container": "str", - "resourceId": "str", - "rootFolderPath": "str", - "sasToken": "str", - "storageAccount": "str", - "type": "str", - } - }, - "compressionMode": "str", - "dataOverwriteBehavior": "str", - "exportDescription": "str", - "format": "str", - "nextRunTimeEstimate": "2020-02-20 00:00:00", - "partitionData": bool, - "runHistory": ..., - "systemSuspensionContext": { - "suspensionCode": "str", - "suspensionReason": "str", - "suspensionTime": "2020-02-20 00:00:00", - }, + "properties": { + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], }, - "startDate": "2020-02-20 00:00:00", - "status": "str", - "submittedBy": "str", - "submittedTime": "2020-02-20 00:00:00", + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", "type": "str", } - ] - }, - "schedule": { - "recurrence": "str", - "recurrencePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - "status": "str", + }, + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "exportDescription": "str", + "format": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": { + "value": [ + { + "eTag": "str", + "id": "str", + "name": "str", + "properties": { + "endDate": "2020-02-20 00:00:00", + "error": {"code": "str", "message": "str"}, + "executionType": "str", + "fileName": "str", + "manifestFile": "str", + "processingEndTime": "2020-02-20 00:00:00", + "processingStartTime": "2020-02-20 00:00:00", + "runSettings": { + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], + }, + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", + "type": "str", + } + }, + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "exportDescription": "str", + "format": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": ..., + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, + }, + "startDate": "2020-02-20 00:00:00", + "status": "str", + "submittedBy": "str", + "submittedTime": "2020-02-20 00:00:00", + }, + "type": "str", + } + ] + }, + "schedule": { + "recurrence": "str", + "recurrencePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "status": "str", + }, + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, }, - "systemSuspensionContext": { - "suspensionCode": "str", - "suspensionReason": "str", - "suspensionTime": "2020-02-20 00:00:00", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -164,7 +163,16 @@ def test_exports_delete(self, resource_group): response = self.client.exports.delete( scope="str", export_name="str", - api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_exports_list(self, resource_group): + response = self.client.exports.list( + scope="str", ) # please add some check logic here by yourself @@ -176,7 +184,6 @@ def test_exports_execute(self, resource_group): response = self.client.exports.execute( scope="str", export_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -188,7 +195,6 @@ def test_exports_get_execution_history(self, resource_group): response = self.client.exports.get_execution_history( scope="str", export_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py index 7463fe375704..b3e848c6995b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_exports_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,24 +19,12 @@ class TestCostManagementExportsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_exports_list(self, resource_group): - response = await self.client.exports.list( - scope="str", - api_version="2025-03-01", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_exports_get(self, resource_group): response = await self.client.exports.get( scope="str", export_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -49,111 +37,122 @@ async def test_exports_create_or_update(self, resource_group): scope="str", export_name="str", parameters={ - "compressionMode": "str", - "dataOverwriteBehavior": "str", - "definition": { - "timeframe": "str", - "type": "str", - "dataSet": { - "configuration": { - "columns": ["str"], - "dataVersion": "str", - "filters": [{"name": "str", "value": "str"}], - }, - "granularity": "str", - }, - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - }, - "deliveryInfo": { - "destination": { - "container": "str", - "resourceId": "str", - "rootFolderPath": "str", - "sasToken": "str", - "storageAccount": "str", - "type": "str", - } - }, "eTag": "str", - "exportDescription": "str", - "format": "str", "id": "str", "identity": {"type": "str", "principalId": "str", "tenantId": "str"}, "location": "str", "name": "str", - "nextRunTimeEstimate": "2020-02-20 00:00:00", - "partitionData": bool, - "runHistory": { - "value": [ - { - "eTag": "str", - "endDate": "2020-02-20 00:00:00", - "error": {"code": "str", "message": "str"}, - "executionType": "str", - "fileName": "str", - "id": "str", - "manifestFile": "str", - "name": "str", - "processingEndTime": "2020-02-20 00:00:00", - "processingStartTime": "2020-02-20 00:00:00", - "runSettings": { - "definition": { - "timeframe": "str", - "type": "str", - "dataSet": { - "configuration": { - "columns": ["str"], - "dataVersion": "str", - "filters": [{"name": "str", "value": "str"}], - }, - "granularity": "str", - }, - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - }, - "deliveryInfo": { - "destination": { - "container": "str", - "resourceId": "str", - "rootFolderPath": "str", - "sasToken": "str", - "storageAccount": "str", - "type": "str", - } - }, - "compressionMode": "str", - "dataOverwriteBehavior": "str", - "exportDescription": "str", - "format": "str", - "nextRunTimeEstimate": "2020-02-20 00:00:00", - "partitionData": bool, - "runHistory": ..., - "systemSuspensionContext": { - "suspensionCode": "str", - "suspensionReason": "str", - "suspensionTime": "2020-02-20 00:00:00", - }, + "properties": { + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], }, - "startDate": "2020-02-20 00:00:00", - "status": "str", - "submittedBy": "str", - "submittedTime": "2020-02-20 00:00:00", + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", "type": "str", } - ] - }, - "schedule": { - "recurrence": "str", - "recurrencePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - "status": "str", + }, + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "exportDescription": "str", + "format": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": { + "value": [ + { + "eTag": "str", + "id": "str", + "name": "str", + "properties": { + "endDate": "2020-02-20 00:00:00", + "error": {"code": "str", "message": "str"}, + "executionType": "str", + "fileName": "str", + "manifestFile": "str", + "processingEndTime": "2020-02-20 00:00:00", + "processingStartTime": "2020-02-20 00:00:00", + "runSettings": { + "definition": { + "timeframe": "str", + "type": "str", + "dataSet": { + "configuration": { + "columns": ["str"], + "dataVersion": "str", + "filters": [{"name": "str", "value": "str"}], + }, + "granularity": "str", + }, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "deliveryInfo": { + "destination": { + "container": "str", + "resourceId": "str", + "rootFolderPath": "str", + "sasToken": "str", + "storageAccount": "str", + "type": "str", + } + }, + "compressionMode": "str", + "dataOverwriteBehavior": "str", + "exportDescription": "str", + "format": "str", + "nextRunTimeEstimate": "2020-02-20 00:00:00", + "partitionData": bool, + "runHistory": ..., + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, + }, + "startDate": "2020-02-20 00:00:00", + "status": "str", + "submittedBy": "str", + "submittedTime": "2020-02-20 00:00:00", + }, + "type": "str", + } + ] + }, + "schedule": { + "recurrence": "str", + "recurrencePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + "status": "str", + }, + "systemSuspensionContext": { + "suspensionCode": "str", + "suspensionReason": "str", + "suspensionTime": "2020-02-20 00:00:00", + }, }, - "systemSuspensionContext": { - "suspensionCode": "str", - "suspensionReason": "str", - "suspensionTime": "2020-02-20 00:00:00", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -165,7 +164,16 @@ async def test_exports_delete(self, resource_group): response = await self.client.exports.delete( scope="str", export_name="str", - api_version="2025-03-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_exports_list(self, resource_group): + response = await self.client.exports.list( + scope="str", ) # please add some check logic here by yourself @@ -177,7 +185,6 @@ async def test_exports_execute(self, resource_group): response = await self.client.exports.execute( scope="str", export_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -189,7 +196,6 @@ async def test_exports_get_execution_history(self, resource_group): response = await self.client.exports.get_execution_history( scope="str", export_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py index ab491fdf9d0c..904936fc3747 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -41,7 +41,6 @@ def test_forecast_usage(self, resource_group): "includeFreshPartialCost": bool, "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -71,7 +70,6 @@ def test_forecast_external_cloud_provider_usage(self, resource_group): "includeFreshPartialCost": bool, "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py index 499757ca3c14..32c17fe6ccb3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_forecast_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -42,7 +42,6 @@ async def test_forecast_usage(self, resource_group): "includeFreshPartialCost": bool, "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -72,7 +71,6 @@ async def test_forecast_external_cloud_provider_usage(self, resource_group): "includeFreshPartialCost": bool, "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py index 08729137fe9c..f012c1f26629 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -33,7 +33,6 @@ def test_generate_benefit_utilization_summaries_report_begin_generate_by_billing "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -55,7 +54,6 @@ def test_generate_benefit_utilization_summaries_report_begin_generate_by_billing "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -76,7 +74,6 @@ def test_generate_benefit_utilization_summaries_report_begin_generate_by_reserva "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -98,7 +95,6 @@ def test_generate_benefit_utilization_summaries_report_begin_generate_by_reserva "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -121,7 +117,6 @@ def test_generate_benefit_utilization_summaries_report_begin_generate_by_savings "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -143,7 +138,6 @@ def test_generate_benefit_utilization_summaries_report_begin_generate_by_savings "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py index cbfb48e50721..233d417c3c92 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_benefit_utilization_summaries_report_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -37,7 +37,6 @@ async def test_generate_benefit_utilization_summaries_report_begin_generate_by_b "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -63,7 +62,6 @@ async def test_generate_benefit_utilization_summaries_report_begin_generate_by_b "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -88,7 +86,6 @@ async def test_generate_benefit_utilization_summaries_report_begin_generate_by_r "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -112,7 +109,6 @@ async def test_generate_benefit_utilization_summaries_report_begin_generate_by_r "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -137,7 +133,6 @@ async def test_generate_benefit_utilization_summaries_report_begin_generate_by_s "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -163,7 +158,6 @@ async def test_generate_benefit_utilization_summaries_report_begin_generate_by_s "billingProfileId": "str", "kind": "str", }, - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py index b88cb1d4b646..db0b8f355ab8 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,16 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_generate_cost_details_report_begin_create_operation(self, resource_group): - response = self.client.generate_cost_details_report.begin_create_operation( + def test_generate_cost_details_report_begin_get_operation_results(self, resource_group): + response = self.client.generate_cost_details_report.begin_get_operation_results( scope="str", - parameters={ - "billingPeriod": "str", - "invoiceId": "str", - "metric": "str", - "timePeriod": {"end": "str", "start": "str"}, - }, - api_version="2025-03-01", + operation_id="str", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -37,11 +31,15 @@ def test_generate_cost_details_report_begin_create_operation(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_generate_cost_details_report_begin_get_operation_results(self, resource_group): - response = self.client.generate_cost_details_report.begin_get_operation_results( + def test_generate_cost_details_report_begin_create_operation(self, resource_group): + response = self.client.generate_cost_details_report.begin_create_operation( scope="str", - operation_id="str", - api_version="2025-03-01", + parameters={ + "billingPeriod": "str", + "invoiceId": "str", + "metric": "str", + "timePeriod": {"end": "str", "start": "str"}, + }, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py index 3384534c4b49..a5dd4362d544 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_cost_details_report_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,17 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_generate_cost_details_report_begin_create_operation(self, resource_group): + async def test_generate_cost_details_report_begin_get_operation_results(self, resource_group): response = await ( - await self.client.generate_cost_details_report.begin_create_operation( + await self.client.generate_cost_details_report.begin_get_operation_results( scope="str", - parameters={ - "billingPeriod": "str", - "invoiceId": "str", - "metric": "str", - "timePeriod": {"end": "str", "start": "str"}, - }, - api_version="2025-03-01", + operation_id="str", ) ).result() # call '.result()' to poll until service return final result @@ -40,12 +34,16 @@ async def test_generate_cost_details_report_begin_create_operation(self, resourc @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_generate_cost_details_report_begin_get_operation_results(self, resource_group): + async def test_generate_cost_details_report_begin_create_operation(self, resource_group): response = await ( - await self.client.generate_cost_details_report.begin_get_operation_results( + await self.client.generate_cost_details_report.begin_create_operation( scope="str", - operation_id="str", - api_version="2025-03-01", + parameters={ + "billingPeriod": "str", + "invoiceId": "str", + "metric": "str", + "timePeriod": {"end": "str", "start": "str"}, + }, ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py index b73b183006a1..ed23528f56ac 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_generate_detailed_cost_report_operation_results_begin_get(self, resourc response = self.client.generate_detailed_cost_report_operation_results.begin_get( operation_id="str", scope="str", - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py index f0da10ed3c4a..bc67734fa7dc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_results_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_generate_detailed_cost_report_operation_results_begin_get(self, r await self.client.generate_detailed_cost_report_operation_results.begin_get( operation_id="str", scope="str", - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py index c03bfd09eb56..18311bb573fc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_generate_detailed_cost_report_operation_status_get(self, resource_group response = self.client.generate_detailed_cost_report_operation_status.get( operation_id="str", scope="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py index 2916a88a8d69..3b60d7c55e7f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operation_status_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_generate_detailed_cost_report_operation_status_get(self, resource response = await self.client.generate_detailed_cost_report_operation_status.get( operation_id="str", scope="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py index b07e20892fa8..55dd9c49b387 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -30,7 +30,6 @@ def test_generate_detailed_cost_report_begin_create_operation(self, resource_gro "metric": "str", "timePeriod": {"end": "str", "start": "str"}, }, - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py index bc8f3f45925a..2b9072c5abb2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_detailed_cost_report_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -32,7 +32,6 @@ async def test_generate_detailed_cost_report_begin_create_operation(self, resour "metric": "str", "timePeriod": {"end": "str", "start": "str"}, }, - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py index 2afdb3b724ff..02e4b8c1dbff 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_generate_reservation_details_report_begin_by_billing_account_id(self, r billing_account_id="str", start_date="str", end_date="str", - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_generate_reservation_details_report_begin_by_billing_profile_id(self, r billing_profile_id="str", start_date="str", end_date="str", - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py index 78e55e8d7e68..2499292a9072 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_generate_reservation_details_report_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_generate_reservation_details_report_begin_by_billing_account_id(s billing_account_id="str", start_date="str", end_date="str", - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -43,7 +42,6 @@ async def test_generate_reservation_details_report_begin_by_billing_profile_id(s billing_profile_id="str", start_date="str", end_date="str", - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py index 432fbc920016..8a989831cb5f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2025-03-01", - ) + response = self.client.operations.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py index e25b38cebefd..7401ea430398 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2025-03-01", - ) + response = self.client.operations.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py index 5a79057b26bc..8156606b8883 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_price_sheet_begin_download_by_invoice(self, resource_group): billing_account_name="str", billing_profile_name="str", invoice_name="str", - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -37,7 +36,6 @@ def test_price_sheet_begin_download_by_billing_profile(self, resource_group): response = self.client.price_sheet.begin_download_by_billing_profile( billing_account_name="str", billing_profile_name="str", - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -49,7 +47,6 @@ def test_price_sheet_begin_download_by_billing_account(self, resource_group): response = self.client.price_sheet.begin_download_by_billing_account( billing_account_id="str", billing_period_name="str", - api_version="2025-03-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py index 9a565538e55d..52a8f9b4cb84 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_price_sheet_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_price_sheet_begin_download_by_invoice(self, resource_group): billing_account_name="str", billing_profile_name="str", invoice_name="str", - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -41,7 +40,6 @@ async def test_price_sheet_begin_download_by_billing_profile(self, resource_grou await self.client.price_sheet.begin_download_by_billing_profile( billing_account_name="str", billing_profile_name="str", - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result @@ -55,7 +53,6 @@ async def test_price_sheet_begin_download_by_billing_account(self, resource_grou await self.client.price_sheet.begin_download_by_billing_account( billing_account_id="str", billing_period_name="str", - api_version="2025-03-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py index a862de2b6829..3f0405d0fe6a 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -40,7 +40,6 @@ def test_query_usage(self, resource_group): "type": "str", "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -69,7 +68,6 @@ def test_query_usage_by_external_cloud_provider_type(self, resource_group): "type": "str", "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py index ab6ff14ba6fa..c576d2333df3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_query_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -41,7 +41,6 @@ async def test_query_usage(self, resource_group): "type": "str", "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -70,7 +69,6 @@ async def test_query_usage_by_external_cloud_provider_type(self, resource_group) "type": "str", "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, }, - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py index 619ca700b2b5..580766e2d8d2 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,22 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_scheduled_actions_list(self, resource_group): - response = self.client.scheduled_actions.list( - api_version="2025-03-01", + def test_scheduled_actions_get(self, resource_group): + response = self.client.scheduled_actions.get( + name="str", ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_scheduled_actions_list_by_scope(self, resource_group): - response = self.client.scheduled_actions.list_by_scope( - scope="str", - api_version="2025-03-01", - ) - result = [r for r in response] # please add some check logic here by yourself # ... @@ -45,31 +34,34 @@ def test_scheduled_actions_create_or_update(self, resource_group): response = self.client.scheduled_actions.create_or_update( name="str", scheduled_action={ - "displayName": "str", "eTag": "str", - "fileDestination": {"fileFormats": ["str"]}, "id": "str", "kind": "str", "name": "str", - "notification": { - "subject": "str", - "to": ["str"], - "language": "str", - "message": "str", - "regionalFormat": "str", + "properties": { + "displayName": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "status": "str", + "viewId": "str", + "fileDestination": {"fileFormats": ["str"]}, + "notificationEmail": "str", + "scope": "str", }, - "notificationEmail": "str", - "schedule": { - "endDate": "2020-02-20 00:00:00", - "frequency": "str", - "startDate": "2020-02-20 00:00:00", - "dayOfMonth": 0, - "daysOfWeek": ["str"], - "hourOfDay": 0, - "weeksOfMonth": ["str"], - }, - "scope": "str", - "status": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -79,9 +71,7 @@ def test_scheduled_actions_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "viewId": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -89,10 +79,9 @@ def test_scheduled_actions_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_scheduled_actions_get(self, resource_group): - response = self.client.scheduled_actions.get( + def test_scheduled_actions_delete(self, resource_group): + response = self.client.scheduled_actions.delete( name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -100,10 +89,28 @@ def test_scheduled_actions_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_scheduled_actions_delete(self, resource_group): - response = self.client.scheduled_actions.delete( + def test_scheduled_actions_list(self, resource_group): + response = self.client.scheduled_actions.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_run(self, resource_group): + response = self.client.scheduled_actions.run( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_get_by_scope(self, resource_group): + response = self.client.scheduled_actions.get_by_scope( + scope="str", name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -116,31 +123,34 @@ def test_scheduled_actions_create_or_update_by_scope(self, resource_group): scope="str", name="str", scheduled_action={ - "displayName": "str", "eTag": "str", - "fileDestination": {"fileFormats": ["str"]}, "id": "str", "kind": "str", "name": "str", - "notification": { - "subject": "str", - "to": ["str"], - "language": "str", - "message": "str", - "regionalFormat": "str", + "properties": { + "displayName": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "status": "str", + "viewId": "str", + "fileDestination": {"fileFormats": ["str"]}, + "notificationEmail": "str", + "scope": "str", }, - "notificationEmail": "str", - "schedule": { - "endDate": "2020-02-20 00:00:00", - "frequency": "str", - "startDate": "2020-02-20 00:00:00", - "dayOfMonth": 0, - "daysOfWeek": ["str"], - "hourOfDay": 0, - "weeksOfMonth": ["str"], - }, - "scope": "str", - "status": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -150,21 +160,7 @@ def test_scheduled_actions_create_or_update_by_scope(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "viewId": "str", }, - api_version="2025-03-01", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_scheduled_actions_get_by_scope(self, resource_group): - response = self.client.scheduled_actions.get_by_scope( - scope="str", - name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -176,7 +172,6 @@ def test_scheduled_actions_delete_by_scope(self, resource_group): response = self.client.scheduled_actions.delete_by_scope( scope="str", name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -184,12 +179,11 @@ def test_scheduled_actions_delete_by_scope(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_scheduled_actions_run(self, resource_group): - response = self.client.scheduled_actions.run( - name="str", - api_version="2025-03-01", + def test_scheduled_actions_list_by_scope(self, resource_group): + response = self.client.scheduled_actions.list_by_scope( + scope="str", ) - + result = [r for r in response] # please add some check logic here by yourself # ... @@ -199,7 +193,6 @@ def test_scheduled_actions_run_by_scope(self, resource_group): response = self.client.scheduled_actions.run_by_scope( scope="str", name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -210,7 +203,6 @@ def test_scheduled_actions_run_by_scope(self, resource_group): def test_scheduled_actions_check_name_availability(self, resource_group): response = self.client.scheduled_actions.check_name_availability( check_name_availability_request={"name": "str", "type": "str"}, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -222,7 +214,6 @@ def test_scheduled_actions_check_name_availability_by_scope(self, resource_group response = self.client.scheduled_actions.check_name_availability_by_scope( scope="str", check_name_availability_request={"name": "str", "type": "str"}, - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py index 91697fff70a8..b638ddd96c4f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_scheduled_actions_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,22 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_scheduled_actions_list(self, resource_group): - response = self.client.scheduled_actions.list( - api_version="2025-03-01", + async def test_scheduled_actions_get(self, resource_group): + response = await self.client.scheduled_actions.get( + name="str", ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_scheduled_actions_list_by_scope(self, resource_group): - response = self.client.scheduled_actions.list_by_scope( - scope="str", - api_version="2025-03-01", - ) - result = [r async for r in response] # please add some check logic here by yourself # ... @@ -46,31 +35,34 @@ async def test_scheduled_actions_create_or_update(self, resource_group): response = await self.client.scheduled_actions.create_or_update( name="str", scheduled_action={ - "displayName": "str", "eTag": "str", - "fileDestination": {"fileFormats": ["str"]}, "id": "str", "kind": "str", "name": "str", - "notification": { - "subject": "str", - "to": ["str"], - "language": "str", - "message": "str", - "regionalFormat": "str", + "properties": { + "displayName": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "status": "str", + "viewId": "str", + "fileDestination": {"fileFormats": ["str"]}, + "notificationEmail": "str", + "scope": "str", }, - "notificationEmail": "str", - "schedule": { - "endDate": "2020-02-20 00:00:00", - "frequency": "str", - "startDate": "2020-02-20 00:00:00", - "dayOfMonth": 0, - "daysOfWeek": ["str"], - "hourOfDay": 0, - "weeksOfMonth": ["str"], - }, - "scope": "str", - "status": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -80,9 +72,7 @@ async def test_scheduled_actions_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "viewId": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -90,10 +80,9 @@ async def test_scheduled_actions_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_scheduled_actions_get(self, resource_group): - response = await self.client.scheduled_actions.get( + async def test_scheduled_actions_delete(self, resource_group): + response = await self.client.scheduled_actions.delete( name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -101,10 +90,28 @@ async def test_scheduled_actions_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_scheduled_actions_delete(self, resource_group): - response = await self.client.scheduled_actions.delete( + async def test_scheduled_actions_list(self, resource_group): + response = self.client.scheduled_actions.list() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_run(self, resource_group): + response = await self.client.scheduled_actions.run( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_get_by_scope(self, resource_group): + response = await self.client.scheduled_actions.get_by_scope( + scope="str", name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -117,31 +124,34 @@ async def test_scheduled_actions_create_or_update_by_scope(self, resource_group) scope="str", name="str", scheduled_action={ - "displayName": "str", "eTag": "str", - "fileDestination": {"fileFormats": ["str"]}, "id": "str", "kind": "str", "name": "str", - "notification": { - "subject": "str", - "to": ["str"], - "language": "str", - "message": "str", - "regionalFormat": "str", + "properties": { + "displayName": "str", + "notification": { + "subject": "str", + "to": ["str"], + "language": "str", + "message": "str", + "regionalFormat": "str", + }, + "schedule": { + "endDate": "2020-02-20 00:00:00", + "frequency": "str", + "startDate": "2020-02-20 00:00:00", + "dayOfMonth": 0, + "daysOfWeek": ["str"], + "hourOfDay": 0, + "weeksOfMonth": ["str"], + }, + "status": "str", + "viewId": "str", + "fileDestination": {"fileFormats": ["str"]}, + "notificationEmail": "str", + "scope": "str", }, - "notificationEmail": "str", - "schedule": { - "endDate": "2020-02-20 00:00:00", - "frequency": "str", - "startDate": "2020-02-20 00:00:00", - "dayOfMonth": 0, - "daysOfWeek": ["str"], - "hourOfDay": 0, - "weeksOfMonth": ["str"], - }, - "scope": "str", - "status": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -151,21 +161,7 @@ async def test_scheduled_actions_create_or_update_by_scope(self, resource_group) "lastModifiedByType": "str", }, "type": "str", - "viewId": "str", }, - api_version="2025-03-01", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_scheduled_actions_get_by_scope(self, resource_group): - response = await self.client.scheduled_actions.get_by_scope( - scope="str", - name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -177,7 +173,6 @@ async def test_scheduled_actions_delete_by_scope(self, resource_group): response = await self.client.scheduled_actions.delete_by_scope( scope="str", name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -185,12 +180,11 @@ async def test_scheduled_actions_delete_by_scope(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_scheduled_actions_run(self, resource_group): - response = await self.client.scheduled_actions.run( - name="str", - api_version="2025-03-01", + async def test_scheduled_actions_list_by_scope(self, resource_group): + response = self.client.scheduled_actions.list_by_scope( + scope="str", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -200,7 +194,6 @@ async def test_scheduled_actions_run_by_scope(self, resource_group): response = await self.client.scheduled_actions.run_by_scope( scope="str", name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -211,7 +204,6 @@ async def test_scheduled_actions_run_by_scope(self, resource_group): async def test_scheduled_actions_check_name_availability(self, resource_group): response = await self.client.scheduled_actions.check_name_availability( check_name_availability_request={"name": "str", "type": "str"}, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -223,7 +215,6 @@ async def test_scheduled_actions_check_name_availability_by_scope(self, resource response = await self.client.scheduled_actions.check_name_availability_by_scope( scope="str", check_name_availability_request={"name": "str", "type": "str"}, - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py index 637dc5f9caf0..1155c90d3b6b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,10 +20,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_settings_list(self, resource_group): - response = self.client.settings.list( + def test_settings_get_by_scope(self, resource_group): + response = self.client.settings.get_by_scope( scope="str", - api_version="2025-03-01", + type="str", ) # please add some check logic here by yourself @@ -40,9 +40,16 @@ def test_settings_create_or_update_by_scope(self, resource_group): "id": "str", "name": "str", "properties": {"preferContainerTags": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -50,11 +57,10 @@ def test_settings_create_or_update_by_scope(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_settings_get_by_scope(self, resource_group): - response = self.client.settings.get_by_scope( + def test_settings_delete_by_scope(self, resource_group): + response = self.client.settings.delete_by_scope( scope="str", type="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -62,11 +68,9 @@ def test_settings_get_by_scope(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_settings_delete_by_scope(self, resource_group): - response = self.client.settings.delete_by_scope( + def test_settings_list(self, resource_group): + response = self.client.settings.list( scope="str", - type="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py index 913586d98497..389f59999790 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_settings_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,10 +21,10 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_settings_list(self, resource_group): - response = await self.client.settings.list( + async def test_settings_get_by_scope(self, resource_group): + response = await self.client.settings.get_by_scope( scope="str", - api_version="2025-03-01", + type="str", ) # please add some check logic here by yourself @@ -41,9 +41,16 @@ async def test_settings_create_or_update_by_scope(self, resource_group): "id": "str", "name": "str", "properties": {"preferContainerTags": bool}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -51,11 +58,10 @@ async def test_settings_create_or_update_by_scope(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_settings_get_by_scope(self, resource_group): - response = await self.client.settings.get_by_scope( + async def test_settings_delete_by_scope(self, resource_group): + response = await self.client.settings.delete_by_scope( scope="str", type="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -63,11 +69,9 @@ async def test_settings_get_by_scope(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_settings_delete_by_scope(self, resource_group): - response = await self.client.settings.delete_by_scope( + async def test_settings_list(self, resource_group): + response = await self.client.settings.list( scope="str", - type="str", - api_version="2025-03-01", ) # please add some check logic here by yourself diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py index 9783935e971b..6fff335b6e97 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,33 +18,11 @@ class TestCostManagementViewsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_views_list(self, resource_group): - response = self.client.views.list( - api_version="2025-03-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_views_list_by_scope(self, resource_group): - response = self.client.views.list_by_scope( - scope="str", - api_version="2025-03-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_views_get(self, resource_group): response = self.client.views.get( view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -56,39 +34,51 @@ def test_views_create_or_update(self, resource_group): response = self.client.views.create_or_update( view_name="str", parameters={ - "accumulated": "str", - "chart": "str", - "createdOn": "2020-02-20 00:00:00", - "currency": "str", - "dataSet": { - "aggregation": {"str": {"function": "str", "name": "str"}}, - "configuration": {"columns": ["str"]}, - "filter": { - "and": [...], - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "or": [...], - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - }, - "granularity": "str", - "grouping": [{"name": "str", "type": "str"}], - "sorting": [{"name": "str", "direction": "str"}], - }, - "dateRange": "str", - "displayName": "str", "eTag": "str", "id": "str", - "includeMonetaryCommitment": bool, - "kpis": [{"enabled": bool, "id": "str", "type": "str"}], - "metric": "str", - "modifiedOn": "2020-02-20 00:00:00", "name": "str", - "pivots": [{"name": "str", "type": "str"}], - "scope": "str", - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - "timeframe": "str", + "properties": { + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dateRange": "str", + "displayName": "str", + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "pivots": [{"name": "str", "type": "str"}], + "query": { + "timeframe": "str", + "type": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "includeMonetaryCommitment": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "scope": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -99,19 +89,25 @@ def test_views_create_or_update(self, resource_group): def test_views_delete(self, resource_group): response = self.client.views.delete( view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_list(self, resource_group): + response = self.client.views.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_views_get_by_scope(self, resource_group): response = self.client.views.get_by_scope( scope="str", view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -124,39 +120,51 @@ def test_views_create_or_update_by_scope(self, resource_group): scope="str", view_name="str", parameters={ - "accumulated": "str", - "chart": "str", - "createdOn": "2020-02-20 00:00:00", - "currency": "str", - "dataSet": { - "aggregation": {"str": {"function": "str", "name": "str"}}, - "configuration": {"columns": ["str"]}, - "filter": { - "and": [...], - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "or": [...], - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - }, - "granularity": "str", - "grouping": [{"name": "str", "type": "str"}], - "sorting": [{"name": "str", "direction": "str"}], - }, - "dateRange": "str", - "displayName": "str", "eTag": "str", "id": "str", - "includeMonetaryCommitment": bool, - "kpis": [{"enabled": bool, "id": "str", "type": "str"}], - "metric": "str", - "modifiedOn": "2020-02-20 00:00:00", "name": "str", - "pivots": [{"name": "str", "type": "str"}], - "scope": "str", - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - "timeframe": "str", + "properties": { + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dateRange": "str", + "displayName": "str", + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "pivots": [{"name": "str", "type": "str"}], + "query": { + "timeframe": "str", + "type": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "includeMonetaryCommitment": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "scope": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -168,8 +176,17 @@ def test_views_delete_by_scope(self, resource_group): response = self.client.views.delete_by_scope( scope="str", view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_views_list_by_scope(self, resource_group): + response = self.client.views.list_by_scope( + scope="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py index 81be82c607dc..0e1c6c5caac0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_views_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,33 +19,11 @@ class TestCostManagementViewsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(CostManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_views_list(self, resource_group): - response = self.client.views.list( - api_version="2025-03-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_views_list_by_scope(self, resource_group): - response = self.client.views.list_by_scope( - scope="str", - api_version="2025-03-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_views_get(self, resource_group): response = await self.client.views.get( view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -57,39 +35,51 @@ async def test_views_create_or_update(self, resource_group): response = await self.client.views.create_or_update( view_name="str", parameters={ - "accumulated": "str", - "chart": "str", - "createdOn": "2020-02-20 00:00:00", - "currency": "str", - "dataSet": { - "aggregation": {"str": {"function": "str", "name": "str"}}, - "configuration": {"columns": ["str"]}, - "filter": { - "and": [...], - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "or": [...], - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - }, - "granularity": "str", - "grouping": [{"name": "str", "type": "str"}], - "sorting": [{"name": "str", "direction": "str"}], - }, - "dateRange": "str", - "displayName": "str", "eTag": "str", "id": "str", - "includeMonetaryCommitment": bool, - "kpis": [{"enabled": bool, "id": "str", "type": "str"}], - "metric": "str", - "modifiedOn": "2020-02-20 00:00:00", "name": "str", - "pivots": [{"name": "str", "type": "str"}], - "scope": "str", - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - "timeframe": "str", + "properties": { + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dateRange": "str", + "displayName": "str", + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "pivots": [{"name": "str", "type": "str"}], + "query": { + "timeframe": "str", + "type": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "includeMonetaryCommitment": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "scope": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -100,19 +90,25 @@ async def test_views_create_or_update(self, resource_group): async def test_views_delete(self, resource_group): response = await self.client.views.delete( view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_list(self, resource_group): + response = self.client.views.list() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_views_get_by_scope(self, resource_group): response = await self.client.views.get_by_scope( scope="str", view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -125,39 +121,51 @@ async def test_views_create_or_update_by_scope(self, resource_group): scope="str", view_name="str", parameters={ - "accumulated": "str", - "chart": "str", - "createdOn": "2020-02-20 00:00:00", - "currency": "str", - "dataSet": { - "aggregation": {"str": {"function": "str", "name": "str"}}, - "configuration": {"columns": ["str"]}, - "filter": { - "and": [...], - "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, - "or": [...], - "tags": {"name": "str", "operator": "str", "values": ["str"]}, - }, - "granularity": "str", - "grouping": [{"name": "str", "type": "str"}], - "sorting": [{"name": "str", "direction": "str"}], - }, - "dateRange": "str", - "displayName": "str", "eTag": "str", "id": "str", - "includeMonetaryCommitment": bool, - "kpis": [{"enabled": bool, "id": "str", "type": "str"}], - "metric": "str", - "modifiedOn": "2020-02-20 00:00:00", "name": "str", - "pivots": [{"name": "str", "type": "str"}], - "scope": "str", - "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, - "timeframe": "str", + "properties": { + "accumulated": "str", + "chart": "str", + "createdOn": "2020-02-20 00:00:00", + "currency": "str", + "dateRange": "str", + "displayName": "str", + "kpis": [{"enabled": bool, "id": "str", "type": "str"}], + "metric": "str", + "modifiedOn": "2020-02-20 00:00:00", + "pivots": [{"name": "str", "type": "str"}], + "query": { + "timeframe": "str", + "type": "str", + "dataSet": { + "aggregation": {"str": {"function": "str", "name": "str"}}, + "configuration": {"columns": ["str"]}, + "filter": { + "and": [...], + "dimensions": {"name": "str", "operator": "str", "values": ["str"]}, + "or": [...], + "tags": {"name": "str", "operator": "str", "values": ["str"]}, + }, + "granularity": "str", + "grouping": [{"name": "str", "type": "str"}], + "sorting": [{"name": "str", "direction": "str"}], + }, + "includeMonetaryCommitment": bool, + "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"}, + }, + "scope": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-03-01", ) # please add some check logic here by yourself @@ -169,8 +177,17 @@ async def test_views_delete_by_scope(self, resource_group): response = await self.client.views.delete_by_scope( scope="str", view_name="str", - api_version="2025-03-01", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_views_list_by_scope(self, resource_group): + response = self.client.views.list_by_scope( + scope="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml b/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml index c5098ca61f99..feb9f4d4e124 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml +++ b/sdk/costmanagement/azure-mgmt-costmanagement/pyproject.toml @@ -17,13 +17,12 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] -requires-python = ">=3.9" +requires-python = ">=3.10" keywords = [ "azure", "azure sdk", diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/tsp-location.yaml b/sdk/costmanagement/azure-mgmt-costmanagement/tsp-location.yaml new file mode 100644 index 000000000000..8528fec0edf3 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement +commit: 7089f3d2a4ed7e765d66f5f5e3be0b8b1eed6c1a +repo: Azure/azure-rest-api-specs +additionalDirectories: From 69bdb56f1fa9d7e6f870b6e849e6b1d6ffc570ff Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 25 May 2026 16:19:58 +0800 Subject: [PATCH 3/5] changelog from report comparison --- .../azure-mgmt-costmanagement/CHANGELOG.md | 146 +++++++++++++++++- 1 file changed, 145 insertions(+), 1 deletion(-) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md index 6c7995cd4bcf..5542c07492c0 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md +++ b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md @@ -2,7 +2,151 @@ ## 4.1.0 (2026-05-25) -skip changelog generation +### Features Added + + - Client `CostManagementClient` added method `send_request` + - Model `Alert` added property `system_data` + - Model `BenefitRecommendationModel` added property `system_data` + - Model `BenefitResource` added property `system_data` + - Model `BenefitUtilizationSummary` added property `system_data` + - Model `Budget` added property `system_data` + - Model `BudgetComparisonExpression` added property `values_property` + - Model `CostAllocationRuleDefinition` added property `system_data` + - Model `CostDetailsOperationResults` added property `manifest` + - Model `Export` added property `properties` + - Model `Export` added property `system_data` + - Model `ForecastComparisonExpression` added property `values_property` + - Model `ForecastResult` added property `properties` + - Model `GenerateDetailedCostReportOperationResult` added property `properties` + - Model `GenerateDetailedCostReportOperationResult` added property `system_data` + - Model `GenerateDetailedCostReportOperationStatuses` added property `properties` + - Model `GenerateDetailedCostReportOperationStatuses` added property `system_data` + - Model `IncludedQuantityUtilizationSummary` added property `properties` + - Model `IncludedQuantityUtilizationSummary` added property `system_data` + - Model `OperationStatus` added property `properties` + - Model `ProxyResource` added property `system_data` + - Model `QueryComparisonExpression` added property `values_property` + - Model `QueryResult` added property `properties` + - Model `ReportConfigComparisonExpression` added property `values_property` + - Model `Resource` added property `system_data` + - Model `SavingsPlanUtilizationSummary` added property `properties` + - Model `SavingsPlanUtilizationSummary` added property `system_data` + - Model `Setting` added property `system_data` + - Model `SourceCostAllocationResource` added property `values_property` + - Model `TagInheritanceSetting` added property `system_data` + - Model `TargetCostAllocationResource` added property `values_property` + - Model `View` added property `system_data` + - Added model `ArmErrorResponse` + - Added model `ExtensionResource` + - Added model `ForecastProperties` + - Added enum `KpiTypeType` + - Added enum `PivotTypeType` + - Added model `QueryProperties` + - Added model `ReportConfigDefinition` + - Added model `ReportManifest` + - Added model `ReportURL` + - Added model `RequestContext` + - Model `ScheduledActionsOperations` added parameter `etag` in method `create_or_update` + - Model `ScheduledActionsOperations` added parameter `match_condition` in method `create_or_update` + - Model `ScheduledActionsOperations` added parameter `etag` in method `create_or_update_by_scope` + - Model `ScheduledActionsOperations` added parameter `match_condition` in method `create_or_update_by_scope` + +### Breaking Changes + + - Model `BudgetComparisonExpression` deleted or renamed its instance variable `values` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `manifest_version` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `data_format` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `byte_count` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `blob_count` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `compress_data` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `blobs` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `request_scope` + - Model `CostDetailsOperationResults` deleted or renamed its instance variable `request_body` + - Model `DismissAlertPayload` deleted or renamed its instance variable `definition` + - Model `DismissAlertPayload` deleted or renamed its instance variable `description` + - Model `DismissAlertPayload` deleted or renamed its instance variable `source` + - Model `DismissAlertPayload` deleted or renamed its instance variable `details` + - Model `DismissAlertPayload` deleted or renamed its instance variable `cost_entity_id` + - Model `DismissAlertPayload` deleted or renamed its instance variable `status` + - Model `DismissAlertPayload` deleted or renamed its instance variable `creation_time` + - Model `DismissAlertPayload` deleted or renamed its instance variable `close_time` + - Model `DismissAlertPayload` deleted or renamed its instance variable `modification_time` + - Model `DismissAlertPayload` deleted or renamed its instance variable `status_modification_user_name` + - Model `DismissAlertPayload` deleted or renamed its instance variable `status_modification_time` + - Model `Export` deleted or renamed its instance variable `format` + - Model `Export` deleted or renamed its instance variable `delivery_info` + - Model `Export` deleted or renamed its instance variable `definition` + - Model `Export` deleted or renamed its instance variable `run_history` + - Model `Export` deleted or renamed its instance variable `partition_data` + - Model `Export` deleted or renamed its instance variable `data_overwrite_behavior` + - Model `Export` deleted or renamed its instance variable `compression_mode` + - Model `Export` deleted or renamed its instance variable `export_description` + - Model `Export` deleted or renamed its instance variable `next_run_time_estimate` + - Model `Export` deleted or renamed its instance variable `system_suspension_context` + - Model `Export` deleted or renamed its instance variable `schedule` + - Model `ForecastComparisonExpression` deleted or renamed its instance variable `values` + - Model `ForecastResult` deleted or renamed its instance variable `next_link` + - Model `ForecastResult` deleted or renamed its instance variable `columns` + - Model `ForecastResult` deleted or renamed its instance variable `rows` + - Model `GenerateDetailedCostReportOperationResult` deleted or renamed its instance variable `expiry_time` + - Model `GenerateDetailedCostReportOperationResult` deleted or renamed its instance variable `valid_till` + - Model `GenerateDetailedCostReportOperationResult` deleted or renamed its instance variable `download_url` + - Model `GenerateDetailedCostReportOperationStatuses` deleted or renamed its instance variable `expiry_time` + - Model `GenerateDetailedCostReportOperationStatuses` deleted or renamed its instance variable `valid_till` + - Model `GenerateDetailedCostReportOperationStatuses` deleted or renamed its instance variable `download_url` + - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `arm_sku_name` + - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `benefit_id` + - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `benefit_order_id` + - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `benefit_type` + - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `usage_date` + - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `utilization_percentage` + - Model `OperationStatus` deleted or renamed its instance variable `report_url` + - Model `OperationStatus` deleted or renamed its instance variable `valid_until` + - Deleted or renamed enum value `OperationStatusType.COMPLETE` + - Model `QueryComparisonExpression` deleted or renamed its instance variable `values` + - Model `QueryResult` deleted or renamed its instance variable `next_link` + - Model `QueryResult` deleted or renamed its instance variable `columns` + - Model `QueryResult` deleted or renamed its instance variable `rows` + - Model `ReportConfigComparisonExpression` deleted or renamed its instance variable `values` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `arm_sku_name` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `benefit_id` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `benefit_order_id` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `benefit_type` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `usage_date` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `avg_utilization_percentage` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `min_utilization_percentage` + - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `max_utilization_percentage` + - Model `SourceCostAllocationResource` deleted or renamed its instance variable `values` + - Model `TargetCostAllocationResource` deleted or renamed its instance variable `values` + - Deleted or renamed model `CostAllocationRuleList` + - Deleted or renamed model `EAPriceSheetProperties` + - Deleted or renamed model `ErrorDetailAutoGenerated` + - Deleted or renamed model `ErrorResponseAutoGenerated` + - Deleted or renamed model `ErrorResponseAutoGenerated2` + - Deleted or renamed model `KpiType` + - Deleted or renamed model `OperationStatusAutoGenerated` + - Deleted or renamed model `PivotType` + - Deleted or renamed model `ScheduledActionProxyResource` + - Method `BenefitRecommendationsOperations.list` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` + - Method `BenefitRecommendationsOperations.list` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Method `BenefitUtilizationSummariesOperations.list_by_billing_account_id` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` + - Method `BenefitUtilizationSummariesOperations.list_by_billing_profile_id` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` + - Method `BenefitUtilizationSummariesOperations.list_by_savings_plan_id` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` + - Method `BenefitUtilizationSummariesOperations.list_by_savings_plan_order` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` + - Method `DimensionsOperations.by_external_cloud_provider_type` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Method `DimensionsOperations.by_external_cloud_provider_type` changed its parameter `skiptoken` from `positional_or_keyword` to `keyword_only` + - Method `DimensionsOperations.list` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Method `DimensionsOperations.list` changed its parameter `skiptoken` from `positional_or_keyword` to `keyword_only` + - Method `ExportsOperations.get` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Method `ExportsOperations.list` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Method `GenerateReservationDetailsReportOperations.begin_by_billing_account_id` changed its parameter `start_date` from `positional_or_keyword` to `keyword_only` + - Method `GenerateReservationDetailsReportOperations.begin_by_billing_account_id` changed its parameter `end_date` from `positional_or_keyword` to `keyword_only` + - Method `GenerateReservationDetailsReportOperations.begin_by_billing_profile_id` changed its parameter `start_date` from `positional_or_keyword` to `keyword_only` + - Method `GenerateReservationDetailsReportOperations.begin_by_billing_profile_id` changed its parameter `end_date` from `positional_or_keyword` to `keyword_only` + - Method `ScheduledActionsOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `ScheduledActionsOperations.create_or_update_by_scope` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `PriceSheetOperations.begin_download_by_billing_account` changed return type from `AsyncLROPoller[OperationStatusAutoGenerated]` to `AsyncLROPoller[OperationStatus]` + - Method `PriceSheetOperations.begin_download_by_billing_account` changed return type from `LROPoller[OperationStatusAutoGenerated]` to `LROPoller[OperationStatus]` ## 4.0.1 (2023-07-19) From aed7d1a8eb6936ba13acb8550d1947c6dff84ef4 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 25 May 2026 16:21:21 +0800 Subject: [PATCH 4/5] Consolidate renames in CHANGELOG for azure-mgmt-costmanagement --- sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md index 5542c07492c0..4d5bc20e894f 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md +++ b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md @@ -39,8 +39,6 @@ - Added model `ArmErrorResponse` - Added model `ExtensionResource` - Added model `ForecastProperties` - - Added enum `KpiTypeType` - - Added enum `PivotTypeType` - Added model `QueryProperties` - Added model `ReportConfigDefinition` - Added model `ReportManifest` @@ -123,9 +121,9 @@ - Deleted or renamed model `ErrorDetailAutoGenerated` - Deleted or renamed model `ErrorResponseAutoGenerated` - Deleted or renamed model `ErrorResponseAutoGenerated2` - - Deleted or renamed model `KpiType` + - Renamed enum `KpiType` to `KpiTypeType` - Deleted or renamed model `OperationStatusAutoGenerated` - - Deleted or renamed model `PivotType` + - Renamed enum `PivotType` to `PivotTypeType` - Deleted or renamed model `ScheduledActionProxyResource` - Method `BenefitRecommendationsOperations.list` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` - Method `BenefitRecommendationsOperations.list` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` From 41fc78b17b770ad36a1e02a37c0c282c39506a76 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 25 May 2026 16:29:26 +0800 Subject: [PATCH 5/5] Optimize changelog for azure-mgmt-costmanagement Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure-mgmt-costmanagement/CHANGELOG.md | 126 ++++-------------- 1 file changed, 26 insertions(+), 100 deletions(-) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md index 4d5bc20e894f..9fe7356cf9fc 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md +++ b/sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md @@ -10,112 +10,43 @@ - Model `BenefitResource` added property `system_data` - Model `BenefitUtilizationSummary` added property `system_data` - Model `Budget` added property `system_data` - - Model `BudgetComparisonExpression` added property `values_property` - Model `CostAllocationRuleDefinition` added property `system_data` - - Model `CostDetailsOperationResults` added property `manifest` - - Model `Export` added property `properties` - Model `Export` added property `system_data` - - Model `ForecastComparisonExpression` added property `values_property` - - Model `ForecastResult` added property `properties` - - Model `GenerateDetailedCostReportOperationResult` added property `properties` - Model `GenerateDetailedCostReportOperationResult` added property `system_data` - - Model `GenerateDetailedCostReportOperationStatuses` added property `properties` - Model `GenerateDetailedCostReportOperationStatuses` added property `system_data` - - Model `IncludedQuantityUtilizationSummary` added property `properties` - Model `IncludedQuantityUtilizationSummary` added property `system_data` - - Model `OperationStatus` added property `properties` - Model `ProxyResource` added property `system_data` - - Model `QueryComparisonExpression` added property `values_property` - - Model `QueryResult` added property `properties` - - Model `ReportConfigComparisonExpression` added property `values_property` - Model `Resource` added property `system_data` - - Model `SavingsPlanUtilizationSummary` added property `properties` - Model `SavingsPlanUtilizationSummary` added property `system_data` - Model `Setting` added property `system_data` - - Model `SourceCostAllocationResource` added property `values_property` - Model `TagInheritanceSetting` added property `system_data` - - Model `TargetCostAllocationResource` added property `values_property` - Model `View` added property `system_data` - Added model `ArmErrorResponse` - Added model `ExtensionResource` - - Added model `ForecastProperties` - - Added model `QueryProperties` - Added model `ReportConfigDefinition` - - Added model `ReportManifest` - - Added model `ReportURL` - - Added model `RequestContext` - - Model `ScheduledActionsOperations` added parameter `etag` in method `create_or_update` - - Model `ScheduledActionsOperations` added parameter `match_condition` in method `create_or_update` - - Model `ScheduledActionsOperations` added parameter `etag` in method `create_or_update_by_scope` - - Model `ScheduledActionsOperations` added parameter `match_condition` in method `create_or_update_by_scope` ### Breaking Changes - - Model `BudgetComparisonExpression` deleted or renamed its instance variable `values` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `manifest_version` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `data_format` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `byte_count` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `blob_count` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `compress_data` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `blobs` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `request_scope` - - Model `CostDetailsOperationResults` deleted or renamed its instance variable `request_body` - - Model `DismissAlertPayload` deleted or renamed its instance variable `definition` - - Model `DismissAlertPayload` deleted or renamed its instance variable `description` - - Model `DismissAlertPayload` deleted or renamed its instance variable `source` - - Model `DismissAlertPayload` deleted or renamed its instance variable `details` - - Model `DismissAlertPayload` deleted or renamed its instance variable `cost_entity_id` - - Model `DismissAlertPayload` deleted or renamed its instance variable `status` - - Model `DismissAlertPayload` deleted or renamed its instance variable `creation_time` - - Model `DismissAlertPayload` deleted or renamed its instance variable `close_time` - - Model `DismissAlertPayload` deleted or renamed its instance variable `modification_time` - - Model `DismissAlertPayload` deleted or renamed its instance variable `status_modification_user_name` - - Model `DismissAlertPayload` deleted or renamed its instance variable `status_modification_time` - - Model `Export` deleted or renamed its instance variable `format` - - Model `Export` deleted or renamed its instance variable `delivery_info` - - Model `Export` deleted or renamed its instance variable `definition` - - Model `Export` deleted or renamed its instance variable `run_history` - - Model `Export` deleted or renamed its instance variable `partition_data` - - Model `Export` deleted or renamed its instance variable `data_overwrite_behavior` - - Model `Export` deleted or renamed its instance variable `compression_mode` - - Model `Export` deleted or renamed its instance variable `export_description` - - Model `Export` deleted or renamed its instance variable `next_run_time_estimate` - - Model `Export` deleted or renamed its instance variable `system_suspension_context` - - Model `Export` deleted or renamed its instance variable `schedule` - - Model `ForecastComparisonExpression` deleted or renamed its instance variable `values` - - Model `ForecastResult` deleted or renamed its instance variable `next_link` - - Model `ForecastResult` deleted or renamed its instance variable `columns` - - Model `ForecastResult` deleted or renamed its instance variable `rows` - - Model `GenerateDetailedCostReportOperationResult` deleted or renamed its instance variable `expiry_time` - - Model `GenerateDetailedCostReportOperationResult` deleted or renamed its instance variable `valid_till` - - Model `GenerateDetailedCostReportOperationResult` deleted or renamed its instance variable `download_url` - - Model `GenerateDetailedCostReportOperationStatuses` deleted or renamed its instance variable `expiry_time` - - Model `GenerateDetailedCostReportOperationStatuses` deleted or renamed its instance variable `valid_till` - - Model `GenerateDetailedCostReportOperationStatuses` deleted or renamed its instance variable `download_url` - - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `arm_sku_name` - - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `benefit_id` - - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `benefit_order_id` - - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `benefit_type` - - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `usage_date` - - Model `IncludedQuantityUtilizationSummary` deleted or renamed its instance variable `utilization_percentage` - - Model `OperationStatus` deleted or renamed its instance variable `report_url` - - Model `OperationStatus` deleted or renamed its instance variable `valid_until` + - This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration. + - For the method breakings, please refer to https://aka.ms/azsdk/python/migrate/operations for migration. + - Model `BudgetComparisonExpression` renamed its instance variable `values` to `values_property` + - Model `CostDetailsOperationResults` moved instance variable `manifest_version`, `data_format`, `byte_count`, `blob_count`, `compress_data`, and `blobs` under property `manifest` whose type is `ReportManifest` + - Model `CostDetailsOperationResults` moved instance variable `request_scope` and `request_body` under property `manifest.request_context` whose type is `RequestContext` + - Model `DismissAlertPayload` moved instance variable `definition`, `description`, `source`, `details`, `cost_entity_id`, `status`, `creation_time`, `close_time`, `modification_time`, `status_modification_user_name`, and `status_modification_time` under property `properties` whose type is `AlertProperties` + - Model `Export` moved instance variable `format`, `delivery_info`, `definition`, `run_history`, `partition_data`, `data_overwrite_behavior`, `compression_mode`, `export_description`, `next_run_time_estimate`, `system_suspension_context`, and `schedule` under property `properties` whose type is `ExportProperties` + - Model `ForecastComparisonExpression` renamed its instance variable `values` to `values_property` + - Model `ForecastResult` moved instance variable `next_link`, `columns`, and `rows` under property `properties` whose type is `ForecastProperties` + - Model `GenerateDetailedCostReportOperationResult` moved instance variable `expiry_time`, `valid_till`, and `download_url` under property `properties` whose type is `DownloadURL` + - Model `GenerateDetailedCostReportOperationStatuses` moved instance variable `expiry_time`, `valid_till`, and `download_url` under property `properties` whose type is `DownloadURL` + - Model `IncludedQuantityUtilizationSummary` moved instance variable `arm_sku_name`, `benefit_id`, `benefit_order_id`, `benefit_type`, `usage_date`, and `utilization_percentage` under property `properties` whose type is `IncludedQuantityUtilizationSummaryProperties` + - Model `OperationStatus` moved instance variable `report_url` and `valid_until` under property `properties` whose type is `ReportURL` - Deleted or renamed enum value `OperationStatusType.COMPLETE` - - Model `QueryComparisonExpression` deleted or renamed its instance variable `values` - - Model `QueryResult` deleted or renamed its instance variable `next_link` - - Model `QueryResult` deleted or renamed its instance variable `columns` - - Model `QueryResult` deleted or renamed its instance variable `rows` - - Model `ReportConfigComparisonExpression` deleted or renamed its instance variable `values` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `arm_sku_name` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `benefit_id` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `benefit_order_id` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `benefit_type` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `usage_date` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `avg_utilization_percentage` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `min_utilization_percentage` - - Model `SavingsPlanUtilizationSummary` deleted or renamed its instance variable `max_utilization_percentage` - - Model `SourceCostAllocationResource` deleted or renamed its instance variable `values` - - Model `TargetCostAllocationResource` deleted or renamed its instance variable `values` + - Model `QueryComparisonExpression` renamed its instance variable `values` to `values_property` + - Model `QueryResult` moved instance variable `next_link`, `columns`, and `rows` under property `properties` whose type is `QueryProperties` + - Model `ReportConfigComparisonExpression` renamed its instance variable `values` to `values_property` + - Model `SavingsPlanUtilizationSummary` moved instance variable `arm_sku_name`, `benefit_id`, `benefit_order_id`, `benefit_type`, `usage_date`, `avg_utilization_percentage`, `min_utilization_percentage`, and `max_utilization_percentage` under property `properties` whose type is `SavingsPlanUtilizationSummaryProperties` + - Model `SourceCostAllocationResource` renamed its instance variable `values` to `values_property` + - Model `TargetCostAllocationResource` renamed its instance variable `values` to `values_property` - Deleted or renamed model `CostAllocationRuleList` - Deleted or renamed model `EAPriceSheetProperties` - Deleted or renamed model `ErrorDetailAutoGenerated` @@ -125,24 +56,19 @@ - Deleted or renamed model `OperationStatusAutoGenerated` - Renamed enum `PivotType` to `PivotTypeType` - Deleted or renamed model `ScheduledActionProxyResource` - - Method `BenefitRecommendationsOperations.list` changed its parameter `orderby` from `positional_or_keyword` to `keyword_only` - - Method `BenefitRecommendationsOperations.list` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Method `BenefitRecommendationsOperations.list` changed its parameter `orderby`/`expand` from `positional_or_keyword` to `keyword_only` - Method `BenefitUtilizationSummariesOperations.list_by_billing_account_id` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` - Method `BenefitUtilizationSummariesOperations.list_by_billing_profile_id` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` - Method `BenefitUtilizationSummariesOperations.list_by_savings_plan_id` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` - Method `BenefitUtilizationSummariesOperations.list_by_savings_plan_order` changed its parameter `grain_parameter` from `positional_or_keyword` to `keyword_only` - - Method `DimensionsOperations.by_external_cloud_provider_type` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` - - Method `DimensionsOperations.by_external_cloud_provider_type` changed its parameter `skiptoken` from `positional_or_keyword` to `keyword_only` - - Method `DimensionsOperations.list` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` - - Method `DimensionsOperations.list` changed its parameter `skiptoken` from `positional_or_keyword` to `keyword_only` + - Method `DimensionsOperations.by_external_cloud_provider_type` changed its parameter `expand`/`skiptoken` from `positional_or_keyword` to `keyword_only` + - Method `DimensionsOperations.list` changed its parameter `expand`/`skiptoken` from `positional_or_keyword` to `keyword_only` - Method `ExportsOperations.get` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` - Method `ExportsOperations.list` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` - - Method `GenerateReservationDetailsReportOperations.begin_by_billing_account_id` changed its parameter `start_date` from `positional_or_keyword` to `keyword_only` - - Method `GenerateReservationDetailsReportOperations.begin_by_billing_account_id` changed its parameter `end_date` from `positional_or_keyword` to `keyword_only` - - Method `GenerateReservationDetailsReportOperations.begin_by_billing_profile_id` changed its parameter `start_date` from `positional_or_keyword` to `keyword_only` - - Method `GenerateReservationDetailsReportOperations.begin_by_billing_profile_id` changed its parameter `end_date` from `positional_or_keyword` to `keyword_only` - - Method `ScheduledActionsOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` - - Method `ScheduledActionsOperations.create_or_update_by_scope` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `GenerateReservationDetailsReportOperations.begin_by_billing_account_id` changed its parameter `start_date`/`end_date` from `positional_or_keyword` to `keyword_only` + - Method `GenerateReservationDetailsReportOperations.begin_by_billing_profile_id` changed its parameter `start_date`/`end_date` from `positional_or_keyword` to `keyword_only` + - Method `ScheduledActionsOperations.create_or_update` replaced positional_or_keyword parameter `if_match` to keyword_only parameter `etag`/`match_condition` + - Method `ScheduledActionsOperations.create_or_update_by_scope` replaced positional_or_keyword parameter `if_match` to keyword_only parameter `etag`/`match_condition` - Method `PriceSheetOperations.begin_download_by_billing_account` changed return type from `AsyncLROPoller[OperationStatusAutoGenerated]` to `AsyncLROPoller[OperationStatus]` - Method `PriceSheetOperations.begin_download_by_billing_account` changed return type from `LROPoller[OperationStatusAutoGenerated]` to `LROPoller[OperationStatus]`