From 5265a4fcf95f45e3274396508e223d7a0bfd89ed Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 5 Jan 2021 17:58:18 +0000 Subject: [PATCH] CodeGen from PR 12289 in Azure/azure-rest-api-specs Get latest master (#12289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Hub Generated] Review request for Microsoft.AlertsManagement to add version stable/2019-06-01 (#11833) * Changing Swagger file * Changing examples * Fixing tags example * Fixing tags example * Fixing tags example * prettier fix for white spaces * Enable azure-sdk-for-net-track2 (#12169) * Updating existing CRR APIs with zone restore feature (#12157) * - Added change for support of cross zone restores. * - updating example json * - Fixing prettier * lastUpdatedDate for templates (#11900) * lastUpdatedDate for templates * fix * [Hub Generated] Review request for Microsoft.AppPlatform to add version preview/2020-11-01-preview (#11823) * Adds base for updating Microsoft.AppPlatform from version stable/2020-07-01 to version 2020-11-01-preview * Updates readme * Updates API version in new specs and examples * Introduce additional change to 2020-11-01-preview. * Additional properties to monitoringSettings. * Readonly properties to requiredTraffics. Signed-off-by: Pan Li * Make credscan happy. Signed-off-by: Pan Li * [Hub Generated] Review request for Microsoft.Consumption to add version stable/2019-10-01 (#12113) * Fix linter and swagger warnings * Fix errors * Removed unneeded change * [ASC.Automations] Add new data type "RegulatoryComplianceAssessment" (#12185) * Add SubAssessment event source type and add more automations examples * Change Location isReadOnlu to false * Test * Add new read/write location and add new type TrackedResourceLocation * Minor * minor * prettier fixes * Change variable name to TrackedResourceLocation * Change type name TrackedResourceLocation to AzureTrackedResourceLocation * Update automations example * Add SecureScores & SecureScoreControls as new supported datatypes in Automations resource * [ASC.Automations] add new data type RegulatoryComplianceAssessment * add datalake store track2 config (#12186) * cleanup old pipeline dependencies (#11889) * cleanup pipeline deps * add rest-api-specs-scripts * Extending recovery network input in replication intent API to support new network creation (#12191) * [Hub Generated] Review request for Microsoft.Maps to add version preview/2020-02-01-preview (#12172) * Adding operations for Maps Creator resource. * Fixing typo. * Adds suppression to readme * Adds suppression to readme * Adds suppression to readme * Adds suppression to readme * Resolving linter errors. * Minor update. * Updating all reference to v2 schema. * Marked private atlas as deprecated in description. * add operationsmanagement track2 config (#12141) * Update comment.yml (#12202) Add ARM traffic query link. When add breakingChangeReviewRequired * Adding new properties to response body (#12201) * adding new properties * updating examples * prettier fix * [Hub Generated] Review request for Microsoft.ContainerService to add version stable/2020-12-01 (#12064) * Add autorest.az configurations for azure monitor control service (#12090) * add AMCS config for codegen * reorganize command group * rename command group * Codegen modify try to rename DataCollectionRules create parameters * hide DataCollectionRules Create & Update commands and DataCollectionRuleAssociations Create command * use alias instand of rename in code-gen * use monitor-control-service as the extension name * Update readme.python.md * add logic track2 config (#12166) * add alertsmanagement track2 config (#11759) * Update comment.yml (#12213) * add mixedreality track2 confi (#12070) * add signalr track2 config (#11892) * add cognitiveservice track2 config (#11498) * add machinglearningservices track2 config (#12183) * add apimanagement track2 config (#12187) * add serialconsole track2 config (#12046) * Update TransparentDataEncryption Group Name (#12160) * update TransparentDataEncryption Group name * update reference of TransparentDataEncryption * Update readme.python.md (#12216) * Required changes for Azure HealthBot swagger (#12124) * Fixes for SDK generation files. * Fixes for SDK generation files. * Added GO. * Change Healthcare bot to Healthbot. * 1. Remove unused properties of SKU. 2. Removed unused CheckNameAvailability.json 3. Remove subgroup. * Sku is required. * [Hub Generated] Review request for Microsoft.IoTCentral to add version stable/2018-09-01 (#12224) * update to name * update * add api-version of guest configuration to go SDK (#12217) * add api-version for templatespecs (#12197) * Update specificationRepositoryConfiguration.json (#12218) * Adding new api version to devops RP (#11585) * Initial commit as per PR review * Actual changes to api spec for new version * Switching to multi-api build for python * Fix python spec to correct namespaces in multiapi mode * Revert changes to python generation * Add systemdata * Fix the path for sys data reference * Fix path once more * remove additional properties after including systemdata * Remove more addtional properties * Move system data to root * Fix wrong output-folder (#12229) * Remove swagger and examples because the controller will be used for private preview. (#12177) * Update pull_request_assignment.yml (#12230) * [Hub Generated] Review request for Microsoft.StorageCache to add version stable/2020-10-01 (#11407) * Init the next version so diffs can work better. * Updates readme * Updates API version in new specs and examples * Updates to StorageTargetProperties and added examples of cmk, mtu Add 202 to the storage cache and storage target create/update and update examples Fix ST no junction example's 202 response. add properties for nfs extended groups fix issues with extended groups properties found with autorest add properties and objects for Active Directory username download undo unintended change changes from comments in pull request AccessPolicy support. Example fixes for Access Policies. Fix attribute names to match latest RP. update to credential properties for LDAP and Active Directory marking password properties with x-ms-secret tag minor changes on extended groups and add examples Added blob NFS and some other validation fixes. Update required property for domainName from dnsName Updated blobNfs examples and some kpi fixes. Correct validation errors in examples. Added systemdata to resources. Remove x-ms-secret in keyvault reference due to linter error and common types not using it. Remove blobNfs from this version. Remove blobNfs from spec file. Remove x-ms-secret due to linter errors. Fix certificate spelling. Updating prettier and spell check errors. Used prettier on main spec file. Readded x-ms-secret that open api hub failed on but the PR pipeline allows. * Add prettier fix after rebase * Remove 202 bodies and add systemData to examples. * Update spec with prettier. * Address comments on spec for descriptions, readmes, and extendedGroupsEnabled. * Updating to address addition ldap and pattern comments. * Update version tag to include 01 * Restore changes that would be considered breaking changes matching 2020-03-01 * Address a few other comments. * Update netbios field names and some descriptions. * Fix s360 for missing debugInfo operation. * Fix credscan error in example file. * Update required fields, new validator failure on debugInfo return codes, and bindPassword example value. * Update debug info example with new return codes. * Update other credscan password errors. * Update Semantic-and-Model-Violations-Reference.md (#12199) Adding secret_property code, update some other codes. * ADP - add system metadata to dataPool (#12179) * Swagger Linting Fix (#12162) * Fix Linting Issuing * no message * fix description * add description and object back * test to resolve model validation test (cherry picked from commit ab273dfc0d5897683c128ee15da4babafa7a85ba) * [SQL][V20180601] Updating LocationCapabilities spec (#12032) * [SQL][V20180601] Updating LocationCapabilities spec * Fill 2020 versions * Rollback V2018 changes and bump LocationCapabilities in V4 to 2020-08-01-preview * update order for CI-FixRequiredOnFailure (#12227) * update rdbms track2 config (#12245) * ADT: refix path (#12161) * python track2 configure (#12150) * Add and remove owner for service principals (#12081) * [Hub Generated] Review request for Microsoft.MixedReality to add version stable/2020-05-01 (#11810) * fix spec * fix prettier * [Hub Generated] Review request for Microsoft.MixedReality to add version preview/2019-12-02-preview (#11769) * fix for swagger completeness * forgot curly brace * fix example * Api Management - make /tenant endpoints ARM compliant in 2020-06-01-preview version (#11549) * Adds base for updating Microsoft.ApiManagement from version stable/2019-12-01 to version 2020-06-01-preview * Updates readme * Updates API version in new specs and examples * Add support in API Management for Availability Zones (#10284) * apim in azs * fix prettier check * PATCH should return 200 OK (#10328) * add support for PATCH returning 200 OK * CI fixes prettier fix CI fixes part 2 * Password no longer a mandatory property when uploading Certificates * add missing x-ms-odata extension for filter support * +gatewayhostnameconfiguration protocol changes (#10292) * [2020-06-01-preview] Update Oauth Server secrets Contract (#10602) * Oauth server secrets contract * fix azureMonitor enum * API Management Service Deleted Services Resource (#10607) * API Management Service Deleted Services Resource * Path fix * Lint + custom-words fixes * Location URI parameter for deletedservices Resource * GET for deletedservices by service name * Remove resourceGroupName from resource path * fixes * schema for purge operation * perttier applied * 204 response code added Co-authored-by: REDMOND\glfeokti * OperationNameFormat property added to Diagnostic contract (#10641) * OperationNameFormat property added to Diagnostic contract * add azuremonitor to update contract Co-authored-by: REDMOND\glfeokti * [Microsoft.ApiManagement][2020-06-01-preview] Change Network Status response contract (#10331) * Change Network Status response contract * Update examples for network status contract * ApiManagement - tenant/settings endpoints * ApiManagement - tenant/settings endpoints fix * ApiManagement - tenant/settings endpoints fix prettier * ApiManagement - tenant/settings endpoints fix 3 * ApiManagement - tenant/settings endpoints fix 4 * ApiManagement - tenant/settings endpoints fix 5 Co-authored-by: Samir Solanki Co-authored-by: maksimkim Co-authored-by: promoisha Co-authored-by: REDMOND\glfeokti Co-authored-by: RupengLiu Co-authored-by: vfedonkin * Add "mail" parameter to UserUpdateParameters in graphrbac (#12127) This patch adds a single optional field "mail" to UserUpdateParameters schema. This makes it possible to update user's e-mail address using the (Go) Azure SDK. Currently this is not possible. I have curled the graphrbac API with the extra body parameter and it works as expected. Addition of the field will make it possible to support the mail property on the azuread_user resource in terraform-provider-azuread. Co-authored-by: David Čepelík * [Hub Generated] Review request for Microsoft.Advisor to add version stable/2020-01-01 (#12262) * add resourcegraph track2 config (#12122) * add reservations track2 config (#12027) * Removing a readonly tag from a property (#12254) * Fix swagger correctness errors (#12246) * Fix swagger correctness issues in Security for Iot service * changed int format from 32 to 64 * Add systemData to iotSecuritySolutions Co-authored-by: Liran Chen * [Hub Generated] Review request for Microsoft.Consumption to add version stable/2019-10-01 (#12196) * AAS - Swagger Linting and Correctness Fix (#12176) * Fix R4013 IntegerTypeMustHaveFormat * Fix R4010 RequiredDefaultResponse * Fix R4007 DefaultErrorResponseSchema * removed extra bracket * fix semantic issue * add type error * Fix linting issue * test to resolve model validation test * Revert "test to resolve model validation test" This reverts commit ab273dfc0d5897683c128ee15da4babafa7a85ba. * Resolve Model Validation Issue * Resolve Model Validation Issue v2 * test - add missing properties (cherry picked from commit 48ec27c51cc61f4b3c05b531618f40b7c2f77de6) * fix format * set default value * add x-ms-enum * fix nit * Add missing property * add missing properties * add missing bracket * change GatewayListStatusLive type * add missing "origin" property * fix model validation * Revert "change GatewayListStatusLive type" This reverts commit 4f3fa743d5ce91bea6bcf83474e6e3fc15bc3483. * Revert "fix model validation" This reverts commit 945bc233b9e623b2d90f7903b8b4dee94d873aa8. * add redhatopenshift track2 config (#12045) * [Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-10-01 (#12194) * Adding nextLink and previousLink to Tags endpoint properties * moving properties out * prettier check fix Co-authored-by: Jorge Chavez Nieto * add relay track2 config (#11495) * update healthbot t2 config (#12269) * update healthbot t2 config * fix readme * add automation track2 config (#11628) * add automation track2 config * update config * Azure Remote Rendering REST API swagger file - for review (#12015) * Azure Remote Rendering API specifcation * fix schema issue * fix examples * fix request bodies integer values, :stop path * pointing readme.md to open api spec for ARR * fix typo, add custom words * add msvc to custom words * fix readme.md * ran prettifier * fix reference to json * reference sts from file as well * fix readme.md * changes to readme.md * remove example from error to fix error * add 200 OK status for retried PUT for conversions and sessiosn * ran prettier * make autorest linter not crash * fix casing of nextLinkName paramter * factor out conversion list response * add examples for conversions * adding examples for sessions, prettify files * [Hub Generated] Review request for Microsoft.Maps/Microsoft.Maps to add version preview/2.0 (#12175) * microsoft.imagery 512 not supported Adding micorosft.imagery to 512 tile not supported list * Updating Raster Tilesets to Have Max Zoom 22 Certain raster tilesets now support up to zoom level 22. * minor changes to swagger (#12253) * minor changes to swagger * reverting sdk definitions file * Add addons to AVS 2020-07-17-preview (#12236) * found missing AVS/privateclouds/addons commit, moving it to 2020-07-17-preview API from PR repo * fixed prettier errors * Fixed vladation warnings for x-ms-enum and missing description/title, related to addons * fixed validation error for missing systemData for addons responses * fixed prettier errors * fixed validation error for missing systemData for addons responses * systemData for any Resource * make sure systemData is readOnly * systemData needs to go in a new api version * suppress systemData error Co-authored-by: Cameron Taggart * Azs api bug fix (#12133) * Old api version for ComputeOperationResult * Api Bugfix for Azure Stack Fabric Admin * Fix for typo in readme * Add default reponse * Fix example issue for default error * Update comment.yml (#12273) * [Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-11-01 (#12031) * fix dataSet typo * fix dimensions and tags typo * more dimensions and tags to fix * one more miss on dimensions and tags * Add the includeMonetaryCommitment missing field * fix spell check error * make property read only * remove the not operation from query filters * New backup service api version (#12171) * Initial commit: adding new api version * - new api 2020-12-01 * updating the readme.md package reference * - adding the zone information for new api * - updating api-version in examples - added 'zone' in Get recoverypoint api example json * Fixing prettier issue * Revert "- updating api-version in examples" This reverts commit 80baa9fcec1293bd3a51875d793f2178964fce52. * - adding api-version in examples * adding new api version in package mds * [IotHub] Introducing networkRuleSets in IotHubProperties [2020-08-31 : preview and stable ] (#10853) * Adds base for updating Microsoft.Devices from version preview/2020-07-10-preview to version 2020-08-31-preview * Updates readme * Updates API version in new specs and examples * Adds base for updating Microsoft.Devices from version stable/2020-08-01 to version 2020-08-31 * Updates readme * Updates API version in new specs and examples * Adding networkRuleSets support for iothub * Adding networkRuleSets Support in preview version * Adding Examples, correcting order in iothub.json * Updating Readme to have stable and previe versions * Modifying Tag to package-2020-08-31 * Adding Arm identity properties from 2020-07-010-preview version * Removing creds * minor fix * swagger correctness fix (#12101) * swagger correctness fix * update preview version too * Revert change and add defaults (#12243) * Remove gallery preview version 2020-09-30 from stable release (#12222) * add managementpartner track2 config (#12043) * [Hub Generated] Review request for Microsoft.Insights to add version stable/2019-03-01 (#12232) * Fixed swagger validations for api version 2019 * reverted error response change and suppress * removed redundant error details * renamed suppression rule * fixed suppression Co-authored-by: napolish <67951636+napolish@users.noreply.github.com> Co-authored-by: Phoenix He Co-authored-by: arpja <46751982+arpja@users.noreply.github.com> Co-authored-by: ShaniFelig <74960756+ShaniFelig@users.noreply.github.com> Co-authored-by: Pan Li Co-authored-by: Zach Rathbun Co-authored-by: surashed <55134940+surashed@users.noreply.github.com> Co-authored-by: Kaihui (Kerwin) Sun Co-authored-by: Zhenglai Zhang Co-authored-by: om-nishant <50401171+om-nishant@users.noreply.github.com> Co-authored-by: Ihar Voitka Co-authored-by: Ruoxuan Wang <52271048+ruowan@users.noreply.github.com> Co-authored-by: Ju Hee Lee Co-authored-by: xiazhan Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com> Co-authored-by: Ji Wang Co-authored-by: Andy Zhang Co-authored-by: guy-microsoft <50947884+guy-microsoft@users.noreply.github.com> Co-authored-by: PoAn (Baron) Chen Co-authored-by: Arcturus Co-authored-by: suyash691 Co-authored-by: nemijato <68876730+nemijato@users.noreply.github.com> Co-authored-by: brpanask <64860651+brpanask@users.noreply.github.com> Co-authored-by: Ray Chen Co-authored-by: Eli Arbel Co-authored-by: David Han <76010854+david-msft@users.noreply.github.com> Co-authored-by: Roman Khotsyn Co-authored-by: David R. Williamson Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Xinyi Joffre Co-authored-by: roytan-microsoft <73565668+roytan-microsoft@users.noreply.github.com> Co-authored-by: Vitaliy Fedonkin Co-authored-by: Samir Solanki Co-authored-by: maksimkim Co-authored-by: promoisha Co-authored-by: REDMOND\glfeokti Co-authored-by: RupengLiu Co-authored-by: vfedonkin Co-authored-by: David Čepelík Co-authored-by: David Čepelík Co-authored-by: mudit794 <42189950+mudit794@users.noreply.github.com> Co-authored-by: Dhawal Jain <41853104+dhawal777@users.noreply.github.com> Co-authored-by: MichalHel <51286657+MichalHel@users.noreply.github.com> Co-authored-by: Liran Chen Co-authored-by: jochav <75458295+jochav@users.noreply.github.com> Co-authored-by: Jorge Chavez Nieto Co-authored-by: rikogeln <40666347+rikogeln@users.noreply.github.com> Co-authored-by: chgennar <56695749+chgennar@users.noreply.github.com> Co-authored-by: hivyas <61890270+hivyas@users.noreply.github.com> Co-authored-by: Douglas Lee <65295939+leedouglas@users.noreply.github.com> Co-authored-by: Cameron Taggart Co-authored-by: LingyunSu <33764806+LingyunSu@users.noreply.github.com> Co-authored-by: elabicha <61994320+elabicha@users.noreply.github.com> Co-authored-by: Nikhil Kumar Mengani <62704762+nimengan@users.noreply.github.com> Co-authored-by: Junbo Wang Co-authored-by: Daniel Orozco <64658732+dagoroz@users.noreply.github.com> Co-authored-by: Adam Sandor Co-authored-by: yashmuel <63585146+yashmuel@users.noreply.github.com> --- .../reservations/_azure_reservation_api.py | 33 +- .../mgmt/reservations/models/__init__.py | 99 +- .../models/_azure_reservation_api_enums.py | 127 +-- .../azure/mgmt/reservations/models/_models.py | 907 +++-------------- .../mgmt/reservations/models/_models_py3.py | 921 +++--------------- .../mgmt/reservations/models/_paged_models.py | 40 +- .../mgmt/reservations/operations/__init__.py | 14 +- .../_auto_quota_increase_operations.py | 161 --- .../_azure_reservation_api_operations.py | 18 +- .../operations/_operation_operations.py | 4 +- .../operations/_quota_operations.py | 55 +- .../_quota_request_status_operations.py | 33 +- .../operations/_reservation_operations.py | 132 +-- .../_reservation_order_operations.py | 170 +--- 14 files changed, 349 insertions(+), 2365 deletions(-) delete mode 100644 sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_auto_quota_increase_operations.py 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/_auto_quota_increase_operations.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_auto_quota_increase_operations.py deleted file mode 100644 index dfd888adf122a..0000000000000 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_auto_quota_increase_operations.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class AutoQuotaIncreaseOperations(object): - """AutoQuotaIncreaseOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :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". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-07-19-preview" - - self.config = config - - def get_properties( - self, subscription_id, custom_headers=None, raw=False, **operation_config): - """Gets the Auto Quota Increase enrollment details for the specified - subscription. - - :param subscription_id: Azure subscription id. - :type subscription_id: str - :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: AutoQuotaIncreaseDetail or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.reservations.models.AutoQuotaIncreaseDetail or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ExceptionResponseException` - """ - # Construct URL - url = self.get_properties.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_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' - 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 and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ExceptionResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AutoQuotaIncreaseDetail', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_properties.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/autoQuotaIncrease'} - - def create( - self, subscription_id, auto_quota_increase_request, custom_headers=None, raw=False, **operation_config): - """Sets the Auto Quota Increase enrollment properties for the specified - subscription. - - :param subscription_id: Azure subscription id. - :type subscription_id: str - :param auto_quota_increase_request: Auto Quota increase request - payload. - :type auto_quota_increase_request: - ~azure.mgmt.reservations.models.AutoQuotaIncreaseDetail - :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: AutoQuotaIncreaseDetail or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.reservations.models.AutoQuotaIncreaseDetail or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ExceptionResponseException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_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(auto_quota_increase_request, 'AutoQuotaIncreaseDetail') - - # 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]: - raise models.ExceptionResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AutoQuotaIncreaseDetail', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/autoQuotaIncrease'} 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 = {}