diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py index 174cb5eeba42c..44f102be75923 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py @@ -14,12 +14,11 @@ from ._configuration import AzureReservationAPIConfiguration from .operations import AzureReservationAPIOperationsMixin -from .operations import QuotaOperations -from .operations import QuotaRequestStatusOperations -from .operations import AutoQuotaIncreaseOperations -from .operations import ReservationOperations from .operations import ReservationOrderOperations +from .operations import ReservationOperations from .operations import OperationOperations +from .operations import QuotaOperations +from .operations import QuotaRequestStatusOperations from . import models @@ -29,18 +28,16 @@ class AzureReservationAPI(AzureReservationAPIOperationsMixin, SDKClient): :ivar config: Configuration for client. :vartype config: AzureReservationAPIConfiguration - :ivar quota: Quota operations - :vartype quota: azure.mgmt.reservations.operations.QuotaOperations - :ivar quota_request_status: QuotaRequestStatus operations - :vartype quota_request_status: azure.mgmt.reservations.operations.QuotaRequestStatusOperations - :ivar auto_quota_increase: AutoQuotaIncrease operations - :vartype auto_quota_increase: azure.mgmt.reservations.operations.AutoQuotaIncreaseOperations - :ivar reservation: Reservation operations - :vartype reservation: azure.mgmt.reservations.operations.ReservationOperations :ivar reservation_order: ReservationOrder operations :vartype reservation_order: azure.mgmt.reservations.operations.ReservationOrderOperations + :ivar reservation: Reservation operations + :vartype reservation: azure.mgmt.reservations.operations.ReservationOperations :ivar operation: Operation operations :vartype operation: azure.mgmt.reservations.operations.OperationOperations + :ivar quota: Quota operations + :vartype quota: azure.mgmt.reservations.operations.QuotaOperations + :ivar quota_request_status: QuotaRequestStatus operations + :vartype quota_request_status: azure.mgmt.reservations.operations.QuotaRequestStatusOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -58,15 +55,13 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.quota = QuotaOperations( - self._client, self.config, self._serialize, self._deserialize) - self.quota_request_status = QuotaRequestStatusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.auto_quota_increase = AutoQuotaIncreaseOperations( + self.reservation_order = ReservationOrderOperations( self._client, self.config, self._serialize, self._deserialize) self.reservation = ReservationOperations( self._client, self.config, self._serialize, self._deserialize) - self.reservation_order = ReservationOrderOperations( - self._client, self.config, self._serialize, self._deserialize) self.operation = OperationOperations( self._client, self.config, self._serialize, self._deserialize) + self.quota = QuotaOperations( + self._client, self.config, self._serialize, self._deserialize) + self.quota_request_status = QuotaRequestStatusOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py index c272e08f0dfa3..407ec2a1ba047 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py @@ -10,21 +10,12 @@ # -------------------------------------------------------------------------- try: - from ._models_py3 import Actions from ._models_py3 import AppliedReservationList from ._models_py3 import AppliedReservations - from ._models_py3 import AqiSettings - from ._models_py3 import AutoQuotaIncreaseDetail - from ._models_py3 import CalculatePriceResponse - from ._models_py3 import CalculatePriceResponseProperties - from ._models_py3 import CalculatePriceResponsePropertiesBillingCurrencyTotal - from ._models_py3 import CalculatePriceResponsePropertiesPricingCurrencyTotal from ._models_py3 import Catalog from ._models_py3 import CreateGenericQuotaRequestParameters from ._models_py3 import CurrentQuotaLimit from ._models_py3 import CurrentQuotaLimitBase - from ._models_py3 import EmailAction - from ._models_py3 import EmailActions from ._models_py3 import Error, ErrorException from ._models_py3 import ExceptionResponse, ExceptionResponseException from ._models_py3 import ExtendedErrorInfo @@ -33,13 +24,6 @@ from ._models_py3 import OperationDisplay from ._models_py3 import OperationResponse from ._models_py3 import Patch - from ._models_py3 import PatchPropertiesRenewProperties - from ._models_py3 import PaymentDetail - from ._models_py3 import PhoneAction - from ._models_py3 import Price - from ._models_py3 import Properties - from ._models_py3 import PurchaseRequest - from ._models_py3 import PurchaseRequestPropertiesReservedResourceProperties from ._models_py3 import QuotaLimitsResponse from ._models_py3 import QuotaProperties from ._models_py3 import QuotaRequestDetails @@ -47,42 +31,26 @@ from ._models_py3 import QuotaRequestProperties from ._models_py3 import QuotaRequestSubmitResponse from ._models_py3 import QuotaRequestSubmitResponse201 - from ._models_py3 import RenewPropertiesResponse - from ._models_py3 import RenewPropertiesResponseBillingCurrencyTotal - from ._models_py3 import RenewPropertiesResponsePricingCurrencyTotal from ._models_py3 import ReservationMergeProperties - from ._models_py3 import ReservationOrderBillingPlanInformation from ._models_py3 import ReservationOrderResponse from ._models_py3 import ReservationProperties from ._models_py3 import ReservationResponse from ._models_py3 import ReservationSplitProperties from ._models_py3 import ResourceName - from ._models_py3 import ScopeProperties from ._models_py3 import ServiceError from ._models_py3 import ServiceErrorDetail + from ._models_py3 import SkuCapability from ._models_py3 import SkuName - from ._models_py3 import SkuProperty from ._models_py3 import SkuRestriction from ._models_py3 import SplitRequest from ._models_py3 import SubRequest - from ._models_py3 import SubscriptionScopeProperties - from ._models_py3 import SupportRequestAction except (SyntaxError, ImportError): - from ._models import Actions from ._models import AppliedReservationList from ._models import AppliedReservations - from ._models import AqiSettings - from ._models import AutoQuotaIncreaseDetail - from ._models import CalculatePriceResponse - from ._models import CalculatePriceResponseProperties - from ._models import CalculatePriceResponsePropertiesBillingCurrencyTotal - from ._models import CalculatePriceResponsePropertiesPricingCurrencyTotal from ._models import Catalog from ._models import CreateGenericQuotaRequestParameters from ._models import CurrentQuotaLimit from ._models import CurrentQuotaLimitBase - from ._models import EmailAction - from ._models import EmailActions from ._models import Error, ErrorException from ._models import ExceptionResponse, ExceptionResponseException from ._models import ExtendedErrorInfo @@ -91,13 +59,6 @@ from ._models import OperationDisplay from ._models import OperationResponse from ._models import Patch - from ._models import PatchPropertiesRenewProperties - from ._models import PaymentDetail - from ._models import PhoneAction - from ._models import Price - from ._models import Properties - from ._models import PurchaseRequest - from ._models import PurchaseRequestPropertiesReservedResourceProperties from ._models import QuotaLimitsResponse from ._models import QuotaProperties from ._models import QuotaRequestDetails @@ -105,58 +66,35 @@ from ._models import QuotaRequestProperties from ._models import QuotaRequestSubmitResponse from ._models import QuotaRequestSubmitResponse201 - from ._models import RenewPropertiesResponse - from ._models import RenewPropertiesResponseBillingCurrencyTotal - from ._models import RenewPropertiesResponsePricingCurrencyTotal from ._models import ReservationMergeProperties - from ._models import ReservationOrderBillingPlanInformation from ._models import ReservationOrderResponse from ._models import ReservationProperties from ._models import ReservationResponse from ._models import ReservationSplitProperties from ._models import ResourceName - from ._models import ScopeProperties from ._models import ServiceError from ._models import ServiceErrorDetail + from ._models import SkuCapability from ._models import SkuName - from ._models import SkuProperty from ._models import SkuRestriction from ._models import SplitRequest from ._models import SubRequest - from ._models import SubscriptionScopeProperties - from ._models import SupportRequestAction from ._paged_models import CurrentQuotaLimitBasePaged from ._paged_models import OperationResponsePaged from ._paged_models import QuotaRequestDetailsPaged from ._paged_models import ReservationOrderResponsePaged from ._paged_models import ReservationResponsePaged from ._azure_reservation_api_enums import ( - ReservationStatusCode, - ErrorResponseCode, - ReservationBillingPlan, - ReservationTerm, - PaymentStatus, - ReservedResourceType, - InstanceFlexibility, - AppliedScopeType, + Kind, ) __all__ = [ - 'Actions', 'AppliedReservationList', 'AppliedReservations', - 'AqiSettings', - 'AutoQuotaIncreaseDetail', - 'CalculatePriceResponse', - 'CalculatePriceResponseProperties', - 'CalculatePriceResponsePropertiesBillingCurrencyTotal', - 'CalculatePriceResponsePropertiesPricingCurrencyTotal', 'Catalog', 'CreateGenericQuotaRequestParameters', 'CurrentQuotaLimit', 'CurrentQuotaLimitBase', - 'EmailAction', - 'EmailActions', 'Error', 'ErrorException', 'ExceptionResponse', 'ExceptionResponseException', 'ExtendedErrorInfo', @@ -165,13 +103,6 @@ 'OperationDisplay', 'OperationResponse', 'Patch', - 'PatchPropertiesRenewProperties', - 'PaymentDetail', - 'PhoneAction', - 'Price', - 'Properties', - 'PurchaseRequest', - 'PurchaseRequestPropertiesReservedResourceProperties', 'QuotaLimitsResponse', 'QuotaProperties', 'QuotaRequestDetails', @@ -179,37 +110,23 @@ 'QuotaRequestProperties', 'QuotaRequestSubmitResponse', 'QuotaRequestSubmitResponse201', - 'RenewPropertiesResponse', - 'RenewPropertiesResponseBillingCurrencyTotal', - 'RenewPropertiesResponsePricingCurrencyTotal', 'ReservationMergeProperties', - 'ReservationOrderBillingPlanInformation', 'ReservationOrderResponse', 'ReservationProperties', 'ReservationResponse', 'ReservationSplitProperties', 'ResourceName', - 'ScopeProperties', 'ServiceError', 'ServiceErrorDetail', + 'SkuCapability', 'SkuName', - 'SkuProperty', 'SkuRestriction', 'SplitRequest', 'SubRequest', - 'SubscriptionScopeProperties', - 'SupportRequestAction', - 'CurrentQuotaLimitBasePaged', - 'QuotaRequestDetailsPaged', - 'ReservationResponsePaged', 'ReservationOrderResponsePaged', + 'ReservationResponsePaged', 'OperationResponsePaged', - 'ReservationStatusCode', - 'ErrorResponseCode', - 'ReservationBillingPlan', - 'ReservationTerm', - 'PaymentStatus', - 'ReservedResourceType', - 'InstanceFlexibility', - 'AppliedScopeType', + 'CurrentQuotaLimitBasePaged', + 'QuotaRequestDetailsPaged', + 'Kind', ] diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_azure_reservation_api_enums.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_azure_reservation_api_enums.py index 99f064c808c89..edb8eef10ecf5 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_azure_reservation_api_enums.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_azure_reservation_api_enums.py @@ -12,129 +12,6 @@ from enum import Enum -class ReservationStatusCode(str, Enum): +class Kind(str, Enum): - none = "None" - pending = "Pending" - active = "Active" - purchase_error = "PurchaseError" - payment_instrument_error = "PaymentInstrumentError" - split = "Split" - merged = "Merged" - expired = "Expired" - succeeded = "Succeeded" - - -class ErrorResponseCode(str, Enum): - - not_specified = "NotSpecified" - internal_server_error = "InternalServerError" - server_timeout = "ServerTimeout" - authorization_failed = "AuthorizationFailed" - bad_request = "BadRequest" - client_certificate_thumbprint_not_set = "ClientCertificateThumbprintNotSet" - invalid_request_content = "InvalidRequestContent" - operation_failed = "OperationFailed" - http_method_not_supported = "HttpMethodNotSupported" - invalid_request_uri = "InvalidRequestUri" - missing_tenant_id = "MissingTenantId" - invalid_tenant_id = "InvalidTenantId" - invalid_reservation_order_id = "InvalidReservationOrderId" - invalid_reservation_id = "InvalidReservationId" - reservation_id_not_in_reservation_order = "ReservationIdNotInReservationOrder" - reservation_order_not_found = "ReservationOrderNotFound" - invalid_subscription_id = "InvalidSubscriptionId" - invalid_access_token = "InvalidAccessToken" - invalid_location_id = "InvalidLocationId" - unauthenticated_requests_throttled = "UnauthenticatedRequestsThrottled" - invalid_health_check_type = "InvalidHealthCheckType" - forbidden = "Forbidden" - billing_scope_id_cannot_be_changed = "BillingScopeIdCannotBeChanged" - applied_scopes_not_associated_with_commerce_account = "AppliedScopesNotAssociatedWithCommerceAccount" - patch_values_same_as_existing = "PatchValuesSameAsExisting" - role_assignment_creation_failed = "RoleAssignmentCreationFailed" - reservation_order_creation_failed = "ReservationOrderCreationFailed" - reservation_order_not_enabled = "ReservationOrderNotEnabled" - capacity_update_scopes_failed = "CapacityUpdateScopesFailed" - unsupported_reservation_term = "UnsupportedReservationTerm" - reservation_order_id_already_exists = "ReservationOrderIdAlreadyExists" - risk_check_failed = "RiskCheckFailed" - create_quote_failed = "CreateQuoteFailed" - activate_quote_failed = "ActivateQuoteFailed" - nonsupported_account_id = "NonsupportedAccountId" - payment_instrument_not_found = "PaymentInstrumentNotFound" - missing_applied_scopes_for_single = "MissingAppliedScopesForSingle" - no_valid_reservations_to_re_rate = "NoValidReservationsToReRate" - re_rate_only_allowed_for_ea = "ReRateOnlyAllowedForEA" - operation_cannot_be_performed_in_current_state = "OperationCannotBePerformedInCurrentState" - invalid_single_applied_scopes_count = "InvalidSingleAppliedScopesCount" - invalid_fulfillment_request_parameters = "InvalidFulfillmentRequestParameters" - not_supported_country = "NotSupportedCountry" - invalid_refund_quantity = "InvalidRefundQuantity" - purchase_error = "PurchaseError" - billing_customer_input_error = "BillingCustomerInputError" - billing_payment_instrument_soft_error = "BillingPaymentInstrumentSoftError" - billing_payment_instrument_hard_error = "BillingPaymentInstrumentHardError" - billing_transient_error = "BillingTransientError" - billing_error = "BillingError" - fulfillment_configuration_error = "FulfillmentConfigurationError" - fulfillment_out_of_stock_error = "FulfillmentOutOfStockError" - fulfillment_transient_error = "FulfillmentTransientError" - fulfillment_error = "FulfillmentError" - calculate_price_failed = "CalculatePriceFailed" - - -class ReservationBillingPlan(str, Enum): - - upfront = "Upfront" - monthly = "Monthly" - - -class ReservationTerm(str, Enum): - - p1_y = "P1Y" - p3_y = "P3Y" - - -class PaymentStatus(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - scheduled = "Scheduled" - cancelled = "Cancelled" - - -class ReservedResourceType(str, Enum): - - virtual_machines = "VirtualMachines" - sql_databases = "SqlDatabases" - suse_linux = "SuseLinux" - cosmos_db = "CosmosDb" - red_hat = "RedHat" - sql_data_warehouse = "SqlDataWarehouse" - vmware_cloud_simple = "VMwareCloudSimple" - red_hat_osa = "RedHatOsa" - databricks = "Databricks" - app_service = "AppService" - managed_disk = "ManagedDisk" - block_blob = "BlockBlob" - redis_cache = "RedisCache" - azure_data_explorer = "AzureDataExplorer" - my_sql = "MySql" - maria_db = "MariaDb" - postgre_sql = "PostgreSql" - dedicated_host = "DedicatedHost" - sap_hana = "SapHana" - sql_azure_hybrid_benefit = "SqlAzureHybridBenefit" - - -class InstanceFlexibility(str, Enum): - - on = "On" - off = "Off" - - -class AppliedScopeType(str, Enum): - - single = "Single" - shared = "Shared" + microsoft_compute = "Microsoft.Compute" diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py index f94dbebbfb054..266fd979eac3d 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py @@ -13,22 +13,6 @@ from msrest.exceptions import HttpOperationError -class Actions(Model): - """The actions for auto quota increase. - - :param email_actions: The email actions for auto quota increase. - :type email_actions: ~azure.mgmt.reservations.models.EmailActions - """ - - _attribute_map = { - 'email_actions': {'key': 'emailActions', 'type': 'EmailActions'}, - } - - def __init__(self, **kwargs): - super(Actions, self).__init__(**kwargs) - self.email_actions = kwargs.get('email_actions', None) - - class AppliedReservationList(Model): """AppliedReservationList. @@ -87,179 +71,6 @@ def __init__(self, **kwargs): self.reservation_order_ids = kwargs.get('reservation_order_ids', None) -class AqiSettings(Model): - """Settings for auto quota increase. - - :param auto_quota_increase_state: If the subscription has enabled - automatic quota increase. - :type auto_quota_increase_state: object - """ - - _attribute_map = { - 'auto_quota_increase_state': {'key': 'autoQuotaIncreaseState', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AqiSettings, self).__init__(**kwargs) - self.auto_quota_increase_state = kwargs.get('auto_quota_increase_state', None) - - -class AutoQuotaIncreaseDetail(Model): - """Auto Quota Increase settings. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The subscription Id. - :vartype id: str - :ivar name: The name of the auto quota increase. - :vartype name: str - :ivar type: The type of the resource - :vartype type: str - :param settings: Settings for automatic quota increase. - :type settings: ~azure.mgmt.reservations.models.AqiSettings - :param on_failure: The on failure Actions. - :type on_failure: ~azure.mgmt.reservations.models.Actions - :param on_success: The on success Actions. - :type on_success: ~azure.mgmt.reservations.models.Actions - :param support_ticket_action: The support ticket action. - :type support_ticket_action: - ~azure.mgmt.reservations.models.SupportRequestAction - """ - - _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'}, - 'settings': {'key': 'properties.settings', 'type': 'AqiSettings'}, - 'on_failure': {'key': 'properties.onFailure', 'type': 'Actions'}, - 'on_success': {'key': 'properties.onSuccess', 'type': 'Actions'}, - 'support_ticket_action': {'key': 'properties.supportTicketAction', 'type': 'SupportRequestAction'}, - } - - def __init__(self, **kwargs): - super(AutoQuotaIncreaseDetail, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.settings = kwargs.get('settings', None) - self.on_failure = kwargs.get('on_failure', None) - self.on_success = kwargs.get('on_success', None) - self.support_ticket_action = kwargs.get('support_ticket_action', None) - - -class CalculatePriceResponse(Model): - """CalculatePriceResponse. - - :param properties: - :type properties: - ~azure.mgmt.reservations.models.CalculatePriceResponseProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CalculatePriceResponseProperties'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponse, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class CalculatePriceResponseProperties(Model): - """CalculatePriceResponseProperties. - - :param billing_currency_total: Currency and amount that customer will be - charged in customer's local currency. Tax is not included. - :type billing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal - :param is_billing_partner_managed: True if billing is managed by Microsoft - Partner. Used only for CSP accounts. - :type is_billing_partner_managed: bool - :param reservation_order_id: GUID that represents reservation order that - can be placed after calculating price. - :type reservation_order_id: str - :param sku_title: Title of SKU that is being purchased. - :type sku_title: str - :param sku_description: Description of SKU that is being purchased. - :type sku_description: str - :param pricing_currency_total: Amount that Microsoft uses for record. Used - during refund for calculating refund limit. Tax is not included. - :type pricing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal - :param payment_schedule: - :type payment_schedule: - list[~azure.mgmt.reservations.models.PaymentDetail] - """ - - _attribute_map = { - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesBillingCurrencyTotal'}, - 'is_billing_partner_managed': {'key': 'isBillingPartnerManaged', 'type': 'bool'}, - 'reservation_order_id': {'key': 'reservationOrderId', 'type': 'str'}, - 'sku_title': {'key': 'skuTitle', 'type': 'str'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesPricingCurrencyTotal'}, - 'payment_schedule': {'key': 'paymentSchedule', 'type': '[PaymentDetail]'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponseProperties, self).__init__(**kwargs) - self.billing_currency_total = kwargs.get('billing_currency_total', None) - self.is_billing_partner_managed = kwargs.get('is_billing_partner_managed', None) - self.reservation_order_id = kwargs.get('reservation_order_id', None) - self.sku_title = kwargs.get('sku_title', None) - self.sku_description = kwargs.get('sku_description', None) - self.pricing_currency_total = kwargs.get('pricing_currency_total', None) - self.payment_schedule = kwargs.get('payment_schedule', None) - - -class CalculatePriceResponsePropertiesBillingCurrencyTotal(Model): - """Currency and amount that customer will be charged in customer's local - currency. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponsePropertiesBillingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = kwargs.get('currency_code', None) - self.amount = kwargs.get('amount', None) - - -class CalculatePriceResponsePropertiesPricingCurrencyTotal(Model): - """Amount that Microsoft uses for record. Used during refund for calculating - refund limit. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(CalculatePriceResponsePropertiesPricingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = kwargs.get('currency_code', None) - self.amount = kwargs.get('amount', None) - - class Catalog(Model): """Catalog. @@ -270,16 +81,16 @@ class Catalog(Model): :vartype resource_type: str :ivar name: The name of SKU :vartype name: str - :param billing_plans: The billing plan options available for this SKU. - :type billing_plans: dict[str, list[str or - ~azure.mgmt.reservations.models.ReservationBillingPlan]] + :ivar tier: The tier of this SKU + :vartype tier: str + :ivar size: The size of this SKU + :vartype size: str :ivar terms: Available reservation terms for this resource - :vartype terms: list[str or - ~azure.mgmt.reservations.models.ReservationTerm] + :vartype terms: list[str] :ivar locations: :vartype locations: list[str] - :ivar sku_properties: - :vartype sku_properties: list[~azure.mgmt.reservations.models.SkuProperty] + :ivar capabilities: + :vartype capabilities: list[~azure.mgmt.reservations.models.SkuCapability] :ivar restrictions: :vartype restrictions: list[~azure.mgmt.reservations.models.SkuRestriction] @@ -288,19 +99,22 @@ class Catalog(Model): _validation = { 'resource_type': {'readonly': True}, 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, 'terms': {'readonly': True}, 'locations': {'readonly': True}, - 'sku_properties': {'readonly': True}, + 'capabilities': {'readonly': True}, 'restrictions': {'readonly': True}, } _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'billing_plans': {'key': 'billingPlans', 'type': '{[str]}'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, 'terms': {'key': 'terms', 'type': '[str]'}, 'locations': {'key': 'locations', 'type': '[str]'}, - 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SkuCapability]'}, 'restrictions': {'key': 'restrictions', 'type': '[SkuRestriction]'}, } @@ -308,10 +122,11 @@ def __init__(self, **kwargs): super(Catalog, self).__init__(**kwargs) self.resource_type = None self.name = None - self.billing_plans = kwargs.get('billing_plans', None) + self.tier = None + self.size = None self.terms = None self.locations = None - self.sku_properties = None + self.capabilities = None self.restrictions = None @@ -340,14 +155,14 @@ def __init__(self, **kwargs): class CurrentQuotaLimit(Model): - """Quota limits. + """Current quota limits. Variables are only populated by the server, and will be ignored when sending a request. :param properties: Quota properties for the resource. :type properties: ~azure.mgmt.reservations.models.QuotaProperties - :ivar provisioning_state: The quota request status. + :ivar provisioning_state: The details of the quota request status. :vartype provisioning_state: object :ivar message: A user friendly message. :vartype message: str @@ -372,7 +187,7 @@ def __init__(self, **kwargs): class CurrentQuotaLimitBase(Model): - """Quota limits. + """Quota properties. :param properties: Quota properties for the resource. :type properties: ~azure.mgmt.reservations.models.QuotaProperties @@ -387,38 +202,6 @@ def __init__(self, **kwargs): self.properties = kwargs.get('properties', None) -class EmailAction(Model): - """Email Action. - - :param email_address: The email address for the action. - :type email_address: str - """ - - _attribute_map = { - 'email_address': {'key': 'emailAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EmailAction, self).__init__(**kwargs) - self.email_address = kwargs.get('email_address', None) - - -class EmailActions(Model): - """The email actions. - - :param email_addresses: The list of email actions. - :type email_addresses: list[~azure.mgmt.reservations.models.EmailAction] - """ - - _attribute_map = { - 'email_addresses': {'key': 'emailAddresses', 'type': '[EmailAction]'}, - } - - def __init__(self, **kwargs): - super(EmailActions, self).__init__(**kwargs) - self.email_addresses = kwargs.get('email_addresses', None) - - class Error(Model): """Error. @@ -448,9 +231,9 @@ def __init__(self, deserialize, response, *args): class ExceptionResponse(Model): - """The api error. + """The API error. - :param error: The api error details. + :param error: The API error details. :type error: ~azure.mgmt.reservations.models.ServiceError """ @@ -489,7 +272,7 @@ class ExtendedErrorInfo(Model): 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', 'BillingScopeIdCannotBeChanged', 'AppliedScopesNotAssociatedWithCommerceAccount', - 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', + 'AppliedScopesSameAsExisting', 'RoleAssignmentCreationFailed', 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', @@ -504,7 +287,7 @@ class ExtendedErrorInfo(Model): 'BillingError', 'FulfillmentConfigurationError', 'FulfillmentOutOfStockError', 'FulfillmentTransientError', 'FulfillmentError', 'CalculatePriceFailed' - :type code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :type code: str or ~azure.mgmt.reservations.models.enum :param message: :type message: str """ @@ -526,8 +309,7 @@ class ExtendedStatusInfo(Model): :param status_code: Possible values include: 'None', 'Pending', 'Active', 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', 'Succeeded' - :type status_code: str or - ~azure.mgmt.reservations.models.ReservationStatusCode + :type status_code: str or ~azure.mgmt.reservations.models.enum :param message: The message giving detailed information about the status code. :type message: str @@ -617,256 +399,29 @@ class Patch(Model): """Patch. :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType + :type applied_scope_type: str or ~azure.mgmt.reservations.models.enum :param applied_scopes: :type applied_scopes: list[str] - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - :param name: Name of the Reservation - :type name: str - :param renew: - :type renew: bool - :param renew_properties: - :type renew_properties: - ~azure.mgmt.reservations.models.PatchPropertiesRenewProperties """ _attribute_map = { 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - 'renew': {'key': 'properties.renew', 'type': 'bool'}, - 'renew_properties': {'key': 'properties.renewProperties', 'type': 'PatchPropertiesRenewProperties'}, } def __init__(self, **kwargs): super(Patch, self).__init__(**kwargs) self.applied_scope_type = kwargs.get('applied_scope_type', None) self.applied_scopes = kwargs.get('applied_scopes', None) - self.instance_flexibility = kwargs.get('instance_flexibility', None) - self.name = kwargs.get('name', None) - self.renew = kwargs.get('renew', None) - self.renew_properties = kwargs.get('renew_properties', None) - - -class PatchPropertiesRenewProperties(Model): - """PatchPropertiesRenewProperties. - - :param purchase_properties: - :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest - """ - - _attribute_map = { - 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, - } - - def __init__(self, **kwargs): - super(PatchPropertiesRenewProperties, self).__init__(**kwargs) - self.purchase_properties = kwargs.get('purchase_properties', None) - - -class PaymentDetail(Model): - """Information about payment related to a reservation order. - - :param due_date: Date when the payment needs to be done. - :type due_date: date - :param payment_date: Date when the transaction is completed. Is null when - it is scheduled. - :type payment_date: date - :param pricing_currency_total: Amount in pricing currency. Tax not - included. - :type pricing_currency_total: ~azure.mgmt.reservations.models.Price - :param billing_currency_total: Amount charged in Billing currency. Tax not - included. Is null for future payments - :type billing_currency_total: ~azure.mgmt.reservations.models.Price - :param billing_account: Shows the Account that is charged for this - payment. - :type billing_account: str - :param status: Possible values include: 'Succeeded', 'Failed', - 'Scheduled', 'Cancelled' - :type status: str or ~azure.mgmt.reservations.models.PaymentStatus - :param extended_status_info: - :type extended_status_info: - ~azure.mgmt.reservations.models.ExtendedStatusInfo - """ - - _attribute_map = { - 'due_date': {'key': 'dueDate', 'type': 'date'}, - 'payment_date': {'key': 'paymentDate', 'type': 'date'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'Price'}, - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'Price'}, - 'billing_account': {'key': 'billingAccount', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, - } - - def __init__(self, **kwargs): - super(PaymentDetail, self).__init__(**kwargs) - self.due_date = kwargs.get('due_date', None) - self.payment_date = kwargs.get('payment_date', None) - self.pricing_currency_total = kwargs.get('pricing_currency_total', None) - self.billing_currency_total = kwargs.get('billing_currency_total', None) - self.billing_account = kwargs.get('billing_account', None) - self.status = kwargs.get('status', None) - self.extended_status_info = kwargs.get('extended_status_info', None) - - -class PhoneAction(Model): - """Phone Action. - - :param phone_number: The phone number for the action. - :type phone_number: str - :param preferred_channel: The preferred communication channel. - :type preferred_channel: object - """ - - _attribute_map = { - 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, - 'preferred_channel': {'key': 'preferredChannel', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PhoneAction, self).__init__(**kwargs) - self.phone_number = kwargs.get('phone_number', None) - self.preferred_channel = kwargs.get('preferred_channel', None) - - -class Price(Model): - """Price. - - :param currency_code: The ISO 4217 3-letter currency code for the currency - used by this purchase record. - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(Price, self).__init__(**kwargs) - self.currency_code = kwargs.get('currency_code', None) - self.amount = kwargs.get('amount', None) - - -class Properties(Model): - """Properties. - - :param properties: - :type properties: - ~azure.mgmt.reservations.models.SubscriptionScopeProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SubscriptionScopeProperties'}, - } - - def __init__(self, **kwargs): - super(Properties, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class PurchaseRequest(Model): - """PurchaseRequest. - - :param sku: - :type sku: ~azure.mgmt.reservations.models.SkuName - :param location: The Azure Region where the reserved resource lives. - :type location: str - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', - 'VMwareCloudSimple', 'RedHatOsa', 'Databricks', 'AppService', - 'ManagedDisk', 'BlockBlob', 'RedisCache', 'AzureDataExplorer', 'MySql', - 'MariaDb', 'PostgreSql', 'DedicatedHost', 'SapHana', - 'SqlAzureHybridBenefit' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param billing_scope_id: - :type billing_scope_id: str - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param billing_plan: Possible values include: 'Upfront', 'Monthly' - :type billing_plan: str or - ~azure.mgmt.reservations.models.ReservationBillingPlan - :param quantity: - :type quantity: int - :param display_name: Friendly name of the Reservation - :type display_name: str - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param applied_scopes: - :type applied_scopes: list[str] - :param renew: - :type renew: bool - :param reserved_resource_properties: Properties specific to each reserved - resource type. Not required if not applicable. - :type reserved_resource_properties: - ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'SkuName'}, - 'location': {'key': 'location', 'type': 'str'}, - 'reserved_resource_type': {'key': 'properties.reservedResourceType', 'type': 'str'}, - 'billing_scope_id': {'key': 'properties.billingScopeId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'billing_plan': {'key': 'properties.billingPlan', 'type': 'str'}, - 'quantity': {'key': 'properties.quantity', 'type': 'int'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, - 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'renew': {'key': 'properties.renew', 'type': 'bool'}, - 'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'}, - } - - def __init__(self, **kwargs): - super(PurchaseRequest, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.location = kwargs.get('location', None) - self.reserved_resource_type = kwargs.get('reserved_resource_type', None) - self.billing_scope_id = kwargs.get('billing_scope_id', None) - self.term = kwargs.get('term', None) - self.billing_plan = kwargs.get('billing_plan', None) - self.quantity = kwargs.get('quantity', None) - self.display_name = kwargs.get('display_name', None) - self.applied_scope_type = kwargs.get('applied_scope_type', None) - self.applied_scopes = kwargs.get('applied_scopes', None) - self.renew = kwargs.get('renew', None) - self.reserved_resource_properties = kwargs.get('reserved_resource_properties', None) - - -class PurchaseRequestPropertiesReservedResourceProperties(Model): - """Properties specific to each reserved resource type. Not required if not - applicable. - - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - """ - - _attribute_map = { - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PurchaseRequestPropertiesReservedResourceProperties, self).__init__(**kwargs) - self.instance_flexibility = kwargs.get('instance_flexibility', None) class QuotaLimitsResponse(Model): - """Quota limits request response. + """Quotas (service limits) in the request response. - :param value: List of Quota limits with the quota request status. + :param value: List of quotas with the quota request status. :type value: list[~azure.mgmt.reservations.models.CurrentQuotaLimit] - :param next_link: The uri to fetch the next page of quota limits. When - there are no more pages, this is null. + :param next_link: The URI for fetching the next page of quota limits. When + no more pages exist, the value is null. :type next_link: str """ @@ -887,24 +442,24 @@ class QuotaProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param limit: The quota limit. + :param limit: Quota properties. :type limit: int - :ivar current_value: The current resource usages information. + :ivar current_value: Current usage value for the resource. :vartype current_value: int - :param unit: The units of the limit, such as - Count, Bytes, etc. Use the - unit field provided in the Get quota response. + :param unit: The limit units, such as **count** and **bytes**. Use the + unit field provided in the response of the GET quota operation. :type unit: str - :param name: Name of the resource provide by the resource Provider. Please - use this name property for quotaRequests. + :param name: Name of the resource provide by the resource provider. Use + this property for quotaRequests resource operations. :type name: ~azure.mgmt.reservations.models.ResourceName - :param resource_type: The Resource Type Name. + :param resource_type: The name of the resource type. :type resource_type: object - :ivar quota_period: The quota period over which the usage values are - summarized, such as - P1D (Per one day), PT1M (Per one minute), PT1S (Per - one second). This parameter is optional because, for some resources like - compute, the period doesn’t matter. + :ivar quota_period: The time period over which the quota usage values are + summarized. For example, P1D (per one day), PT1M (per one minute), and + PT1S (per one second). This parameter is optional because, for some + resources such as compute, the time period is irrelevant. :vartype quota_period: str - :param properties: Additional properties for the specific resource + :param properties: Additional properties for the specified resource provider. :type properties: object """ @@ -936,26 +491,25 @@ def __init__(self, **kwargs): class QuotaRequestDetails(Model): - """The details of the quota Request. + """Quota request details. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request Id. + :ivar id: Quota request ID. :vartype id: str - :ivar name: The name of the quota request. + :ivar name: Quota request name. :vartype name: str :param provisioning_state: The quota request status. :type provisioning_state: object :ivar message: User friendly status message. :vartype message: str - :ivar request_submit_time: The quota request submit time. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. + :ivar request_submit_time: The time when the quota request was submitted + using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. :vartype request_submit_time: datetime :param value: The quotaRequests. :type value: list[~azure.mgmt.reservations.models.SubRequest] - :ivar type: Type of resource. "Microsoft.Capacity/ServiceLimits" + :ivar type: Resource type :vartype type: str """ @@ -989,12 +543,12 @@ def __init__(self, **kwargs): class QuotaRequestOneResourceSubmitResponse(Model): - """Quota submit request response. + """Response for the quota submission request. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request Id. + :ivar id: The quota request ID. :vartype id: str :ivar name: The name of the quota request. :vartype name: str @@ -1004,9 +558,8 @@ class QuotaRequestOneResourceSubmitResponse(Model): :vartype provisioning_state: object :ivar message: User friendly status message. :vartype message: str - :ivar request_submit_time: The quota request submit time. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. + :ivar request_submit_time: The time when the quota request was submitted + using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. :vartype request_submit_time: datetime :param properties: Quota properties for the resource. :type properties: ~azure.mgmt.reservations.models.QuotaProperties @@ -1052,9 +605,8 @@ class QuotaRequestProperties(Model): :type provisioning_state: object :ivar message: User friendly status message. :vartype message: str - :ivar request_submit_time: The quota request submit time. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. + :ivar request_submit_time: The time when the quota request was submitted + using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. :vartype request_submit_time: datetime :param value: The quotaRequests. :type value: list[~azure.mgmt.reservations.models.SubRequest] @@ -1081,12 +633,12 @@ def __init__(self, **kwargs): class QuotaRequestSubmitResponse(Model): - """Quota submit request response. + """Response for the quota submission request. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request Id. + :ivar id: The quota request ID. :vartype id: str :ivar name: The name of the quota request. :vartype name: str @@ -1118,19 +670,19 @@ def __init__(self, **kwargs): class QuotaRequestSubmitResponse201(Model): - """The quota request submit response with request id. + """Response with request ID that the quota request was accepted. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request id. Please use the requestId to check the + :ivar id: The quota request ID. Use the requestId parameter to check the request status. :vartype id: str - :ivar name: The operation Id + :ivar name: Operation ID :vartype name: str - :ivar type: The resource type + :ivar type: Resource type :vartype type: str - :ivar provisioning_state: The quota request status. + :ivar provisioning_state: The details of the quota request status. :vartype provisioning_state: object :ivar message: A user friendly message. :vartype message: str @@ -1161,79 +713,6 @@ def __init__(self, **kwargs): self.message = None -class RenewPropertiesResponse(Model): - """RenewPropertiesResponse. - - :param purchase_properties: - :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest - :param pricing_currency_total: Amount that Microsoft uses for record. Used - during refund for calculating refund limit. Tax is not included. This is - locked price 30 days before expiry. - :type pricing_currency_total: - ~azure.mgmt.reservations.models.RenewPropertiesResponsePricingCurrencyTotal - :param billing_currency_total: Currency and amount that customer will be - charged in customer's local currency for renewal purchase. Tax is not - included. - :type billing_currency_total: - ~azure.mgmt.reservations.models.RenewPropertiesResponseBillingCurrencyTotal - """ - - _attribute_map = { - 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'RenewPropertiesResponsePricingCurrencyTotal'}, - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'RenewPropertiesResponseBillingCurrencyTotal'}, - } - - def __init__(self, **kwargs): - super(RenewPropertiesResponse, self).__init__(**kwargs) - self.purchase_properties = kwargs.get('purchase_properties', None) - self.pricing_currency_total = kwargs.get('pricing_currency_total', None) - self.billing_currency_total = kwargs.get('billing_currency_total', None) - - -class RenewPropertiesResponseBillingCurrencyTotal(Model): - """Currency and amount that customer will be charged in customer's local - currency for renewal purchase. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RenewPropertiesResponseBillingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = kwargs.get('currency_code', None) - self.amount = kwargs.get('amount', None) - - -class RenewPropertiesResponsePricingCurrencyTotal(Model): - """Amount that Microsoft uses for record. Used during refund for calculating - refund limit. Tax is not included. This is locked price 30 days before - expiry. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RenewPropertiesResponsePricingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = kwargs.get('currency_code', None) - self.amount = kwargs.get('amount', None) - - class ReservationMergeProperties(Model): """ReservationMergeProperties. @@ -1258,36 +737,6 @@ def __init__(self, **kwargs): self.merge_sources = kwargs.get('merge_sources', None) -class ReservationOrderBillingPlanInformation(Model): - """Information describing the type of billing plan for this reservation. - - :param pricing_currency_total: Amount of money to be paid for the Order. - Tax is not included. - :type pricing_currency_total: ~azure.mgmt.reservations.models.Price - :param start_date: Date when the billing plan has started. - :type start_date: date - :param next_payment_due_date: For recurring billing plans, indicates the - date when next payment will be processed. Null when total is paid off. - :type next_payment_due_date: date - :param transactions: - :type transactions: list[~azure.mgmt.reservations.models.PaymentDetail] - """ - - _attribute_map = { - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'Price'}, - 'start_date': {'key': 'startDate', 'type': 'date'}, - 'next_payment_due_date': {'key': 'nextPaymentDueDate', 'type': 'date'}, - 'transactions': {'key': 'transactions', 'type': '[PaymentDetail]'}, - } - - def __init__(self, **kwargs): - super(ReservationOrderBillingPlanInformation, self).__init__(**kwargs) - self.pricing_currency_total = kwargs.get('pricing_currency_total', None) - self.start_date = kwargs.get('start_date', None) - self.next_payment_due_date = kwargs.get('next_payment_due_date', None) - self.transactions = kwargs.get('transactions', None) - - class ReservationOrderResponse(Model): """ReservationOrderResponse. @@ -1311,18 +760,16 @@ class ReservationOrderResponse(Model): :type created_date_time: datetime :param expiry_date: This is the date when the Reservation will expire. :type expiry_date: date - :param original_quantity: + :param original_quantity: Total Quantity of the SKUs purchased in the + Reservation. :type original_quantity: int :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str - :param billing_plan: Possible values include: 'Upfront', 'Monthly' - :type billing_plan: str or - ~azure.mgmt.reservations.models.ReservationBillingPlan - :param plan_information: - :type plan_information: - ~azure.mgmt.reservations.models.ReservationOrderBillingPlanInformation + :type term: str or ~azure.mgmt.reservations.models.enum + :param provisioning_state: Possible values include: 'Creating', + 'PendingResourceHold', 'ConfirmedResourceHold', 'PendingBilling', + 'ConfirmedBilling', 'Created', 'Succeeded', 'Cancelled', 'Expired', + 'BillingFailed', 'Failed', 'Split', 'Merged' + :type provisioning_state: str or ~azure.mgmt.reservations.models.enum :param reservations: :type reservations: list[~azure.mgmt.reservations.models.ReservationResponse] @@ -1347,8 +794,6 @@ class ReservationOrderResponse(Model): 'original_quantity': {'key': 'properties.originalQuantity', 'type': 'int'}, 'term': {'key': 'properties.term', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'billing_plan': {'key': 'properties.billingPlan', 'type': 'str'}, - 'plan_information': {'key': 'properties.planInformation', 'type': 'ReservationOrderBillingPlanInformation'}, 'reservations': {'key': 'properties.reservations', 'type': '[ReservationResponse]'}, 'type': {'key': 'type', 'type': 'str'}, } @@ -1365,8 +810,6 @@ def __init__(self, **kwargs): self.original_quantity = kwargs.get('original_quantity', None) self.term = kwargs.get('term', None) self.provisioning_state = kwargs.get('provisioning_state', None) - self.billing_plan = kwargs.get('billing_plan', None) - self.plan_information = kwargs.get('plan_information', None) self.reservations = kwargs.get('reservations', None) self.type = None @@ -1377,29 +820,20 @@ class ReservationProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', - 'VMwareCloudSimple', 'RedHatOsa', 'Databricks', 'AppService', - 'ManagedDisk', 'BlockBlob', 'RedisCache', 'AzureDataExplorer', 'MySql', - 'MariaDb', 'PostgreSql', 'DedicatedHost', 'SapHana', - 'SqlAzureHybridBenefit' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility :param display_name: Friendly name for user to easily identify the reservation :type display_name: str :param applied_scopes: :type applied_scopes: list[str] :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param quantity: + :type applied_scope_type: str or ~azure.mgmt.reservations.models.enum + :param quantity: Quantity of the SKUs that are part of the Reservation. :type quantity: int - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str + :param provisioning_state: Possible values include: 'Creating', + 'PendingResourceHold', 'ConfirmedResourceHold', 'PendingBilling', + 'ConfirmedBilling', 'Created', 'Succeeded', 'Cancelled', 'Expired', + 'BillingFailed', 'Failed', 'Split', 'Merged' + :type provisioning_state: str or ~azure.mgmt.reservations.models.enum :param effective_date_time: DateTime of the Reservation starting when this version is effective from. :type effective_date_time: datetime @@ -1408,37 +842,15 @@ class ReservationProperties(Model): :vartype last_updated_date_time: datetime :param expiry_date: This is the date when the Reservation will expire. :type expiry_date: date - :param sku_description: Description of the SKU in english. - :type sku_description: str :param extended_status_info: :type extended_status_info: ~azure.mgmt.reservations.models.ExtendedStatusInfo - :param billing_plan: Possible values include: 'Upfront', 'Monthly' - :type billing_plan: str or - ~azure.mgmt.reservations.models.ReservationBillingPlan :param split_properties: :type split_properties: ~azure.mgmt.reservations.models.ReservationSplitProperties :param merge_properties: :type merge_properties: ~azure.mgmt.reservations.models.ReservationMergeProperties - :param billing_scope_id: - :type billing_scope_id: str - :param renew: - :type renew: bool - :param renew_source: Reservation Id of the reservation from which this - reservation is renewed. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. - :type renew_source: str - :param renew_destination: Reservation Id of the reservation which is - purchased because of renew. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. - :type renew_destination: str - :param renew_properties: - :type renew_properties: - ~azure.mgmt.reservations.models.RenewPropertiesResponse - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm """ _validation = { @@ -1446,8 +858,6 @@ class ReservationProperties(Model): } _attribute_map = { - 'reserved_resource_type': {'key': 'reservedResourceType', 'type': 'str'}, - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'applied_scopes': {'key': 'appliedScopes', 'type': '[str]'}, 'applied_scope_type': {'key': 'appliedScopeType', 'type': 'str'}, @@ -1456,23 +866,13 @@ class ReservationProperties(Model): 'effective_date_time': {'key': 'effectiveDateTime', 'type': 'iso-8601'}, 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, 'expiry_date': {'key': 'expiryDate', 'type': 'date'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, - 'billing_plan': {'key': 'billingPlan', 'type': 'str'}, 'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'}, 'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'}, - 'billing_scope_id': {'key': 'billingScopeId', 'type': 'str'}, - 'renew': {'key': 'renew', 'type': 'bool'}, - 'renew_source': {'key': 'renewSource', 'type': 'str'}, - 'renew_destination': {'key': 'renewDestination', 'type': 'str'}, - 'renew_properties': {'key': 'renewProperties', 'type': 'RenewPropertiesResponse'}, - 'term': {'key': 'term', 'type': 'str'}, } def __init__(self, **kwargs): super(ReservationProperties, self).__init__(**kwargs) - self.reserved_resource_type = kwargs.get('reserved_resource_type', None) - self.instance_flexibility = kwargs.get('instance_flexibility', None) self.display_name = kwargs.get('display_name', None) self.applied_scopes = kwargs.get('applied_scopes', None) self.applied_scope_type = kwargs.get('applied_scope_type', None) @@ -1481,17 +881,9 @@ def __init__(self, **kwargs): self.effective_date_time = kwargs.get('effective_date_time', None) self.last_updated_date_time = None self.expiry_date = kwargs.get('expiry_date', None) - self.sku_description = kwargs.get('sku_description', None) self.extended_status_info = kwargs.get('extended_status_info', None) - self.billing_plan = kwargs.get('billing_plan', None) self.split_properties = kwargs.get('split_properties', None) self.merge_properties = kwargs.get('merge_properties', None) - self.billing_scope_id = kwargs.get('billing_scope_id', None) - self.renew = kwargs.get('renew', None) - self.renew_source = kwargs.get('renew_source', None) - self.renew_destination = kwargs.get('renew_destination', None) - self.renew_properties = kwargs.get('renew_properties', None) - self.term = kwargs.get('term', None) class ReservationResponse(Model): @@ -1500,14 +892,22 @@ class ReservationResponse(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar location: The Azure Region where the reserved resource lives. - :vartype location: str + :param location: Possible values include: 'westus', 'eastus', 'eastus2', + 'northcentralus', 'westus2', 'southcentralus', 'centralus', 'westeurope', + 'northeurope', 'eastasia', 'southeastasia', 'japaneast', 'japanwest', + 'brazilsouth', 'australiaeast', 'australiasoutheast', 'southindia', + 'westindia', 'centralindia', 'canadacentral', 'canadaeast', 'uksouth', + 'westcentralus', 'ukwest' + :type location: str or ~azure.mgmt.reservations.models.enum :param etag: :type etag: int :ivar id: Identifier of the reservation :vartype id: str :ivar name: Name of the reservation :vartype name: str + :param kind: Resource Provider type to be reserved. Possible values + include: 'Microsoft.Compute' + :type kind: str or ~azure.mgmt.reservations.models.Kind :param sku: :type sku: ~azure.mgmt.reservations.models.SkuName :param properties: @@ -1518,7 +918,6 @@ class ReservationResponse(Model): """ _validation = { - 'location': {'readonly': True}, 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, @@ -1529,6 +928,7 @@ class ReservationResponse(Model): 'etag': {'key': 'etag', 'type': 'int'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, 'sku': {'key': 'sku', 'type': 'SkuName'}, 'properties': {'key': 'properties', 'type': 'ReservationProperties'}, 'type': {'key': 'type', 'type': 'str'}, @@ -1536,10 +936,11 @@ class ReservationResponse(Model): def __init__(self, **kwargs): super(ReservationResponse, self).__init__(**kwargs) - self.location = None + self.location = kwargs.get('location', None) self.etag = kwargs.get('etag', None) self.id = None self.name = None + self.kind = kwargs.get('kind', None) self.sku = kwargs.get('sku', None) self.properties = kwargs.get('properties', None) self.type = None @@ -1570,15 +971,15 @@ def __init__(self, **kwargs): class ResourceName(Model): - """Name of the resource provide by the resource Provider. Please use this name - property for quotaRequests. + """Resource name provided by the resource provider. Use this property for + quotaRequest parameter. Variables are only populated by the server, and will be ignored when sending a request. :param value: Resource name. :type value: str - :ivar localized_value: Resource display name. + :ivar localized_value: Resource display localized name. :vartype localized_value: str """ @@ -1597,35 +998,15 @@ def __init__(self, **kwargs): self.localized_value = None -class ScopeProperties(Model): - """ScopeProperties. - - :param scope: - :type scope: str - :param valid: - :type valid: bool - """ - - _attribute_map = { - 'scope': {'key': 'scope', 'type': 'str'}, - 'valid': {'key': 'valid', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ScopeProperties, self).__init__(**kwargs) - self.scope = kwargs.get('scope', None) - self.valid = kwargs.get('valid', None) - - class ServiceError(Model): - """The api error details. + """The API error details. Variables are only populated by the server, and will be ignored when sending a request. :param code: The error code. :type code: str - :param message: The error message. + :param message: The error message text. :type message: str :ivar details: The list of error details. :vartype details: list[~azure.mgmt.reservations.models.ServiceErrorDetail] @@ -1676,40 +1057,40 @@ def __init__(self, **kwargs): self.message = None -class SkuName(Model): - """SkuName. +class SkuCapability(Model): + """SkuCapability. - :param name: + :param name: An invariant to describe the feature. :type name: str + :param value: An invariant if the feature is measured by quantity. + :type value: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, } def __init__(self, **kwargs): - super(SkuName, self).__init__(**kwargs) + super(SkuCapability, self).__init__(**kwargs) self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) -class SkuProperty(Model): - """SkuProperty. +class SkuName(Model): + """SkuName. - :param name: An invariant to describe the feature. + :param name: :type name: str - :param value: An invariant if the feature is measured by quantity. - :type value: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, } def __init__(self, **kwargs): - super(SkuProperty, self).__init__(**kwargs) + super(SkuName, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) class SkuRestriction(Model): @@ -1767,20 +1148,20 @@ class SubRequest(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar limit: The Resource limit. + :ivar limit: Quota (resource limit). :vartype limit: int - :param name: The Resource name. + :param name: The resource name. :type name: ~azure.mgmt.reservations.models.ResourceName :ivar resource_type: Resource type for which the quota check was made. :vartype resource_type: str - :param unit: The units of the limit, such as - Count, Bytes, etc. Use the - unit field provided in the Get quota response. + :param unit: The limit units, such as **count** and **bytes**. Use the + unit field provided in the response of the GET quota operation. :type unit: str :param provisioning_state: The quota request status. :type provisioning_state: object - :ivar message: User friendly status message. + :ivar message: User-friendly status message. :vartype message: str - :ivar sub_request_id: Sub request id for individual request. + :ivar sub_request_id: Sub request ID for individual request. :vartype sub_request_id: str """ @@ -1810,69 +1191,3 @@ def __init__(self, **kwargs): self.provisioning_state = kwargs.get('provisioning_state', None) self.message = None self.sub_request_id = None - - -class SubscriptionScopeProperties(Model): - """SubscriptionScopeProperties. - - :param scopes: - :type scopes: list[~azure.mgmt.reservations.models.ScopeProperties] - """ - - _attribute_map = { - 'scopes': {'key': 'scopes', 'type': '[ScopeProperties]'}, - } - - def __init__(self, **kwargs): - super(SubscriptionScopeProperties, self).__init__(**kwargs) - self.scopes = kwargs.get('scopes', None) - - -class SupportRequestAction(Model): - """The SupportRequest action. - - :param severity: The support request severity. - :type severity: object - :param first_name: The first name of the recipient. - :type first_name: str - :param last_name: The last name of the recipient. - :type last_name: str - :param country: The country of the recipient. - :type country: str - :param phone_number: The phone number of the recipient. - :type phone_number: str - :param primary_email_address: The primary email addresses of the - recipients. - :type primary_email_address: str - :param support_language: The support language. - :type support_language: str - :param preferred_contact_method: The preferred communication channel. - :type preferred_contact_method: object - :param alternate_email_addresses: The alternate email address of the - recipient. - :type alternate_email_addresses: list[str] - """ - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'object'}, - 'first_name': {'key': 'firstName', 'type': 'str'}, - 'last_name': {'key': 'lastName', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, - 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, - 'primary_email_address': {'key': 'primaryEmailAddress', 'type': 'str'}, - 'support_language': {'key': 'supportLanguage', 'type': 'str'}, - 'preferred_contact_method': {'key': 'preferredContactMethod', 'type': 'object'}, - 'alternate_email_addresses': {'key': 'alternateEmailAddresses', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(SupportRequestAction, self).__init__(**kwargs) - self.severity = kwargs.get('severity', None) - self.first_name = kwargs.get('first_name', None) - self.last_name = kwargs.get('last_name', None) - self.country = kwargs.get('country', None) - self.phone_number = kwargs.get('phone_number', None) - self.primary_email_address = kwargs.get('primary_email_address', None) - self.support_language = kwargs.get('support_language', None) - self.preferred_contact_method = kwargs.get('preferred_contact_method', None) - self.alternate_email_addresses = kwargs.get('alternate_email_addresses', None) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py index bcb0c049c4ece..a3021dad41450 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py @@ -13,22 +13,6 @@ from msrest.exceptions import HttpOperationError -class Actions(Model): - """The actions for auto quota increase. - - :param email_actions: The email actions for auto quota increase. - :type email_actions: ~azure.mgmt.reservations.models.EmailActions - """ - - _attribute_map = { - 'email_actions': {'key': 'emailActions', 'type': 'EmailActions'}, - } - - def __init__(self, *, email_actions=None, **kwargs) -> None: - super(Actions, self).__init__(**kwargs) - self.email_actions = email_actions - - class AppliedReservationList(Model): """AppliedReservationList. @@ -87,179 +71,6 @@ def __init__(self, *, reservation_order_ids=None, **kwargs) -> None: self.reservation_order_ids = reservation_order_ids -class AqiSettings(Model): - """Settings for auto quota increase. - - :param auto_quota_increase_state: If the subscription has enabled - automatic quota increase. - :type auto_quota_increase_state: object - """ - - _attribute_map = { - 'auto_quota_increase_state': {'key': 'autoQuotaIncreaseState', 'type': 'object'}, - } - - def __init__(self, *, auto_quota_increase_state=None, **kwargs) -> None: - super(AqiSettings, self).__init__(**kwargs) - self.auto_quota_increase_state = auto_quota_increase_state - - -class AutoQuotaIncreaseDetail(Model): - """Auto Quota Increase settings. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The subscription Id. - :vartype id: str - :ivar name: The name of the auto quota increase. - :vartype name: str - :ivar type: The type of the resource - :vartype type: str - :param settings: Settings for automatic quota increase. - :type settings: ~azure.mgmt.reservations.models.AqiSettings - :param on_failure: The on failure Actions. - :type on_failure: ~azure.mgmt.reservations.models.Actions - :param on_success: The on success Actions. - :type on_success: ~azure.mgmt.reservations.models.Actions - :param support_ticket_action: The support ticket action. - :type support_ticket_action: - ~azure.mgmt.reservations.models.SupportRequestAction - """ - - _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'}, - 'settings': {'key': 'properties.settings', 'type': 'AqiSettings'}, - 'on_failure': {'key': 'properties.onFailure', 'type': 'Actions'}, - 'on_success': {'key': 'properties.onSuccess', 'type': 'Actions'}, - 'support_ticket_action': {'key': 'properties.supportTicketAction', 'type': 'SupportRequestAction'}, - } - - def __init__(self, *, settings=None, on_failure=None, on_success=None, support_ticket_action=None, **kwargs) -> None: - super(AutoQuotaIncreaseDetail, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.settings = settings - self.on_failure = on_failure - self.on_success = on_success - self.support_ticket_action = support_ticket_action - - -class CalculatePriceResponse(Model): - """CalculatePriceResponse. - - :param properties: - :type properties: - ~azure.mgmt.reservations.models.CalculatePriceResponseProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CalculatePriceResponseProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CalculatePriceResponse, self).__init__(**kwargs) - self.properties = properties - - -class CalculatePriceResponseProperties(Model): - """CalculatePriceResponseProperties. - - :param billing_currency_total: Currency and amount that customer will be - charged in customer's local currency. Tax is not included. - :type billing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesBillingCurrencyTotal - :param is_billing_partner_managed: True if billing is managed by Microsoft - Partner. Used only for CSP accounts. - :type is_billing_partner_managed: bool - :param reservation_order_id: GUID that represents reservation order that - can be placed after calculating price. - :type reservation_order_id: str - :param sku_title: Title of SKU that is being purchased. - :type sku_title: str - :param sku_description: Description of SKU that is being purchased. - :type sku_description: str - :param pricing_currency_total: Amount that Microsoft uses for record. Used - during refund for calculating refund limit. Tax is not included. - :type pricing_currency_total: - ~azure.mgmt.reservations.models.CalculatePriceResponsePropertiesPricingCurrencyTotal - :param payment_schedule: - :type payment_schedule: - list[~azure.mgmt.reservations.models.PaymentDetail] - """ - - _attribute_map = { - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesBillingCurrencyTotal'}, - 'is_billing_partner_managed': {'key': 'isBillingPartnerManaged', 'type': 'bool'}, - 'reservation_order_id': {'key': 'reservationOrderId', 'type': 'str'}, - 'sku_title': {'key': 'skuTitle', 'type': 'str'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'CalculatePriceResponsePropertiesPricingCurrencyTotal'}, - 'payment_schedule': {'key': 'paymentSchedule', 'type': '[PaymentDetail]'}, - } - - def __init__(self, *, billing_currency_total=None, is_billing_partner_managed: bool=None, reservation_order_id: str=None, sku_title: str=None, sku_description: str=None, pricing_currency_total=None, payment_schedule=None, **kwargs) -> None: - super(CalculatePriceResponseProperties, self).__init__(**kwargs) - self.billing_currency_total = billing_currency_total - self.is_billing_partner_managed = is_billing_partner_managed - self.reservation_order_id = reservation_order_id - self.sku_title = sku_title - self.sku_description = sku_description - self.pricing_currency_total = pricing_currency_total - self.payment_schedule = payment_schedule - - -class CalculatePriceResponsePropertiesBillingCurrencyTotal(Model): - """Currency and amount that customer will be charged in customer's local - currency. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: - super(CalculatePriceResponsePropertiesBillingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = currency_code - self.amount = amount - - -class CalculatePriceResponsePropertiesPricingCurrencyTotal(Model): - """Amount that Microsoft uses for record. Used during refund for calculating - refund limit. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: - super(CalculatePriceResponsePropertiesPricingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = currency_code - self.amount = amount - - class Catalog(Model): """Catalog. @@ -270,16 +81,16 @@ class Catalog(Model): :vartype resource_type: str :ivar name: The name of SKU :vartype name: str - :param billing_plans: The billing plan options available for this SKU. - :type billing_plans: dict[str, list[str or - ~azure.mgmt.reservations.models.ReservationBillingPlan]] + :ivar tier: The tier of this SKU + :vartype tier: str + :ivar size: The size of this SKU + :vartype size: str :ivar terms: Available reservation terms for this resource - :vartype terms: list[str or - ~azure.mgmt.reservations.models.ReservationTerm] + :vartype terms: list[str] :ivar locations: :vartype locations: list[str] - :ivar sku_properties: - :vartype sku_properties: list[~azure.mgmt.reservations.models.SkuProperty] + :ivar capabilities: + :vartype capabilities: list[~azure.mgmt.reservations.models.SkuCapability] :ivar restrictions: :vartype restrictions: list[~azure.mgmt.reservations.models.SkuRestriction] @@ -288,30 +99,34 @@ class Catalog(Model): _validation = { 'resource_type': {'readonly': True}, 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, 'terms': {'readonly': True}, 'locations': {'readonly': True}, - 'sku_properties': {'readonly': True}, + 'capabilities': {'readonly': True}, 'restrictions': {'readonly': True}, } _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'billing_plans': {'key': 'billingPlans', 'type': '{[str]}'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, 'terms': {'key': 'terms', 'type': '[str]'}, 'locations': {'key': 'locations', 'type': '[str]'}, - 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SkuCapability]'}, 'restrictions': {'key': 'restrictions', 'type': '[SkuRestriction]'}, } - def __init__(self, *, billing_plans=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(Catalog, self).__init__(**kwargs) self.resource_type = None self.name = None - self.billing_plans = billing_plans + self.tier = None + self.size = None self.terms = None self.locations = None - self.sku_properties = None + self.capabilities = None self.restrictions = None @@ -340,14 +155,14 @@ def __init__(self, *, value=None, **kwargs) -> None: class CurrentQuotaLimit(Model): - """Quota limits. + """Current quota limits. Variables are only populated by the server, and will be ignored when sending a request. :param properties: Quota properties for the resource. :type properties: ~azure.mgmt.reservations.models.QuotaProperties - :ivar provisioning_state: The quota request status. + :ivar provisioning_state: The details of the quota request status. :vartype provisioning_state: object :ivar message: A user friendly message. :vartype message: str @@ -372,7 +187,7 @@ def __init__(self, *, properties=None, **kwargs) -> None: class CurrentQuotaLimitBase(Model): - """Quota limits. + """Quota properties. :param properties: Quota properties for the resource. :type properties: ~azure.mgmt.reservations.models.QuotaProperties @@ -387,38 +202,6 @@ def __init__(self, *, properties=None, **kwargs) -> None: self.properties = properties -class EmailAction(Model): - """Email Action. - - :param email_address: The email address for the action. - :type email_address: str - """ - - _attribute_map = { - 'email_address': {'key': 'emailAddress', 'type': 'str'}, - } - - def __init__(self, *, email_address: str=None, **kwargs) -> None: - super(EmailAction, self).__init__(**kwargs) - self.email_address = email_address - - -class EmailActions(Model): - """The email actions. - - :param email_addresses: The list of email actions. - :type email_addresses: list[~azure.mgmt.reservations.models.EmailAction] - """ - - _attribute_map = { - 'email_addresses': {'key': 'emailAddresses', 'type': '[EmailAction]'}, - } - - def __init__(self, *, email_addresses=None, **kwargs) -> None: - super(EmailActions, self).__init__(**kwargs) - self.email_addresses = email_addresses - - class Error(Model): """Error. @@ -448,9 +231,9 @@ def __init__(self, deserialize, response, *args): class ExceptionResponse(Model): - """The api error. + """The API error. - :param error: The api error details. + :param error: The API error details. :type error: ~azure.mgmt.reservations.models.ServiceError """ @@ -489,7 +272,7 @@ class ExtendedErrorInfo(Model): 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', 'BillingScopeIdCannotBeChanged', 'AppliedScopesNotAssociatedWithCommerceAccount', - 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', + 'AppliedScopesSameAsExisting', 'RoleAssignmentCreationFailed', 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', @@ -504,7 +287,7 @@ class ExtendedErrorInfo(Model): 'BillingError', 'FulfillmentConfigurationError', 'FulfillmentOutOfStockError', 'FulfillmentTransientError', 'FulfillmentError', 'CalculatePriceFailed' - :type code: str or ~azure.mgmt.reservations.models.ErrorResponseCode + :type code: str or ~azure.mgmt.reservations.models.enum :param message: :type message: str """ @@ -526,8 +309,7 @@ class ExtendedStatusInfo(Model): :param status_code: Possible values include: 'None', 'Pending', 'Active', 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', 'Succeeded' - :type status_code: str or - ~azure.mgmt.reservations.models.ReservationStatusCode + :type status_code: str or ~azure.mgmt.reservations.models.enum :param message: The message giving detailed information about the status code. :type message: str @@ -617,256 +399,29 @@ class Patch(Model): """Patch. :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType + :type applied_scope_type: str or ~azure.mgmt.reservations.models.enum :param applied_scopes: :type applied_scopes: list[str] - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - :param name: Name of the Reservation - :type name: str - :param renew: - :type renew: bool - :param renew_properties: - :type renew_properties: - ~azure.mgmt.reservations.models.PatchPropertiesRenewProperties """ _attribute_map = { 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'instance_flexibility': {'key': 'properties.instanceFlexibility', 'type': 'str'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - 'renew': {'key': 'properties.renew', 'type': 'bool'}, - 'renew_properties': {'key': 'properties.renewProperties', 'type': 'PatchPropertiesRenewProperties'}, } - def __init__(self, *, applied_scope_type=None, applied_scopes=None, instance_flexibility=None, name: str=None, renew: bool=None, renew_properties=None, **kwargs) -> None: + def __init__(self, *, applied_scope_type=None, applied_scopes=None, **kwargs) -> None: super(Patch, self).__init__(**kwargs) self.applied_scope_type = applied_scope_type self.applied_scopes = applied_scopes - self.instance_flexibility = instance_flexibility - self.name = name - self.renew = renew - self.renew_properties = renew_properties - - -class PatchPropertiesRenewProperties(Model): - """PatchPropertiesRenewProperties. - - :param purchase_properties: - :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest - """ - - _attribute_map = { - 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, - } - - def __init__(self, *, purchase_properties=None, **kwargs) -> None: - super(PatchPropertiesRenewProperties, self).__init__(**kwargs) - self.purchase_properties = purchase_properties - - -class PaymentDetail(Model): - """Information about payment related to a reservation order. - - :param due_date: Date when the payment needs to be done. - :type due_date: date - :param payment_date: Date when the transaction is completed. Is null when - it is scheduled. - :type payment_date: date - :param pricing_currency_total: Amount in pricing currency. Tax not - included. - :type pricing_currency_total: ~azure.mgmt.reservations.models.Price - :param billing_currency_total: Amount charged in Billing currency. Tax not - included. Is null for future payments - :type billing_currency_total: ~azure.mgmt.reservations.models.Price - :param billing_account: Shows the Account that is charged for this - payment. - :type billing_account: str - :param status: Possible values include: 'Succeeded', 'Failed', - 'Scheduled', 'Cancelled' - :type status: str or ~azure.mgmt.reservations.models.PaymentStatus - :param extended_status_info: - :type extended_status_info: - ~azure.mgmt.reservations.models.ExtendedStatusInfo - """ - - _attribute_map = { - 'due_date': {'key': 'dueDate', 'type': 'date'}, - 'payment_date': {'key': 'paymentDate', 'type': 'date'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'Price'}, - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'Price'}, - 'billing_account': {'key': 'billingAccount', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, - } - - def __init__(self, *, due_date=None, payment_date=None, pricing_currency_total=None, billing_currency_total=None, billing_account: str=None, status=None, extended_status_info=None, **kwargs) -> None: - super(PaymentDetail, self).__init__(**kwargs) - self.due_date = due_date - self.payment_date = payment_date - self.pricing_currency_total = pricing_currency_total - self.billing_currency_total = billing_currency_total - self.billing_account = billing_account - self.status = status - self.extended_status_info = extended_status_info - - -class PhoneAction(Model): - """Phone Action. - - :param phone_number: The phone number for the action. - :type phone_number: str - :param preferred_channel: The preferred communication channel. - :type preferred_channel: object - """ - - _attribute_map = { - 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, - 'preferred_channel': {'key': 'preferredChannel', 'type': 'object'}, - } - - def __init__(self, *, phone_number: str=None, preferred_channel=None, **kwargs) -> None: - super(PhoneAction, self).__init__(**kwargs) - self.phone_number = phone_number - self.preferred_channel = preferred_channel - - -class Price(Model): - """Price. - - :param currency_code: The ISO 4217 3-letter currency code for the currency - used by this purchase record. - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: - super(Price, self).__init__(**kwargs) - self.currency_code = currency_code - self.amount = amount - - -class Properties(Model): - """Properties. - - :param properties: - :type properties: - ~azure.mgmt.reservations.models.SubscriptionScopeProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SubscriptionScopeProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Properties, self).__init__(**kwargs) - self.properties = properties - - -class PurchaseRequest(Model): - """PurchaseRequest. - - :param sku: - :type sku: ~azure.mgmt.reservations.models.SkuName - :param location: The Azure Region where the reserved resource lives. - :type location: str - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', - 'VMwareCloudSimple', 'RedHatOsa', 'Databricks', 'AppService', - 'ManagedDisk', 'BlockBlob', 'RedisCache', 'AzureDataExplorer', 'MySql', - 'MariaDb', 'PostgreSql', 'DedicatedHost', 'SapHana', - 'SqlAzureHybridBenefit' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param billing_scope_id: - :type billing_scope_id: str - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param billing_plan: Possible values include: 'Upfront', 'Monthly' - :type billing_plan: str or - ~azure.mgmt.reservations.models.ReservationBillingPlan - :param quantity: - :type quantity: int - :param display_name: Friendly name of the Reservation - :type display_name: str - :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param applied_scopes: - :type applied_scopes: list[str] - :param renew: - :type renew: bool - :param reserved_resource_properties: Properties specific to each reserved - resource type. Not required if not applicable. - :type reserved_resource_properties: - ~azure.mgmt.reservations.models.PurchaseRequestPropertiesReservedResourceProperties - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'SkuName'}, - 'location': {'key': 'location', 'type': 'str'}, - 'reserved_resource_type': {'key': 'properties.reservedResourceType', 'type': 'str'}, - 'billing_scope_id': {'key': 'properties.billingScopeId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'billing_plan': {'key': 'properties.billingPlan', 'type': 'str'}, - 'quantity': {'key': 'properties.quantity', 'type': 'int'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'applied_scope_type': {'key': 'properties.appliedScopeType', 'type': 'str'}, - 'applied_scopes': {'key': 'properties.appliedScopes', 'type': '[str]'}, - 'renew': {'key': 'properties.renew', 'type': 'bool'}, - 'reserved_resource_properties': {'key': 'properties.reservedResourceProperties', 'type': 'PurchaseRequestPropertiesReservedResourceProperties'}, - } - - def __init__(self, *, sku=None, location: str=None, reserved_resource_type=None, billing_scope_id: str=None, term=None, billing_plan=None, quantity: int=None, display_name: str=None, applied_scope_type=None, applied_scopes=None, renew: bool=None, reserved_resource_properties=None, **kwargs) -> None: - super(PurchaseRequest, self).__init__(**kwargs) - self.sku = sku - self.location = location - self.reserved_resource_type = reserved_resource_type - self.billing_scope_id = billing_scope_id - self.term = term - self.billing_plan = billing_plan - self.quantity = quantity - self.display_name = display_name - self.applied_scope_type = applied_scope_type - self.applied_scopes = applied_scopes - self.renew = renew - self.reserved_resource_properties = reserved_resource_properties - - -class PurchaseRequestPropertiesReservedResourceProperties(Model): - """Properties specific to each reserved resource type. Not required if not - applicable. - - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility - """ - - _attribute_map = { - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, - } - - def __init__(self, *, instance_flexibility=None, **kwargs) -> None: - super(PurchaseRequestPropertiesReservedResourceProperties, self).__init__(**kwargs) - self.instance_flexibility = instance_flexibility class QuotaLimitsResponse(Model): - """Quota limits request response. + """Quotas (service limits) in the request response. - :param value: List of Quota limits with the quota request status. + :param value: List of quotas with the quota request status. :type value: list[~azure.mgmt.reservations.models.CurrentQuotaLimit] - :param next_link: The uri to fetch the next page of quota limits. When - there are no more pages, this is null. + :param next_link: The URI for fetching the next page of quota limits. When + no more pages exist, the value is null. :type next_link: str """ @@ -887,24 +442,24 @@ class QuotaProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param limit: The quota limit. + :param limit: Quota properties. :type limit: int - :ivar current_value: The current resource usages information. + :ivar current_value: Current usage value for the resource. :vartype current_value: int - :param unit: The units of the limit, such as - Count, Bytes, etc. Use the - unit field provided in the Get quota response. + :param unit: The limit units, such as **count** and **bytes**. Use the + unit field provided in the response of the GET quota operation. :type unit: str - :param name: Name of the resource provide by the resource Provider. Please - use this name property for quotaRequests. + :param name: Name of the resource provide by the resource provider. Use + this property for quotaRequests resource operations. :type name: ~azure.mgmt.reservations.models.ResourceName - :param resource_type: The Resource Type Name. + :param resource_type: The name of the resource type. :type resource_type: object - :ivar quota_period: The quota period over which the usage values are - summarized, such as - P1D (Per one day), PT1M (Per one minute), PT1S (Per - one second). This parameter is optional because, for some resources like - compute, the period doesn’t matter. + :ivar quota_period: The time period over which the quota usage values are + summarized. For example, P1D (per one day), PT1M (per one minute), and + PT1S (per one second). This parameter is optional because, for some + resources such as compute, the time period is irrelevant. :vartype quota_period: str - :param properties: Additional properties for the specific resource + :param properties: Additional properties for the specified resource provider. :type properties: object """ @@ -936,26 +491,25 @@ def __init__(self, *, limit: int=None, unit: str=None, name=None, resource_type= class QuotaRequestDetails(Model): - """The details of the quota Request. + """Quota request details. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request Id. + :ivar id: Quota request ID. :vartype id: str - :ivar name: The name of the quota request. + :ivar name: Quota request name. :vartype name: str :param provisioning_state: The quota request status. :type provisioning_state: object :ivar message: User friendly status message. :vartype message: str - :ivar request_submit_time: The quota request submit time. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. + :ivar request_submit_time: The time when the quota request was submitted + using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. :vartype request_submit_time: datetime :param value: The quotaRequests. :type value: list[~azure.mgmt.reservations.models.SubRequest] - :ivar type: Type of resource. "Microsoft.Capacity/ServiceLimits" + :ivar type: Resource type :vartype type: str """ @@ -989,12 +543,12 @@ def __init__(self, *, provisioning_state=None, value=None, **kwargs) -> None: class QuotaRequestOneResourceSubmitResponse(Model): - """Quota submit request response. + """Response for the quota submission request. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request Id. + :ivar id: The quota request ID. :vartype id: str :ivar name: The name of the quota request. :vartype name: str @@ -1004,9 +558,8 @@ class QuotaRequestOneResourceSubmitResponse(Model): :vartype provisioning_state: object :ivar message: User friendly status message. :vartype message: str - :ivar request_submit_time: The quota request submit time. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. + :ivar request_submit_time: The time when the quota request was submitted + using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. :vartype request_submit_time: datetime :param properties: Quota properties for the resource. :type properties: ~azure.mgmt.reservations.models.QuotaProperties @@ -1052,9 +605,8 @@ class QuotaRequestProperties(Model): :type provisioning_state: object :ivar message: User friendly status message. :vartype message: str - :ivar request_submit_time: The quota request submit time. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. + :ivar request_submit_time: The time when the quota request was submitted + using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. :vartype request_submit_time: datetime :param value: The quotaRequests. :type value: list[~azure.mgmt.reservations.models.SubRequest] @@ -1081,12 +633,12 @@ def __init__(self, *, provisioning_state=None, value=None, **kwargs) -> None: class QuotaRequestSubmitResponse(Model): - """Quota submit request response. + """Response for the quota submission request. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request Id. + :ivar id: The quota request ID. :vartype id: str :ivar name: The name of the quota request. :vartype name: str @@ -1118,19 +670,19 @@ def __init__(self, *, properties=None, **kwargs) -> None: class QuotaRequestSubmitResponse201(Model): - """The quota request submit response with request id. + """Response with request ID that the quota request was accepted. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The quota request id. Please use the requestId to check the + :ivar id: The quota request ID. Use the requestId parameter to check the request status. :vartype id: str - :ivar name: The operation Id + :ivar name: Operation ID :vartype name: str - :ivar type: The resource type + :ivar type: Resource type :vartype type: str - :ivar provisioning_state: The quota request status. + :ivar provisioning_state: The details of the quota request status. :vartype provisioning_state: object :ivar message: A user friendly message. :vartype message: str @@ -1161,79 +713,6 @@ def __init__(self, **kwargs) -> None: self.message = None -class RenewPropertiesResponse(Model): - """RenewPropertiesResponse. - - :param purchase_properties: - :type purchase_properties: ~azure.mgmt.reservations.models.PurchaseRequest - :param pricing_currency_total: Amount that Microsoft uses for record. Used - during refund for calculating refund limit. Tax is not included. This is - locked price 30 days before expiry. - :type pricing_currency_total: - ~azure.mgmt.reservations.models.RenewPropertiesResponsePricingCurrencyTotal - :param billing_currency_total: Currency and amount that customer will be - charged in customer's local currency for renewal purchase. Tax is not - included. - :type billing_currency_total: - ~azure.mgmt.reservations.models.RenewPropertiesResponseBillingCurrencyTotal - """ - - _attribute_map = { - 'purchase_properties': {'key': 'purchaseProperties', 'type': 'PurchaseRequest'}, - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'RenewPropertiesResponsePricingCurrencyTotal'}, - 'billing_currency_total': {'key': 'billingCurrencyTotal', 'type': 'RenewPropertiesResponseBillingCurrencyTotal'}, - } - - def __init__(self, *, purchase_properties=None, pricing_currency_total=None, billing_currency_total=None, **kwargs) -> None: - super(RenewPropertiesResponse, self).__init__(**kwargs) - self.purchase_properties = purchase_properties - self.pricing_currency_total = pricing_currency_total - self.billing_currency_total = billing_currency_total - - -class RenewPropertiesResponseBillingCurrencyTotal(Model): - """Currency and amount that customer will be charged in customer's local - currency for renewal purchase. Tax is not included. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: - super(RenewPropertiesResponseBillingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = currency_code - self.amount = amount - - -class RenewPropertiesResponsePricingCurrencyTotal(Model): - """Amount that Microsoft uses for record. Used during refund for calculating - refund limit. Tax is not included. This is locked price 30 days before - expiry. - - :param currency_code: - :type currency_code: str - :param amount: - :type amount: float - """ - - _attribute_map = { - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'amount': {'key': 'amount', 'type': 'float'}, - } - - def __init__(self, *, currency_code: str=None, amount: float=None, **kwargs) -> None: - super(RenewPropertiesResponsePricingCurrencyTotal, self).__init__(**kwargs) - self.currency_code = currency_code - self.amount = amount - - class ReservationMergeProperties(Model): """ReservationMergeProperties. @@ -1258,36 +737,6 @@ def __init__(self, *, merge_destination: str=None, merge_sources=None, **kwargs) self.merge_sources = merge_sources -class ReservationOrderBillingPlanInformation(Model): - """Information describing the type of billing plan for this reservation. - - :param pricing_currency_total: Amount of money to be paid for the Order. - Tax is not included. - :type pricing_currency_total: ~azure.mgmt.reservations.models.Price - :param start_date: Date when the billing plan has started. - :type start_date: date - :param next_payment_due_date: For recurring billing plans, indicates the - date when next payment will be processed. Null when total is paid off. - :type next_payment_due_date: date - :param transactions: - :type transactions: list[~azure.mgmt.reservations.models.PaymentDetail] - """ - - _attribute_map = { - 'pricing_currency_total': {'key': 'pricingCurrencyTotal', 'type': 'Price'}, - 'start_date': {'key': 'startDate', 'type': 'date'}, - 'next_payment_due_date': {'key': 'nextPaymentDueDate', 'type': 'date'}, - 'transactions': {'key': 'transactions', 'type': '[PaymentDetail]'}, - } - - def __init__(self, *, pricing_currency_total=None, start_date=None, next_payment_due_date=None, transactions=None, **kwargs) -> None: - super(ReservationOrderBillingPlanInformation, self).__init__(**kwargs) - self.pricing_currency_total = pricing_currency_total - self.start_date = start_date - self.next_payment_due_date = next_payment_due_date - self.transactions = transactions - - class ReservationOrderResponse(Model): """ReservationOrderResponse. @@ -1311,18 +760,16 @@ class ReservationOrderResponse(Model): :type created_date_time: datetime :param expiry_date: This is the date when the Reservation will expire. :type expiry_date: date - :param original_quantity: + :param original_quantity: Total Quantity of the SKUs purchased in the + Reservation. :type original_quantity: int :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str - :param billing_plan: Possible values include: 'Upfront', 'Monthly' - :type billing_plan: str or - ~azure.mgmt.reservations.models.ReservationBillingPlan - :param plan_information: - :type plan_information: - ~azure.mgmt.reservations.models.ReservationOrderBillingPlanInformation + :type term: str or ~azure.mgmt.reservations.models.enum + :param provisioning_state: Possible values include: 'Creating', + 'PendingResourceHold', 'ConfirmedResourceHold', 'PendingBilling', + 'ConfirmedBilling', 'Created', 'Succeeded', 'Cancelled', 'Expired', + 'BillingFailed', 'Failed', 'Split', 'Merged' + :type provisioning_state: str or ~azure.mgmt.reservations.models.enum :param reservations: :type reservations: list[~azure.mgmt.reservations.models.ReservationResponse] @@ -1347,13 +794,11 @@ class ReservationOrderResponse(Model): 'original_quantity': {'key': 'properties.originalQuantity', 'type': 'int'}, 'term': {'key': 'properties.term', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'billing_plan': {'key': 'properties.billingPlan', 'type': 'str'}, - 'plan_information': {'key': 'properties.planInformation', 'type': 'ReservationOrderBillingPlanInformation'}, 'reservations': {'key': 'properties.reservations', 'type': '[ReservationResponse]'}, 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, etag: int=None, display_name: str=None, request_date_time=None, created_date_time=None, expiry_date=None, original_quantity: int=None, term=None, provisioning_state: str=None, billing_plan=None, plan_information=None, reservations=None, **kwargs) -> None: + def __init__(self, *, etag: int=None, display_name: str=None, request_date_time=None, created_date_time=None, expiry_date=None, original_quantity: int=None, term=None, provisioning_state=None, reservations=None, **kwargs) -> None: super(ReservationOrderResponse, self).__init__(**kwargs) self.etag = etag self.id = None @@ -1365,8 +810,6 @@ def __init__(self, *, etag: int=None, display_name: str=None, request_date_time= self.original_quantity = original_quantity self.term = term self.provisioning_state = provisioning_state - self.billing_plan = billing_plan - self.plan_information = plan_information self.reservations = reservations self.type = None @@ -1377,29 +820,20 @@ class ReservationProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat', 'SqlDataWarehouse', - 'VMwareCloudSimple', 'RedHatOsa', 'Databricks', 'AppService', - 'ManagedDisk', 'BlockBlob', 'RedisCache', 'AzureDataExplorer', 'MySql', - 'MariaDb', 'PostgreSql', 'DedicatedHost', 'SapHana', - 'SqlAzureHybridBenefit' - :type reserved_resource_type: str or - ~azure.mgmt.reservations.models.ReservedResourceType - :param instance_flexibility: Possible values include: 'On', 'Off' - :type instance_flexibility: str or - ~azure.mgmt.reservations.models.InstanceFlexibility :param display_name: Friendly name for user to easily identify the reservation :type display_name: str :param applied_scopes: :type applied_scopes: list[str] :param applied_scope_type: Possible values include: 'Single', 'Shared' - :type applied_scope_type: str or - ~azure.mgmt.reservations.models.AppliedScopeType - :param quantity: + :type applied_scope_type: str or ~azure.mgmt.reservations.models.enum + :param quantity: Quantity of the SKUs that are part of the Reservation. :type quantity: int - :param provisioning_state: Current state of the reservation. - :type provisioning_state: str + :param provisioning_state: Possible values include: 'Creating', + 'PendingResourceHold', 'ConfirmedResourceHold', 'PendingBilling', + 'ConfirmedBilling', 'Created', 'Succeeded', 'Cancelled', 'Expired', + 'BillingFailed', 'Failed', 'Split', 'Merged' + :type provisioning_state: str or ~azure.mgmt.reservations.models.enum :param effective_date_time: DateTime of the Reservation starting when this version is effective from. :type effective_date_time: datetime @@ -1408,37 +842,15 @@ class ReservationProperties(Model): :vartype last_updated_date_time: datetime :param expiry_date: This is the date when the Reservation will expire. :type expiry_date: date - :param sku_description: Description of the SKU in english. - :type sku_description: str :param extended_status_info: :type extended_status_info: ~azure.mgmt.reservations.models.ExtendedStatusInfo - :param billing_plan: Possible values include: 'Upfront', 'Monthly' - :type billing_plan: str or - ~azure.mgmt.reservations.models.ReservationBillingPlan :param split_properties: :type split_properties: ~azure.mgmt.reservations.models.ReservationSplitProperties :param merge_properties: :type merge_properties: ~azure.mgmt.reservations.models.ReservationMergeProperties - :param billing_scope_id: - :type billing_scope_id: str - :param renew: - :type renew: bool - :param renew_source: Reservation Id of the reservation from which this - reservation is renewed. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. - :type renew_source: str - :param renew_destination: Reservation Id of the reservation which is - purchased because of renew. Format of the resource Id is - /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. - :type renew_destination: str - :param renew_properties: - :type renew_properties: - ~azure.mgmt.reservations.models.RenewPropertiesResponse - :param term: Possible values include: 'P1Y', 'P3Y' - :type term: str or ~azure.mgmt.reservations.models.ReservationTerm """ _validation = { @@ -1446,8 +858,6 @@ class ReservationProperties(Model): } _attribute_map = { - 'reserved_resource_type': {'key': 'reservedResourceType', 'type': 'str'}, - 'instance_flexibility': {'key': 'instanceFlexibility', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'applied_scopes': {'key': 'appliedScopes', 'type': '[str]'}, 'applied_scope_type': {'key': 'appliedScopeType', 'type': 'str'}, @@ -1456,23 +866,13 @@ class ReservationProperties(Model): 'effective_date_time': {'key': 'effectiveDateTime', 'type': 'iso-8601'}, 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, 'expiry_date': {'key': 'expiryDate', 'type': 'date'}, - 'sku_description': {'key': 'skuDescription', 'type': 'str'}, 'extended_status_info': {'key': 'extendedStatusInfo', 'type': 'ExtendedStatusInfo'}, - 'billing_plan': {'key': 'billingPlan', 'type': 'str'}, 'split_properties': {'key': 'splitProperties', 'type': 'ReservationSplitProperties'}, 'merge_properties': {'key': 'mergeProperties', 'type': 'ReservationMergeProperties'}, - 'billing_scope_id': {'key': 'billingScopeId', 'type': 'str'}, - 'renew': {'key': 'renew', 'type': 'bool'}, - 'renew_source': {'key': 'renewSource', 'type': 'str'}, - 'renew_destination': {'key': 'renewDestination', 'type': 'str'}, - 'renew_properties': {'key': 'renewProperties', 'type': 'RenewPropertiesResponse'}, - 'term': {'key': 'term', 'type': 'str'}, } - def __init__(self, *, reserved_resource_type=None, instance_flexibility=None, display_name: str=None, applied_scopes=None, applied_scope_type=None, quantity: int=None, provisioning_state: str=None, effective_date_time=None, expiry_date=None, sku_description: str=None, extended_status_info=None, billing_plan=None, split_properties=None, merge_properties=None, billing_scope_id: str=None, renew: bool=None, renew_source: str=None, renew_destination: str=None, renew_properties=None, term=None, **kwargs) -> None: + def __init__(self, *, display_name: str=None, applied_scopes=None, applied_scope_type=None, quantity: int=None, provisioning_state=None, effective_date_time=None, expiry_date=None, extended_status_info=None, split_properties=None, merge_properties=None, **kwargs) -> None: super(ReservationProperties, self).__init__(**kwargs) - self.reserved_resource_type = reserved_resource_type - self.instance_flexibility = instance_flexibility self.display_name = display_name self.applied_scopes = applied_scopes self.applied_scope_type = applied_scope_type @@ -1481,17 +881,9 @@ def __init__(self, *, reserved_resource_type=None, instance_flexibility=None, di self.effective_date_time = effective_date_time self.last_updated_date_time = None self.expiry_date = expiry_date - self.sku_description = sku_description self.extended_status_info = extended_status_info - self.billing_plan = billing_plan self.split_properties = split_properties self.merge_properties = merge_properties - self.billing_scope_id = billing_scope_id - self.renew = renew - self.renew_source = renew_source - self.renew_destination = renew_destination - self.renew_properties = renew_properties - self.term = term class ReservationResponse(Model): @@ -1500,14 +892,22 @@ class ReservationResponse(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar location: The Azure Region where the reserved resource lives. - :vartype location: str + :param location: Possible values include: 'westus', 'eastus', 'eastus2', + 'northcentralus', 'westus2', 'southcentralus', 'centralus', 'westeurope', + 'northeurope', 'eastasia', 'southeastasia', 'japaneast', 'japanwest', + 'brazilsouth', 'australiaeast', 'australiasoutheast', 'southindia', + 'westindia', 'centralindia', 'canadacentral', 'canadaeast', 'uksouth', + 'westcentralus', 'ukwest' + :type location: str or ~azure.mgmt.reservations.models.enum :param etag: :type etag: int :ivar id: Identifier of the reservation :vartype id: str :ivar name: Name of the reservation :vartype name: str + :param kind: Resource Provider type to be reserved. Possible values + include: 'Microsoft.Compute' + :type kind: str or ~azure.mgmt.reservations.models.Kind :param sku: :type sku: ~azure.mgmt.reservations.models.SkuName :param properties: @@ -1518,7 +918,6 @@ class ReservationResponse(Model): """ _validation = { - 'location': {'readonly': True}, 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, @@ -1529,17 +928,19 @@ class ReservationResponse(Model): 'etag': {'key': 'etag', 'type': 'int'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, 'sku': {'key': 'sku', 'type': 'SkuName'}, 'properties': {'key': 'properties', 'type': 'ReservationProperties'}, 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, etag: int=None, sku=None, properties=None, **kwargs) -> None: + def __init__(self, *, location=None, etag: int=None, kind=None, sku=None, properties=None, **kwargs) -> None: super(ReservationResponse, self).__init__(**kwargs) - self.location = None + self.location = location self.etag = etag self.id = None self.name = None + self.kind = kind self.sku = sku self.properties = properties self.type = None @@ -1570,15 +971,15 @@ def __init__(self, *, split_destinations=None, split_source: str=None, **kwargs) class ResourceName(Model): - """Name of the resource provide by the resource Provider. Please use this name - property for quotaRequests. + """Resource name provided by the resource provider. Use this property for + quotaRequest parameter. Variables are only populated by the server, and will be ignored when sending a request. :param value: Resource name. :type value: str - :ivar localized_value: Resource display name. + :ivar localized_value: Resource display localized name. :vartype localized_value: str """ @@ -1597,35 +998,15 @@ def __init__(self, *, value: str=None, **kwargs) -> None: self.localized_value = None -class ScopeProperties(Model): - """ScopeProperties. - - :param scope: - :type scope: str - :param valid: - :type valid: bool - """ - - _attribute_map = { - 'scope': {'key': 'scope', 'type': 'str'}, - 'valid': {'key': 'valid', 'type': 'bool'}, - } - - def __init__(self, *, scope: str=None, valid: bool=None, **kwargs) -> None: - super(ScopeProperties, self).__init__(**kwargs) - self.scope = scope - self.valid = valid - - class ServiceError(Model): - """The api error details. + """The API error details. Variables are only populated by the server, and will be ignored when sending a request. :param code: The error code. :type code: str - :param message: The error message. + :param message: The error message text. :type message: str :ivar details: The list of error details. :vartype details: list[~azure.mgmt.reservations.models.ServiceErrorDetail] @@ -1676,40 +1057,40 @@ def __init__(self, **kwargs) -> None: self.message = None -class SkuName(Model): - """SkuName. +class SkuCapability(Model): + """SkuCapability. - :param name: + :param name: An invariant to describe the feature. :type name: str + :param value: An invariant if the feature is measured by quantity. + :type value: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, *, name: str=None, **kwargs) -> None: - super(SkuName, self).__init__(**kwargs) + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(SkuCapability, self).__init__(**kwargs) self.name = name + self.value = value -class SkuProperty(Model): - """SkuProperty. +class SkuName(Model): + """SkuName. - :param name: An invariant to describe the feature. + :param name: :type name: str - :param value: An invariant if the feature is measured by quantity. - :type value: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(SkuProperty, self).__init__(**kwargs) + def __init__(self, *, name: str=None, **kwargs) -> None: + super(SkuName, self).__init__(**kwargs) self.name = name - self.value = value class SkuRestriction(Model): @@ -1767,20 +1148,20 @@ class SubRequest(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar limit: The Resource limit. + :ivar limit: Quota (resource limit). :vartype limit: int - :param name: The Resource name. + :param name: The resource name. :type name: ~azure.mgmt.reservations.models.ResourceName :ivar resource_type: Resource type for which the quota check was made. :vartype resource_type: str - :param unit: The units of the limit, such as - Count, Bytes, etc. Use the - unit field provided in the Get quota response. + :param unit: The limit units, such as **count** and **bytes**. Use the + unit field provided in the response of the GET quota operation. :type unit: str :param provisioning_state: The quota request status. :type provisioning_state: object - :ivar message: User friendly status message. + :ivar message: User-friendly status message. :vartype message: str - :ivar sub_request_id: Sub request id for individual request. + :ivar sub_request_id: Sub request ID for individual request. :vartype sub_request_id: str """ @@ -1810,69 +1191,3 @@ def __init__(self, *, name=None, unit: str=None, provisioning_state=None, **kwar self.provisioning_state = provisioning_state self.message = None self.sub_request_id = None - - -class SubscriptionScopeProperties(Model): - """SubscriptionScopeProperties. - - :param scopes: - :type scopes: list[~azure.mgmt.reservations.models.ScopeProperties] - """ - - _attribute_map = { - 'scopes': {'key': 'scopes', 'type': '[ScopeProperties]'}, - } - - def __init__(self, *, scopes=None, **kwargs) -> None: - super(SubscriptionScopeProperties, self).__init__(**kwargs) - self.scopes = scopes - - -class SupportRequestAction(Model): - """The SupportRequest action. - - :param severity: The support request severity. - :type severity: object - :param first_name: The first name of the recipient. - :type first_name: str - :param last_name: The last name of the recipient. - :type last_name: str - :param country: The country of the recipient. - :type country: str - :param phone_number: The phone number of the recipient. - :type phone_number: str - :param primary_email_address: The primary email addresses of the - recipients. - :type primary_email_address: str - :param support_language: The support language. - :type support_language: str - :param preferred_contact_method: The preferred communication channel. - :type preferred_contact_method: object - :param alternate_email_addresses: The alternate email address of the - recipient. - :type alternate_email_addresses: list[str] - """ - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'object'}, - 'first_name': {'key': 'firstName', 'type': 'str'}, - 'last_name': {'key': 'lastName', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, - 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, - 'primary_email_address': {'key': 'primaryEmailAddress', 'type': 'str'}, - 'support_language': {'key': 'supportLanguage', 'type': 'str'}, - 'preferred_contact_method': {'key': 'preferredContactMethod', 'type': 'object'}, - 'alternate_email_addresses': {'key': 'alternateEmailAddresses', 'type': '[str]'}, - } - - def __init__(self, *, severity=None, first_name: str=None, last_name: str=None, country: str=None, phone_number: str=None, primary_email_address: str=None, support_language: str=None, preferred_contact_method=None, alternate_email_addresses=None, **kwargs) -> None: - super(SupportRequestAction, self).__init__(**kwargs) - self.severity = severity - self.first_name = first_name - self.last_name = last_name - self.country = country - self.phone_number = phone_number - self.primary_email_address = primary_email_address - self.support_language = support_language - self.preferred_contact_method = preferred_contact_method - self.alternate_email_addresses = alternate_email_addresses diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_paged_models.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_paged_models.py index d718e8565848e..efc4a3cf5c0fc 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_paged_models.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_paged_models.py @@ -12,68 +12,68 @@ from msrest.paging import Paged -class CurrentQuotaLimitBasePaged(Paged): +class ReservationOrderResponsePaged(Paged): """ - A paging container for iterating over a list of :class:`CurrentQuotaLimitBase ` object + A paging container for iterating over a list of :class:`ReservationOrderResponse ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CurrentQuotaLimitBase]'} + 'current_page': {'key': 'value', 'type': '[ReservationOrderResponse]'} } def __init__(self, *args, **kwargs): - super(CurrentQuotaLimitBasePaged, self).__init__(*args, **kwargs) -class QuotaRequestDetailsPaged(Paged): + super(ReservationOrderResponsePaged, self).__init__(*args, **kwargs) +class ReservationResponsePaged(Paged): """ - A paging container for iterating over a list of :class:`QuotaRequestDetails ` object + A paging container for iterating over a list of :class:`ReservationResponse ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[QuotaRequestDetails]'} + 'current_page': {'key': 'value', 'type': '[ReservationResponse]'} } def __init__(self, *args, **kwargs): - super(QuotaRequestDetailsPaged, self).__init__(*args, **kwargs) -class ReservationResponsePaged(Paged): + super(ReservationResponsePaged, self).__init__(*args, **kwargs) +class OperationResponsePaged(Paged): """ - A paging container for iterating over a list of :class:`ReservationResponse ` object + A paging container for iterating over a list of :class:`OperationResponse ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationResponse]'} + 'current_page': {'key': 'value', 'type': '[OperationResponse]'} } def __init__(self, *args, **kwargs): - super(ReservationResponsePaged, self).__init__(*args, **kwargs) -class ReservationOrderResponsePaged(Paged): + super(OperationResponsePaged, self).__init__(*args, **kwargs) +class CurrentQuotaLimitBasePaged(Paged): """ - A paging container for iterating over a list of :class:`ReservationOrderResponse ` object + A paging container for iterating over a list of :class:`CurrentQuotaLimitBase ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationOrderResponse]'} + 'current_page': {'key': 'value', 'type': '[CurrentQuotaLimitBase]'} } def __init__(self, *args, **kwargs): - super(ReservationOrderResponsePaged, self).__init__(*args, **kwargs) -class OperationResponsePaged(Paged): + super(CurrentQuotaLimitBasePaged, self).__init__(*args, **kwargs) +class QuotaRequestDetailsPaged(Paged): """ - A paging container for iterating over a list of :class:`OperationResponse ` object + A paging container for iterating over a list of :class:`QuotaRequestDetails ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationResponse]'} + 'current_page': {'key': 'value', 'type': '[QuotaRequestDetails]'} } def __init__(self, *args, **kwargs): - super(OperationResponsePaged, self).__init__(*args, **kwargs) + super(QuotaRequestDetailsPaged, self).__init__(*args, **kwargs) diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py index 4d18278cf6da4..4282af9eb4908 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/__init__.py @@ -9,20 +9,18 @@ # regenerated. # -------------------------------------------------------------------------- -from ._quota_operations import QuotaOperations -from ._quota_request_status_operations import QuotaRequestStatusOperations -from ._auto_quota_increase_operations import AutoQuotaIncreaseOperations -from ._reservation_operations import ReservationOperations from ._reservation_order_operations import ReservationOrderOperations +from ._reservation_operations import ReservationOperations from ._operation_operations import OperationOperations +from ._quota_operations import QuotaOperations +from ._quota_request_status_operations import QuotaRequestStatusOperations from ._azure_reservation_api_operations import AzureReservationAPIOperationsMixin __all__ = [ - 'QuotaOperations', - 'QuotaRequestStatusOperations', - 'AutoQuotaIncreaseOperations', - 'ReservationOperations', 'ReservationOrderOperations', + 'ReservationOperations', 'OperationOperations', + 'QuotaOperations', + 'QuotaRequestStatusOperations', 'AzureReservationAPIOperationsMixin', ] diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_azure_reservation_api_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_azure_reservation_api_operations.py index c2efa8517972a..312b7b9470ea7 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_azure_reservation_api_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_azure_reservation_api_operations.py @@ -19,18 +19,12 @@ class AzureReservationAPIOperationsMixin(object): def get_catalog( - self, subscription_id, reserved_resource_type, location=None, custom_headers=None, raw=False, **operation_config): + self, subscription_id, custom_headers=None, raw=False, **operation_config): """Get the regions and skus that are available for RI purchase for the specified Azure subscription. :param subscription_id: Id of the subscription :type subscription_id: str - :param reserved_resource_type: The type of the resource for which the - skus should be provided. - :type reserved_resource_type: str - :param location: Filters the skus based on the location specified in - this parameter. This can be an azure region or global - :type location: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -42,7 +36,7 @@ def get_catalog( :raises: :class:`ErrorException` """ - api_version = "2019-04-01" + api_version = "2017-11-01" # Construct URL url = self.get_catalog.metadata['url'] @@ -54,9 +48,6 @@ def get_catalog( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['reservedResourceType'] = self._serialize.query("reserved_resource_type", reserved_resource_type, 'str') - if location is not None: - query_parameters['location'] = self._serialize.query("location", location, 'str') # Construct headers header_parameters = {} @@ -90,8 +81,7 @@ def get_applied_reservation_list( self, subscription_id, custom_headers=None, raw=False, **operation_config): """Get list of applicable `Reservation`s. - Get applicable `Reservation`s that are applied to this subscription or - a resource group under this subscription. + Get applicable `Reservation`s that are applied to this subscription. :param subscription_id: Id of the subscription :type subscription_id: str @@ -106,7 +96,7 @@ def get_applied_reservation_list( :raises: :class:`ErrorException` """ - api_version = "2019-04-01" + api_version = "2017-11-01" # Construct URL url = self.get_applied_reservation_list.metadata['url'] diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_operation_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_operation_operations.py index ef16719e83724..1426474872264 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_operation_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_operation_operations.py @@ -24,7 +24,7 @@ class OperationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Supported version for this document is 2019-04-01. Constant value: "2019-04-01". + :ivar api_version: Supported version. Constant value: "2017-11-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2017-11-01" self.config = config diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_operations.py index b00efa6723f37..54303cd96c72b 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_operations.py @@ -26,7 +26,7 @@ class QuotaOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2019-07-19-preview". + :ivar api_version: API version. Constant value: "2020-10-25". """ models = models @@ -36,18 +36,19 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-07-19-preview" + self.api_version = "2020-10-25" self.config = config def get( self, subscription_id, provider_id, location, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the current service limits (quotas) and usage of a resource. The - response from Get API can be leveraged to submit quota update requests. + """Get the current quotas (service limits) and usage of a resource. You + can use the response from the GET operation to submit quota update + requests. - :param subscription_id: Azure subscription id. + :param subscription_id: Azure subscription ID. :type subscription_id: str - :param provider_id: Azure resource provider id. + :param provider_id: Azure resource provider ID. :type provider_id: str :param location: Azure region. :type location: str @@ -168,8 +169,8 @@ def _create_or_update_initial( def create_or_update( self, subscription_id, provider_id, location, resource_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update the service limits (quota) of a resource to requested - value. + """Create or update the quotas (service limits) of a resource to the + requested value. Steps: 1. Make the Get request to get the quota information for specific resource. @@ -179,9 +180,9 @@ def create_or_update( The Create quota request may be constructed as follows. The PUT operation can be used to update the quota. - :param subscription_id: Azure subscription id. + :param subscription_id: Azure subscription ID. :type subscription_id: str - :param provider_id: Azure resource provider id. + :param provider_id: Azure resource provider ID. :type provider_id: str :param location: Azure region. :type location: str @@ -287,19 +288,19 @@ def _update_initial( def update( self, subscription_id, provider_id, location, resource_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Update the service limits (quota) of a resource to requested value. - Steps: - 1. Make the Get request to get the quota information for specific - resource. - 2. To increase the quota, update the limit field in the response from - Get request to new value. - 3. Submit the JSON to the quota request API to update the quota. - The Update quota request may be constructed as follows. The PATCH - operation can be used to update the quota. - - :param subscription_id: Azure subscription id. + """Update the quota (service limits) of this resource to the requested + value. + • To get the quota information for specific resource, send a GET + request. + • To increase the quota, update the limit field from the GET response + to a new value. + • To update the quota value, submit the JSON response to the quota + request API to update the quota. + • To update the quota. use the PATCH operation. + + :param subscription_id: Azure subscription ID. :type subscription_id: str - :param provider_id: Azure resource provider id. + :param provider_id: Azure resource provider ID. :type provider_id: str :param location: Azure region. :type location: str @@ -352,13 +353,13 @@ def get_long_running_output(response): def list( self, subscription_id, provider_id, location, custom_headers=None, raw=False, **operation_config): - """Get a list of current service limits (quota) and usages of all the - resources. The response from List API can be leveraged to submit quota - update requests. + """Gets a list of current quotas (service limits) and usage for all + resources. The response from the list quota operation can be leveraged + to request quota updates. - :param subscription_id: Azure subscription id. + :param subscription_id: Azure subscription ID. :type subscription_id: str - :param provider_id: Azure resource provider id. + :param provider_id: Azure resource provider ID. :type provider_id: str :param location: Azure region. :type location: str diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_request_status_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_request_status_operations.py index c3481d82be019..f4787c77843b0 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_request_status_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_quota_request_status_operations.py @@ -24,7 +24,7 @@ class QuotaRequestStatusOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2019-07-19-preview". + :ivar api_version: API version. Constant value: "2020-10-25". """ models = models @@ -34,24 +34,24 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-07-19-preview" + self.api_version = "2020-10-25" self.config = config def get( self, subscription_id, provider_id, location, id, custom_headers=None, raw=False, **operation_config): - """Gets the QuotaRequest details and status by the quota request Id for - the resources for the resource provider at a specific location. The - requestId is returned as response to the Put requests for - serviceLimits. + """For the specified Azure region (location), get the details and status + of the quota request by the quota request ID for the resources of the + resource provider. The PUT request for service limits returns a + response with the requestId parameter. - :param subscription_id: Azure subscription id. + :param subscription_id: Azure subscription ID. :type subscription_id: str - :param provider_id: Azure resource provider id. + :param provider_id: Azure resource provider ID. :type provider_id: str :param location: Azure region. :type location: str - :param id: Quota Request id. + :param id: Quota Request ID. :type id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -108,14 +108,13 @@ def get( def list( self, subscription_id, provider_id, location, filter=None, top=None, skiptoken=None, custom_headers=None, raw=False, **operation_config): - """For the specified location and Resource provider gets the current quota - requests under the subscription over the time period of one year ago - from now to one year back. oData filter can be used to select quota - requests. + """For the specified Azure region (location), subscription, and resource + provider, get the history of the quota requests for the past year. To + select specific quota requests, use the oData filter. - :param subscription_id: Azure subscription id. + :param subscription_id: Azure subscription ID. :type subscription_id: str - :param provider_id: Azure resource provider id. + :param provider_id: Azure resource provider ID. :type provider_id: str :param location: Azure region. :type location: str @@ -127,8 +126,8 @@ def list( :type top: int :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 + element, the value of the nextLink element includes a skiptoken + parameter that specifies a starting point to use for subsequent calls. :type skiptoken: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_operations.py index b36986777efcd..e11cbe2d93c18 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_operations.py @@ -26,7 +26,7 @@ class ReservationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Supported version for this document is 2019-04-01. Constant value: "2019-04-01". + :ivar api_version: Supported version. Constant value: "2017-11-01". """ models = models @@ -36,112 +36,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2017-11-01" self.config = config - def _available_scopes_initial( - self, reservation_order_id, reservation_id, body, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.available_scopes.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str'), - 'reservationId': self._serialize.url("reservation_id", reservation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, '[str]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Properties', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def available_scopes( - self, reservation_order_id, reservation_id, body, custom_headers=None, raw=False, polling=True, **operation_config): - """Get Available Scopes for `Reservation`. - - Get Available Scopes for `Reservation`. - . - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param reservation_id: Id of the Reservation Item - :type reservation_id: str - :param body: - :type body: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Properties or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.reservations.models.Properties] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.reservations.models.Properties]] - :raises: - :class:`ErrorException` - """ - raw_result = self._available_scopes_initial( - reservation_order_id=reservation_order_id, - reservation_id=reservation_id, - body=body, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Properties', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - available_scopes.metadata = {'url': '/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes'} - - def _split_initial( self, reservation_order_id, quantities=None, reservation_id=None, custom_headers=None, raw=False, **operation_config): body = models.SplitRequest(quantities=quantities, reservation_id=reservation_id) @@ -195,6 +94,7 @@ def split( Split a `Reservation` into two `Reservation`s with specified quantity distribution. + . :param reservation_order_id: Order Id of the reservation :type reservation_order_id: str @@ -240,7 +140,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -340,7 +240,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -416,7 +316,7 @@ def internal_paging(next_link=None): list.metadata = {'url': '/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations'} def get( - self, reservation_id, reservation_order_id, expand=None, custom_headers=None, raw=False, **operation_config): + self, reservation_id, reservation_order_id, custom_headers=None, raw=False, **operation_config): """Get `Reservation` details. Get specific `Reservation` details. @@ -425,8 +325,6 @@ def get( :type reservation_id: str :param reservation_order_id: Order Id of the reservation :type reservation_order_id: str - :param expand: Supported value of this query is renewProperties - :type expand: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -449,8 +347,6 @@ def get( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if expand is not None: - query_parameters['expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} @@ -482,7 +378,9 @@ def get( def _update_initial( - self, reservation_order_id, reservation_id, parameters, custom_headers=None, raw=False, **operation_config): + self, reservation_order_id, reservation_id, applied_scope_type=None, applied_scopes=None, custom_headers=None, raw=False, **operation_config): + parameters = models.Patch(applied_scope_type=applied_scope_type, applied_scopes=applied_scopes) + # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -528,7 +426,7 @@ def _update_initial( return deserialized def update( - self, reservation_order_id, reservation_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, reservation_order_id, reservation_id, applied_scope_type=None, applied_scopes=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a `Reservation`. Updates the applied scopes of the `Reservation`. @@ -537,8 +435,10 @@ def update( :type reservation_order_id: str :param reservation_id: Id of the Reservation Item :type reservation_id: str - :param parameters: Information needed to patch a reservation item - :type parameters: ~azure.mgmt.reservations.models.Patch + :param applied_scope_type: Possible values include: 'Single', 'Shared' + :type applied_scope_type: str or ~azure.mgmt.reservations.models.enum + :param applied_scopes: + :type applied_scopes: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -556,7 +456,8 @@ def update( raw_result = self._update_initial( reservation_order_id=reservation_order_id, reservation_id=reservation_id, - parameters=parameters, + applied_scope_type=applied_scope_type, + applied_scopes=applied_scopes, custom_headers=custom_headers, raw=True, **operation_config @@ -585,6 +486,7 @@ def list_revisions( """Get `Reservation` revisions. List of all the revisions for the `Reservation`. + . :param reservation_id: Id of the Reservation Item :type reservation_id: str diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_order_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_order_operations.py index 27c9f60ca5443..8ed1a5cd318ee 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_order_operations.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_reservation_order_operations.py @@ -11,8 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -26,7 +24,7 @@ class ReservationOrderOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Supported version for this document is 2019-04-01. Constant value: "2019-04-01". + :ivar api_version: Supported version. Constant value: "2017-11-01". """ models = models @@ -36,68 +34,10 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2017-11-01" self.config = config - def calculate( - self, body, custom_headers=None, raw=False, **operation_config): - """Calculate price for a `ReservationOrder`. - - Calculate price for placing a `ReservationOrder`. - - :param body: Information needed for calculate or purchase reservation - :type body: ~azure.mgmt.reservations.models.PurchaseRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CalculatePriceResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.reservations.models.CalculatePriceResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorException` - """ - # Construct URL - url = self.calculate.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'PurchaseRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CalculatePriceResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - calculate.metadata = {'url': '/providers/Microsoft.Capacity/calculatePrice'} - def list( self, custom_headers=None, raw=False, **operation_config): """Get all `ReservationOrder`s. @@ -162,116 +102,14 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/providers/Microsoft.Capacity/reservationOrders'} - - def _purchase_initial( - self, reservation_order_id, body, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.purchase.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'PurchaseRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ReservationOrderResponse', response) - if response.status_code == 202: - deserialized = self._deserialize('ReservationOrderResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def purchase( - self, reservation_order_id, body, custom_headers=None, raw=False, polling=True, **operation_config): - """Purchase `ReservationOrder`. - - Purchase `ReservationOrder` and create resource under the specified - URI. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param body: Information needed for calculate or purchase reservation - :type body: ~azure.mgmt.reservations.models.PurchaseRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ReservationOrderResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.reservations.models.ReservationOrderResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.reservations.models.ReservationOrderResponse]] - :raises: - :class:`ErrorException` - """ - raw_result = self._purchase_initial( - reservation_order_id=reservation_order_id, - body=body, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ReservationOrderResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - purchase.metadata = {'url': '/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}'} - def get( - self, reservation_order_id, expand=None, custom_headers=None, raw=False, **operation_config): + self, reservation_order_id, custom_headers=None, raw=False, **operation_config): """Get a specific `ReservationOrder`. Get the details of the `ReservationOrder`. :param reservation_order_id: Order Id of the reservation :type reservation_order_id: str - :param expand: May be used to expand the planInformation. - :type expand: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -293,8 +131,6 @@ def get( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {}