From 625b7ca5c65e545c54532b3c49e24856529aa9e8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 5 Jan 2021 18:01:19 +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> --- .../_storage_cache_management_client.py | 7 +- .../mgmt/storagecache/models/__init__.py | 55 +- .../azure/mgmt/storagecache/models/_models.py | 649 +++++++++++++++-- .../mgmt/storagecache/models/_models_py3.py | 675 ++++++++++++++++-- .../_storage_cache_management_client_enums.py | 56 +- .../mgmt/storagecache/operations/__init__.py | 2 + .../operations/_asc_operations.py | 102 +++ .../operations/_caches_operations.py | 118 ++- .../storagecache/operations/_operations.py | 4 +- .../operations/_skus_operations.py | 4 +- .../operations/_storage_targets_operations.py | 26 +- .../operations/_usage_models_operations.py | 4 +- 12 files changed, 1544 insertions(+), 158 deletions(-) create mode 100644 sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_asc_operations.py diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py index 558d892a8211a..3fd81aab77d43 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py @@ -16,6 +16,7 @@ from .operations import Operations from .operations import SkusOperations from .operations import UsageModelsOperations +from .operations import AscOperations from .operations import CachesOperations from .operations import StorageTargetsOperations from . import models @@ -33,6 +34,8 @@ class StorageCacheManagementClient(SDKClient): :vartype skus: azure.mgmt.storagecache.operations.SkusOperations :ivar usage_models: UsageModels operations :vartype usage_models: azure.mgmt.storagecache.operations.UsageModelsOperations + :ivar asc_operations: AscOperations operations + :vartype asc_operations: azure.mgmt.storagecache.operations.AscOperations :ivar caches: Caches operations :vartype caches: azure.mgmt.storagecache.operations.CachesOperations :ivar storage_targets: StorageTargets operations @@ -55,7 +58,7 @@ def __init__( super(StorageCacheManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-03-01' + self.api_version = '2020-10-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -65,6 +68,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.usage_models = UsageModelsOperations( self._client, self.config, self._serialize, self._deserialize) + self.asc_operations = AscOperations( + self._client, self.config, self._serialize, self._deserialize) self.caches = CachesOperations( self._client, self.config, self._serialize, self._deserialize) self.storage_targets = StorageTargetsOperations( diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py index 6c3ac0b049215..3937bd90ba082 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py @@ -12,7 +12,12 @@ try: from ._models_py3 import ApiOperation from ._models_py3 import ApiOperationDisplay + from ._models_py3 import ApiOperationPropertiesServiceSpecification + from ._models_py3 import AscOperation from ._models_py3 import Cache + from ._models_py3 import CacheActiveDirectorySettings + from ._models_py3 import CacheActiveDirectorySettingsCredentials + from ._models_py3 import CacheDirectorySettings from ._models_py3 import CacheEncryptionSettings from ._models_py3 import CacheHealth from ._models_py3 import CacheIdentity @@ -20,14 +25,21 @@ from ._models_py3 import CacheSecuritySettings from ._models_py3 import CacheSku from ._models_py3 import CacheUpgradeStatus + from ._models_py3 import CacheUsernameDownloadSettings + from ._models_py3 import CacheUsernameDownloadSettingsCredentials from ._models_py3 import ClfsTarget from ._models_py3 import ClfsTargetProperties from ._models_py3 import CloudErrorBody + from ._models_py3 import ErrorResponse from ._models_py3 import KeyVaultKeyReference from ._models_py3 import KeyVaultKeyReferenceSourceVault + from ._models_py3 import MetricDimension + from ._models_py3 import MetricSpecification from ._models_py3 import NamespaceJunction from ._models_py3 import Nfs3Target from ._models_py3 import Nfs3TargetProperties + from ._models_py3 import NfsAccessPolicy + from ._models_py3 import NfsAccessRule from ._models_py3 import ResourceSku from ._models_py3 import ResourceSkuCapabilities from ._models_py3 import ResourceSkuLocationInfo @@ -35,6 +47,7 @@ from ._models_py3 import StorageTarget from ._models_py3 import StorageTargetProperties from ._models_py3 import StorageTargetResource + from ._models_py3 import SystemData from ._models_py3 import UnknownTarget from ._models_py3 import UnknownTargetProperties from ._models_py3 import UsageModel @@ -42,7 +55,12 @@ except (SyntaxError, ImportError): from ._models import ApiOperation from ._models import ApiOperationDisplay + from ._models import ApiOperationPropertiesServiceSpecification + from ._models import AscOperation from ._models import Cache + from ._models import CacheActiveDirectorySettings + from ._models import CacheActiveDirectorySettingsCredentials + from ._models import CacheDirectorySettings from ._models import CacheEncryptionSettings from ._models import CacheHealth from ._models import CacheIdentity @@ -50,14 +68,21 @@ from ._models import CacheSecuritySettings from ._models import CacheSku from ._models import CacheUpgradeStatus + from ._models import CacheUsernameDownloadSettings + from ._models import CacheUsernameDownloadSettingsCredentials from ._models import ClfsTarget from ._models import ClfsTargetProperties from ._models import CloudErrorBody + from ._models import ErrorResponse from ._models import KeyVaultKeyReference from ._models import KeyVaultKeyReferenceSourceVault + from ._models import MetricDimension + from ._models import MetricSpecification from ._models import NamespaceJunction from ._models import Nfs3Target from ._models import Nfs3TargetProperties + from ._models import NfsAccessPolicy + from ._models import NfsAccessRule from ._models import ResourceSku from ._models import ResourceSkuCapabilities from ._models import ResourceSkuLocationInfo @@ -65,6 +90,7 @@ from ._models import StorageTarget from ._models import StorageTargetProperties from ._models import StorageTargetResource + from ._models import SystemData from ._models import UnknownTarget from ._models import UnknownTargetProperties from ._models import UsageModel @@ -75,18 +101,29 @@ from ._paged_models import StorageTargetPaged from ._paged_models import UsageModelPaged from ._storage_cache_management_client_enums import ( + MetricAggregationType, CacheIdentityType, + CreatedByType, HealthStateType, ProvisioningStateType, FirmwareStatusType, - StorageTargetType, + NfsAccessRuleScope, + NfsAccessRuleAccess, + DomainJoinedType, + UsernameSource, + UsernameDownloadedType, ReasonCode, ) __all__ = [ 'ApiOperation', 'ApiOperationDisplay', + 'ApiOperationPropertiesServiceSpecification', + 'AscOperation', 'Cache', + 'CacheActiveDirectorySettings', + 'CacheActiveDirectorySettingsCredentials', + 'CacheDirectorySettings', 'CacheEncryptionSettings', 'CacheHealth', 'CacheIdentity', @@ -94,14 +131,21 @@ 'CacheSecuritySettings', 'CacheSku', 'CacheUpgradeStatus', + 'CacheUsernameDownloadSettings', + 'CacheUsernameDownloadSettingsCredentials', 'ClfsTarget', 'ClfsTargetProperties', 'CloudErrorBody', + 'ErrorResponse', 'KeyVaultKeyReference', 'KeyVaultKeyReferenceSourceVault', + 'MetricDimension', + 'MetricSpecification', 'NamespaceJunction', 'Nfs3Target', 'Nfs3TargetProperties', + 'NfsAccessPolicy', + 'NfsAccessRule', 'ResourceSku', 'ResourceSkuCapabilities', 'ResourceSkuLocationInfo', @@ -109,6 +153,7 @@ 'StorageTarget', 'StorageTargetProperties', 'StorageTargetResource', + 'SystemData', 'UnknownTarget', 'UnknownTargetProperties', 'UsageModel', @@ -118,10 +163,16 @@ 'UsageModelPaged', 'CachePaged', 'StorageTargetPaged', + 'MetricAggregationType', 'CacheIdentityType', + 'CreatedByType', 'HealthStateType', 'ProvisioningStateType', 'FirmwareStatusType', - 'StorageTargetType', + 'NfsAccessRuleScope', + 'NfsAccessRuleAccess', + 'DomainJoinedType', + 'UsernameSource', + 'UsernameDownloadedType', 'ReasonCode', ] diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py index bad52904c4f0a..f50cb8872d0e1 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py @@ -19,19 +19,34 @@ class ApiOperation(Model): :param display: The object that represents the operation. :type display: ~azure.mgmt.storagecache.models.ApiOperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param is_data_action: The flag that indicates whether the operation + applies to data plane. + :type is_data_action: bool :param name: Operation name: {provider}/{resource}/{operation} :type name: str + :param service_specification: Specification of the all the metrics + provided for a resource type. + :type service_specification: + ~azure.mgmt.storagecache.models.ApiOperationPropertiesServiceSpecification """ _attribute_map = { 'display': {'key': 'display', 'type': 'ApiOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ApiOperationPropertiesServiceSpecification'}, } def __init__(self, **kwargs): super(ApiOperation, self).__init__(**kwargs) self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.is_data_action = kwargs.get('is_data_action', None) self.name = kwargs.get('name', None) + self.service_specification = kwargs.get('service_specification', None) class ApiOperationDisplay(Model): @@ -43,12 +58,15 @@ class ApiOperationDisplay(Model): :type provider: str :param resource: Resource on which the operation is performed: Cache, etc. :type resource: str + :param description: The description of the operation + :type description: str """ _attribute_map = { 'operation': {'key': 'operation', 'type': 'str'}, 'provider': {'key': 'provider', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } def __init__(self, **kwargs): @@ -56,6 +74,60 @@ def __init__(self, **kwargs): self.operation = kwargs.get('operation', None) self.provider = kwargs.get('provider', None) self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) + + +class ApiOperationPropertiesServiceSpecification(Model): + """Specification of the all the metrics provided for a resource type. + + :param metric_specifications: Details about operations related to metrics. + :type metric_specifications: + list[~azure.mgmt.storagecache.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ApiOperationPropertiesServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class AscOperation(Model): + """The status of operation. + + :param id: The operation Id. + :type id: str + :param name: The operation name. + :type name: str + :param start_time: The start time of the operation. + :type start_time: str + :param end_time: The end time of the operation. + :type end_time: str + :param status: The status of the operation. + :type status: str + :param error: The error detail of the operation if any. + :type error: ~azure.mgmt.storagecache.models.ErrorResponse + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(AscOperation, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.status = kwargs.get('status', None) + self.error = kwargs.get('error', None) class Cache(Model): @@ -77,6 +149,8 @@ class Cache(Model): :vartype type: str :param identity: The identity of the cache, if configured. :type identity: ~azure.mgmt.storagecache.models.CacheIdentity + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.storagecache.models.SystemData :param cache_size_gb: The size of this Cache, in GB. :type cache_size_gb: int :ivar health: Health of the Cache. @@ -103,6 +177,10 @@ class Cache(Model): :param security_settings: Specifies security settings of the cache. :type security_settings: ~azure.mgmt.storagecache.models.CacheSecuritySettings + :param directory_services_settings: Specifies Directory Services settings + of the cache. + :type directory_services_settings: + ~azure.mgmt.storagecache.models.CacheDirectorySettings :param sku: SKU for the Cache. :type sku: ~azure.mgmt.storagecache.models.CacheSku """ @@ -111,6 +189,7 @@ class Cache(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'health': {'readonly': True}, 'mount_addresses': {'readonly': True}, } @@ -122,6 +201,7 @@ class Cache(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'CacheIdentity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'cache_size_gb': {'key': 'properties.cacheSizeGB', 'type': 'int'}, 'health': {'key': 'properties.health', 'type': 'CacheHealth'}, 'mount_addresses': {'key': 'properties.mountAddresses', 'type': '[str]'}, @@ -131,6 +211,7 @@ class Cache(Model): 'network_settings': {'key': 'properties.networkSettings', 'type': 'CacheNetworkSettings'}, 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'CacheEncryptionSettings'}, 'security_settings': {'key': 'properties.securitySettings', 'type': 'CacheSecuritySettings'}, + 'directory_services_settings': {'key': 'properties.directoryServicesSettings', 'type': 'CacheDirectorySettings'}, 'sku': {'key': 'sku', 'type': 'CacheSku'}, } @@ -142,6 +223,7 @@ def __init__(self, **kwargs): self.name = None self.type = None self.identity = kwargs.get('identity', None) + self.system_data = None self.cache_size_gb = kwargs.get('cache_size_gb', None) self.health = None self.mount_addresses = None @@ -151,9 +233,129 @@ def __init__(self, **kwargs): self.network_settings = kwargs.get('network_settings', None) self.encryption_settings = kwargs.get('encryption_settings', None) self.security_settings = kwargs.get('security_settings', None) + self.directory_services_settings = kwargs.get('directory_services_settings', None) self.sku = kwargs.get('sku', None) +class CacheActiveDirectorySettings(Model): + """Active Directory settings used to join a cache to a domain. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param primary_dns_ip_address: Required. Primary DNS IP address used to + resolve the Active Directory domain controller's fully qualified domain + name. + :type primary_dns_ip_address: str + :param secondary_dns_ip_address: Secondary DNS IP address used to resolve + the Active Directory domain controller's fully qualified domain name. + :type secondary_dns_ip_address: str + :param domain_name: Required. The fully qualified domain name of the + Active Directory domain controller. + :type domain_name: str + :param domain_net_bios_name: Required. The Active Directory domain's + NetBIOS name. + :type domain_net_bios_name: str + :param cache_net_bios_name: Required. The NetBIOS name to assign to the + HPC Cache when it joins the Active Directory domain as a server. Length + must 1-15 characters from the class [-0-9a-zA-Z]. + :type cache_net_bios_name: str + :ivar domain_joined: True if the HPC Cache is joined to the Active + Directory domain. Possible values include: 'Yes', 'No', 'Error' + :vartype domain_joined: str or + ~azure.mgmt.storagecache.models.DomainJoinedType + :param credentials: Active Directory admin credentials used to join the + HPC Cache to a domain. + :type credentials: + ~azure.mgmt.storagecache.models.CacheActiveDirectorySettingsCredentials + """ + + _validation = { + 'primary_dns_ip_address': {'required': True}, + 'domain_name': {'required': True}, + 'domain_net_bios_name': {'required': True}, + 'cache_net_bios_name': {'required': True, 'pattern': r'^[-0-9a-zA-Z]{1,15}$'}, + 'domain_joined': {'readonly': True}, + } + + _attribute_map = { + 'primary_dns_ip_address': {'key': 'primaryDnsIpAddress', 'type': 'str'}, + 'secondary_dns_ip_address': {'key': 'secondaryDnsIpAddress', 'type': 'str'}, + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'domain_net_bios_name': {'key': 'domainNetBiosName', 'type': 'str'}, + 'cache_net_bios_name': {'key': 'cacheNetBiosName', 'type': 'str'}, + 'domain_joined': {'key': 'domainJoined', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CacheActiveDirectorySettingsCredentials'}, + } + + def __init__(self, **kwargs): + super(CacheActiveDirectorySettings, self).__init__(**kwargs) + self.primary_dns_ip_address = kwargs.get('primary_dns_ip_address', None) + self.secondary_dns_ip_address = kwargs.get('secondary_dns_ip_address', None) + self.domain_name = kwargs.get('domain_name', None) + self.domain_net_bios_name = kwargs.get('domain_net_bios_name', None) + self.cache_net_bios_name = kwargs.get('cache_net_bios_name', None) + self.domain_joined = None + self.credentials = kwargs.get('credentials', None) + + +class CacheActiveDirectorySettingsCredentials(Model): + """Active Directory admin credentials used to join the HPC Cache to a domain. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. Username of the Active Directory domain + administrator. This value is stored encrypted and not returned on + response. + :type username: str + :param password: Required. Plain text password of the Active Directory + domain administrator. This value is stored encrypted and not returned on + response. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CacheActiveDirectorySettingsCredentials, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class CacheDirectorySettings(Model): + """Cache Directory Services settings. + + :param active_directory: Specifies settings for joining the HPC Cache to + an Active Directory domain. + :type active_directory: + ~azure.mgmt.storagecache.models.CacheActiveDirectorySettings + :param username_download: Specifies settings for Extended Groups. Extended + Groups allows users to be members of more than 16 groups. + :type username_download: + ~azure.mgmt.storagecache.models.CacheUsernameDownloadSettings + """ + + _attribute_map = { + 'active_directory': {'key': 'activeDirectory', 'type': 'CacheActiveDirectorySettings'}, + 'username_download': {'key': 'usernameDownload', 'type': 'CacheUsernameDownloadSettings'}, + } + + def __init__(self, **kwargs): + super(CacheDirectorySettings, self).__init__(**kwargs) + self.active_directory = kwargs.get('active_directory', None) + self.username_download = kwargs.get('username_download', None) + + class CacheEncryptionSettings(Model): """Cache encryption settings. @@ -261,17 +463,18 @@ def __init__(self, **kwargs): class CacheSecuritySettings(Model): """Cache security settings. - :param root_squash: root squash of cache property. - :type root_squash: bool + :param access_policies: NFS access policies defined for this cache. + :type access_policies: + list[~azure.mgmt.storagecache.models.NfsAccessPolicy] """ _attribute_map = { - 'root_squash': {'key': 'rootSquash', 'type': 'bool'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[NfsAccessPolicy]'}, } def __init__(self, **kwargs): super(CacheSecuritySettings, self).__init__(**kwargs) - self.root_squash = kwargs.get('root_squash', None) + self.access_policies = kwargs.get('access_policies', None) class CacheSku(Model): @@ -340,8 +543,118 @@ def __init__(self, **kwargs): self.pending_firmware_version = None +class CacheUsernameDownloadSettings(Model): + """Settings for Extended Groups username and group download. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param extended_groups_enabled: Whether or not Extended Groups is enabled. + :type extended_groups_enabled: bool + :param username_source: This setting determines how the cache gets + username and group names for clients. Possible values include: 'AD', + 'LDAP', 'File', 'None'. Default value: "None" . + :type username_source: str or + ~azure.mgmt.storagecache.models.UsernameSource + :param group_file_uri: The URI of the file containing group information + (in /etc/group file format). This field must be populated when + 'usernameSource' is set to 'File'. + :type group_file_uri: str + :param user_file_uri: The URI of the file containing user information (in + /etc/passwd file format). This field must be populated when + 'usernameSource' is set to 'File'. + :type user_file_uri: str + :param ldap_server: The fully qualified domain name or IP address of the + LDAP server to use. + :type ldap_server: str + :param ldap_base_dn: The base distinguished name for the LDAP domain. + :type ldap_base_dn: str + :param encrypt_ldap_connection: Whether or not the LDAP connection should + be encrypted. + :type encrypt_ldap_connection: bool + :param require_valid_certificate: Determines if the certificates must be + validated by a certificate authority. When true, caCertificateURI must be + provided. + :type require_valid_certificate: bool + :param auto_download_certificate: Determines if the certificate should be + automatically downloaded. This applies to 'caCertificateURI' only if + 'requireValidCertificate' is true. + :type auto_download_certificate: bool + :param ca_certificate_uri: The URI of the CA certificate to validate the + LDAP secure connection. This field must be populated when + 'requireValidCertificate' is set to true. + :type ca_certificate_uri: str + :ivar username_downloaded: Indicates whether or not the HPC Cache has + performed the username download successfully. Possible values include: + 'Yes', 'No', 'Error' + :vartype username_downloaded: str or + ~azure.mgmt.storagecache.models.UsernameDownloadedType + :param credentials: When present, these are the credentials for the secure + LDAP connection. + :type credentials: + ~azure.mgmt.storagecache.models.CacheUsernameDownloadSettingsCredentials + """ + + _validation = { + 'username_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'extended_groups_enabled': {'key': 'extendedGroupsEnabled', 'type': 'bool'}, + 'username_source': {'key': 'usernameSource', 'type': 'str'}, + 'group_file_uri': {'key': 'groupFileURI', 'type': 'str'}, + 'user_file_uri': {'key': 'userFileURI', 'type': 'str'}, + 'ldap_server': {'key': 'ldapServer', 'type': 'str'}, + 'ldap_base_dn': {'key': 'ldapBaseDn', 'type': 'str'}, + 'encrypt_ldap_connection': {'key': 'encryptLdapConnection', 'type': 'bool'}, + 'require_valid_certificate': {'key': 'requireValidCertificate', 'type': 'bool'}, + 'auto_download_certificate': {'key': 'autoDownloadCertificate', 'type': 'bool'}, + 'ca_certificate_uri': {'key': 'caCertificateURI', 'type': 'str'}, + 'username_downloaded': {'key': 'usernameDownloaded', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CacheUsernameDownloadSettingsCredentials'}, + } + + def __init__(self, **kwargs): + super(CacheUsernameDownloadSettings, self).__init__(**kwargs) + self.extended_groups_enabled = kwargs.get('extended_groups_enabled', None) + self.username_source = kwargs.get('username_source', "None") + self.group_file_uri = kwargs.get('group_file_uri', None) + self.user_file_uri = kwargs.get('user_file_uri', None) + self.ldap_server = kwargs.get('ldap_server', None) + self.ldap_base_dn = kwargs.get('ldap_base_dn', None) + self.encrypt_ldap_connection = kwargs.get('encrypt_ldap_connection', None) + self.require_valid_certificate = kwargs.get('require_valid_certificate', None) + self.auto_download_certificate = kwargs.get('auto_download_certificate', None) + self.ca_certificate_uri = kwargs.get('ca_certificate_uri', None) + self.username_downloaded = None + self.credentials = kwargs.get('credentials', None) + + +class CacheUsernameDownloadSettingsCredentials(Model): + """When present, these are the credentials for the secure LDAP connection. + + :param bind_dn: The Bind Distinguished Name identity to be used in the + secure LDAP connection. This value is stored encrypted and not returned on + response. + :type bind_dn: str + :param bind_password: The Bind password to be used in the secure LDAP + connection. This value is stored encrypted and not returned on response. + :type bind_password: str + """ + + _attribute_map = { + 'bind_dn': {'key': 'bindDn', 'type': 'str'}, + 'bind_password': {'key': 'bindPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CacheUsernameDownloadSettingsCredentials, self).__init__(**kwargs) + self.bind_dn = kwargs.get('bind_dn', None) + self.bind_password = kwargs.get('bind_password', None) + + class ClfsTarget(Model): - """Properties pertained to ClfsTarget. + """Properties pertaining to the ClfsTarget. :param target: Resource ID of storage container. :type target: str @@ -368,8 +681,6 @@ class StorageTargetProperties(Model): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -382,37 +693,35 @@ class StorageTargetProperties(Model): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, } _subtype_map = { - 'target_base_type': {'nfs3': 'Nfs3TargetProperties', 'clfs': 'ClfsTargetProperties', 'unknown': 'UnknownTargetProperties'} + 'target_type': {'nfs3': 'Nfs3TargetProperties', 'clfs': 'ClfsTargetProperties', 'unknown': 'UnknownTargetProperties'} } def __init__(self, **kwargs): super(StorageTargetProperties, self).__init__(**kwargs) self.junctions = kwargs.get('junctions', None) - self.target_type = kwargs.get('target_type', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.nfs3 = kwargs.get('nfs3', None) self.clfs = kwargs.get('clfs', None) self.unknown = kwargs.get('unknown', None) - self.target_base_type = None + self.target_type = None class ClfsTargetProperties(StorageTargetProperties): @@ -423,8 +732,6 @@ class ClfsTargetProperties(StorageTargetProperties): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -437,27 +744,26 @@ class ClfsTargetProperties(StorageTargetProperties): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, } def __init__(self, **kwargs): super(ClfsTargetProperties, self).__init__(**kwargs) - self.target_base_type = 'clfs' + self.target_type = 'clfs' class CloudError(Model): @@ -519,6 +825,26 @@ def __init__(self, **kwargs): self.target = kwargs.get('target', None) +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + class KeyVaultKeyReference(Model): """Describes a reference to Key Vault Key. @@ -565,6 +891,79 @@ def __init__(self, **kwargs): self.id = kwargs.get('id', None) +class MetricDimension(Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension + :type name: str + :param display_name: Localized friendly display name of the dimension + :type display_name: str + :param internal_name: Internal name of the dimension. + :type internal_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.internal_name = kwargs.get('internal_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class MetricSpecification(Model): + """Details about operation related to metrics. + + :param name: The name of the metric. + :type name: str + :param display_name: Localized display name of the metric. + :type display_name: str + :param display_description: The description of the metric. + :type display_description: str + :param unit: The unit that the metric is measured in. + :type unit: str + :param aggregation_type: The type of metric aggregation. + :type aggregation_type: str + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.storagecache.models.MetricAggregationType] + :param metric_class: Type of metrics. + :type metric_class: str + :param dimensions: Dimensions of the metric + :type dimensions: list[~azure.mgmt.storagecache.models.MetricDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'metric_class': {'key': 'metricClass', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.metric_class = kwargs.get('metric_class', None) + self.dimensions = kwargs.get('dimensions', None) + + class NamespaceJunction(Model): """A namespace junction. @@ -574,12 +973,16 @@ class NamespaceJunction(Model): :type target_path: str :param nfs_export: NFS export where targetPath exists. :type nfs_export: str + :param nfs_access_policy: Name of the access policy applied to this + junction. + :type nfs_access_policy: str """ _attribute_map = { 'namespace_path': {'key': 'namespacePath', 'type': 'str'}, 'target_path': {'key': 'targetPath', 'type': 'str'}, 'nfs_export': {'key': 'nfsExport', 'type': 'str'}, + 'nfs_access_policy': {'key': 'nfsAccessPolicy', 'type': 'str'}, } def __init__(self, **kwargs): @@ -587,16 +990,17 @@ def __init__(self, **kwargs): self.namespace_path = kwargs.get('namespace_path', None) self.target_path = kwargs.get('target_path', None) self.nfs_export = kwargs.get('nfs_export', None) + self.nfs_access_policy = kwargs.get('nfs_access_policy', None) class Nfs3Target(Model): - """Properties pertained to Nfs3Target. + """Properties pertaining to the Nfs3Target. :param target: IP address or host name of an NFSv3 host (e.g., 10.0.44.44). :type target: str - :param usage_model: Identifies the primary usage model to be used for this - Storage Target. Get choices from .../usageModels + :param usage_model: Identifies the usage model to be used for this Storage + Target. Get choices from .../usageModels :type usage_model: str """ @@ -623,8 +1027,6 @@ class Nfs3TargetProperties(StorageTargetProperties): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -637,27 +1039,121 @@ class Nfs3TargetProperties(StorageTargetProperties): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, } def __init__(self, **kwargs): super(Nfs3TargetProperties, self).__init__(**kwargs) - self.target_base_type = 'nfs3' + self.target_type = 'nfs3' + + +class NfsAccessPolicy(Model): + """A set of rules describing access policies applied to NFSv3 clients of the + cache. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name identifying this policy. Access Policy names + are not case sensitive. + :type name: str + :param access_rules: Required. The set of rules describing client accesses + allowed under this policy. + :type access_rules: list[~azure.mgmt.storagecache.models.NfsAccessRule] + """ + + _validation = { + 'name': {'required': True}, + 'access_rules': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'access_rules': {'key': 'accessRules', 'type': '[NfsAccessRule]'}, + } + + def __init__(self, **kwargs): + super(NfsAccessPolicy, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.access_rules = kwargs.get('access_rules', None) + + +class NfsAccessRule(Model): + """Rule to place restrictions on portions of the cache namespace being + presented to clients. + + All required parameters must be populated in order to send to Azure. + + :param scope: Required. Scope for this rule. The scope and filter + determine which clients match the rule. Possible values include: + 'default', 'network', 'host' + :type scope: str or ~azure.mgmt.storagecache.models.NfsAccessRuleScope + :param filter: Filter applied to the scope for this rule. The filter's + format depends on its scope. 'default' scope matches all clients and has + no filter value. 'network' scope takes a filter in CIDR format (for + example, 10.99.1.0/24). 'host' takes an IP address or fully qualified + domain name as filter. If a client does not match any filter rule and + there is no default rule, access is denied. + :type filter: str + :param access: Required. Access allowed by this rule. Possible values + include: 'no', 'ro', 'rw' + :type access: str or ~azure.mgmt.storagecache.models.NfsAccessRuleAccess + :param suid: Allow SUID semantics. + :type suid: bool + :param submount_access: For the default policy, allow access to + subdirectories under the root export. If this is set to no, clients can + only mount the path '/'. If set to yes, clients can mount a deeper path, + like '/a/b'. + :type submount_access: bool + :param root_squash: Map root accesses to anonymousUID and anonymousGID. + :type root_squash: bool + :param anonymous_uid: UID value that replaces 0 when rootSquash is true. + Default value: "-2" . + :type anonymous_uid: str + :param anonymous_gid: GID value that replaces 0 when rootSquash is true. + Default value: "-2" . + :type anonymous_gid: str + """ + + _validation = { + 'scope': {'required': True}, + 'access': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'str'}, + 'access': {'key': 'access', 'type': 'str'}, + 'suid': {'key': 'suid', 'type': 'bool'}, + 'submount_access': {'key': 'submountAccess', 'type': 'bool'}, + 'root_squash': {'key': 'rootSquash', 'type': 'bool'}, + 'anonymous_uid': {'key': 'anonymousUID', 'type': 'str'}, + 'anonymous_gid': {'key': 'anonymousGID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NfsAccessRule, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.filter = kwargs.get('filter', None) + self.access = kwargs.get('access', None) + self.suid = kwargs.get('suid', None) + self.submount_access = kwargs.get('submount_access', None) + self.root_squash = kwargs.get('root_squash', None) + self.anonymous_uid = kwargs.get('anonymous_uid', "-2") + self.anonymous_gid = kwargs.get('anonymous_gid', "-2") class ResourceSku(Model): @@ -672,11 +1168,11 @@ class ResourceSku(Model): throughput or ops/sec. :type capabilities: list[~azure.mgmt.storagecache.models.ResourceSkuCapabilities] - :ivar locations: The set of locations that the SKU is available. This will - be supported and registered Azure Geo Regions (e.g., West US, East US, + :ivar locations: The set of locations where the SKU is available. This is + the supported and registered Azure Geo Regions (e.g., West US, East US, Southeast Asia, etc.). :vartype locations: list[str] - :param location_info: The set of locations that the SKU is available. + :param location_info: The set of locations where the SKU is available. :type location_info: list[~azure.mgmt.storagecache.models.ResourceSkuLocationInfo] :param name: The name of this SKU. @@ -803,18 +1299,26 @@ class StorageTargetResource(Model): :ivar type: Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget :vartype type: str + :ivar location: Region name string. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.storagecache.models.SystemData """ _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -822,6 +1326,8 @@ def __init__(self, **kwargs): self.name = None self.id = None self.type = None + self.location = None + self.system_data = None class StorageTarget(StorageTargetResource): @@ -837,11 +1343,13 @@ class StorageTarget(StorageTargetResource): :ivar type: Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget :vartype type: str + :ivar location: Region name string. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.storagecache.models.SystemData :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -860,14 +1368,17 @@ class StorageTarget(StorageTargetResource): 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'junctions': {'key': 'properties.junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'properties.targetType', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'nfs3': {'key': 'properties.nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'properties.clfs', 'type': 'ClfsTarget'}, @@ -877,15 +1388,56 @@ class StorageTarget(StorageTargetResource): def __init__(self, **kwargs): super(StorageTarget, self).__init__(**kwargs) self.junctions = kwargs.get('junctions', None) - self.target_type = kwargs.get('target_type', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.nfs3 = kwargs.get('nfs3', None) self.clfs = kwargs.get('clfs', None) self.unknown = kwargs.get('unknown', None) +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.storagecache.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.storagecache.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + class UnknownTarget(Model): - """Properties pertained to UnknownTarget. + """Properties pertaining to the UnknownTarget. :param unknown_map: Dictionary of string->string pairs containing information about the Storage Target. @@ -909,8 +1461,6 @@ class UnknownTargetProperties(StorageTargetProperties): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -923,27 +1473,26 @@ class UnknownTargetProperties(StorageTargetProperties): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, } def __init__(self, **kwargs): super(UnknownTargetProperties, self).__init__(**kwargs) - self.target_base_type = 'unknown' + self.target_type = 'unknown' class UsageModel(Model): diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py index 9ee016d95557f..5eccd6d88139c 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py @@ -19,19 +19,34 @@ class ApiOperation(Model): :param display: The object that represents the operation. :type display: ~azure.mgmt.storagecache.models.ApiOperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param is_data_action: The flag that indicates whether the operation + applies to data plane. + :type is_data_action: bool :param name: Operation name: {provider}/{resource}/{operation} :type name: str + :param service_specification: Specification of the all the metrics + provided for a resource type. + :type service_specification: + ~azure.mgmt.storagecache.models.ApiOperationPropertiesServiceSpecification """ _attribute_map = { 'display': {'key': 'display', 'type': 'ApiOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ApiOperationPropertiesServiceSpecification'}, } - def __init__(self, *, display=None, name: str=None, **kwargs) -> None: + def __init__(self, *, display=None, origin: str=None, is_data_action: bool=None, name: str=None, service_specification=None, **kwargs) -> None: super(ApiOperation, self).__init__(**kwargs) self.display = display + self.origin = origin + self.is_data_action = is_data_action self.name = name + self.service_specification = service_specification class ApiOperationDisplay(Model): @@ -43,19 +58,76 @@ class ApiOperationDisplay(Model): :type provider: str :param resource: Resource on which the operation is performed: Cache, etc. :type resource: str + :param description: The description of the operation + :type description: str """ _attribute_map = { 'operation': {'key': 'operation', 'type': 'str'}, 'provider': {'key': 'provider', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None: + def __init__(self, *, operation: str=None, provider: str=None, resource: str=None, description: str=None, **kwargs) -> None: super(ApiOperationDisplay, self).__init__(**kwargs) self.operation = operation self.provider = provider self.resource = resource + self.description = description + + +class ApiOperationPropertiesServiceSpecification(Model): + """Specification of the all the metrics provided for a resource type. + + :param metric_specifications: Details about operations related to metrics. + :type metric_specifications: + list[~azure.mgmt.storagecache.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ApiOperationPropertiesServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + + +class AscOperation(Model): + """The status of operation. + + :param id: The operation Id. + :type id: str + :param name: The operation name. + :type name: str + :param start_time: The start time of the operation. + :type start_time: str + :param end_time: The end time of the operation. + :type end_time: str + :param status: The status of the operation. + :type status: str + :param error: The error detail of the operation if any. + :type error: ~azure.mgmt.storagecache.models.ErrorResponse + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, id: str=None, name: str=None, start_time: str=None, end_time: str=None, status: str=None, error=None, **kwargs) -> None: + super(AscOperation, self).__init__(**kwargs) + self.id = id + self.name = name + self.start_time = start_time + self.end_time = end_time + self.status = status + self.error = error class Cache(Model): @@ -77,6 +149,8 @@ class Cache(Model): :vartype type: str :param identity: The identity of the cache, if configured. :type identity: ~azure.mgmt.storagecache.models.CacheIdentity + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.storagecache.models.SystemData :param cache_size_gb: The size of this Cache, in GB. :type cache_size_gb: int :ivar health: Health of the Cache. @@ -103,6 +177,10 @@ class Cache(Model): :param security_settings: Specifies security settings of the cache. :type security_settings: ~azure.mgmt.storagecache.models.CacheSecuritySettings + :param directory_services_settings: Specifies Directory Services settings + of the cache. + :type directory_services_settings: + ~azure.mgmt.storagecache.models.CacheDirectorySettings :param sku: SKU for the Cache. :type sku: ~azure.mgmt.storagecache.models.CacheSku """ @@ -111,6 +189,7 @@ class Cache(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'health': {'readonly': True}, 'mount_addresses': {'readonly': True}, } @@ -122,6 +201,7 @@ class Cache(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'CacheIdentity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'cache_size_gb': {'key': 'properties.cacheSizeGB', 'type': 'int'}, 'health': {'key': 'properties.health', 'type': 'CacheHealth'}, 'mount_addresses': {'key': 'properties.mountAddresses', 'type': '[str]'}, @@ -131,10 +211,11 @@ class Cache(Model): 'network_settings': {'key': 'properties.networkSettings', 'type': 'CacheNetworkSettings'}, 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'CacheEncryptionSettings'}, 'security_settings': {'key': 'properties.securitySettings', 'type': 'CacheSecuritySettings'}, + 'directory_services_settings': {'key': 'properties.directoryServicesSettings', 'type': 'CacheDirectorySettings'}, 'sku': {'key': 'sku', 'type': 'CacheSku'}, } - def __init__(self, *, tags=None, location: str=None, identity=None, cache_size_gb: int=None, provisioning_state=None, subnet: str=None, upgrade_status=None, network_settings=None, encryption_settings=None, security_settings=None, sku=None, **kwargs) -> None: + def __init__(self, *, tags=None, location: str=None, identity=None, cache_size_gb: int=None, provisioning_state=None, subnet: str=None, upgrade_status=None, network_settings=None, encryption_settings=None, security_settings=None, directory_services_settings=None, sku=None, **kwargs) -> None: super(Cache, self).__init__(**kwargs) self.tags = tags self.id = None @@ -142,6 +223,7 @@ def __init__(self, *, tags=None, location: str=None, identity=None, cache_size_g self.name = None self.type = None self.identity = identity + self.system_data = None self.cache_size_gb = cache_size_gb self.health = None self.mount_addresses = None @@ -151,9 +233,129 @@ def __init__(self, *, tags=None, location: str=None, identity=None, cache_size_g self.network_settings = network_settings self.encryption_settings = encryption_settings self.security_settings = security_settings + self.directory_services_settings = directory_services_settings self.sku = sku +class CacheActiveDirectorySettings(Model): + """Active Directory settings used to join a cache to a domain. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param primary_dns_ip_address: Required. Primary DNS IP address used to + resolve the Active Directory domain controller's fully qualified domain + name. + :type primary_dns_ip_address: str + :param secondary_dns_ip_address: Secondary DNS IP address used to resolve + the Active Directory domain controller's fully qualified domain name. + :type secondary_dns_ip_address: str + :param domain_name: Required. The fully qualified domain name of the + Active Directory domain controller. + :type domain_name: str + :param domain_net_bios_name: Required. The Active Directory domain's + NetBIOS name. + :type domain_net_bios_name: str + :param cache_net_bios_name: Required. The NetBIOS name to assign to the + HPC Cache when it joins the Active Directory domain as a server. Length + must 1-15 characters from the class [-0-9a-zA-Z]. + :type cache_net_bios_name: str + :ivar domain_joined: True if the HPC Cache is joined to the Active + Directory domain. Possible values include: 'Yes', 'No', 'Error' + :vartype domain_joined: str or + ~azure.mgmt.storagecache.models.DomainJoinedType + :param credentials: Active Directory admin credentials used to join the + HPC Cache to a domain. + :type credentials: + ~azure.mgmt.storagecache.models.CacheActiveDirectorySettingsCredentials + """ + + _validation = { + 'primary_dns_ip_address': {'required': True}, + 'domain_name': {'required': True}, + 'domain_net_bios_name': {'required': True}, + 'cache_net_bios_name': {'required': True, 'pattern': r'^[-0-9a-zA-Z]{1,15}$'}, + 'domain_joined': {'readonly': True}, + } + + _attribute_map = { + 'primary_dns_ip_address': {'key': 'primaryDnsIpAddress', 'type': 'str'}, + 'secondary_dns_ip_address': {'key': 'secondaryDnsIpAddress', 'type': 'str'}, + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'domain_net_bios_name': {'key': 'domainNetBiosName', 'type': 'str'}, + 'cache_net_bios_name': {'key': 'cacheNetBiosName', 'type': 'str'}, + 'domain_joined': {'key': 'domainJoined', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CacheActiveDirectorySettingsCredentials'}, + } + + def __init__(self, *, primary_dns_ip_address: str, domain_name: str, domain_net_bios_name: str, cache_net_bios_name: str, secondary_dns_ip_address: str=None, credentials=None, **kwargs) -> None: + super(CacheActiveDirectorySettings, self).__init__(**kwargs) + self.primary_dns_ip_address = primary_dns_ip_address + self.secondary_dns_ip_address = secondary_dns_ip_address + self.domain_name = domain_name + self.domain_net_bios_name = domain_net_bios_name + self.cache_net_bios_name = cache_net_bios_name + self.domain_joined = None + self.credentials = credentials + + +class CacheActiveDirectorySettingsCredentials(Model): + """Active Directory admin credentials used to join the HPC Cache to a domain. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. Username of the Active Directory domain + administrator. This value is stored encrypted and not returned on + response. + :type username: str + :param password: Required. Plain text password of the Active Directory + domain administrator. This value is stored encrypted and not returned on + response. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(CacheActiveDirectorySettingsCredentials, self).__init__(**kwargs) + self.username = username + self.password = password + + +class CacheDirectorySettings(Model): + """Cache Directory Services settings. + + :param active_directory: Specifies settings for joining the HPC Cache to + an Active Directory domain. + :type active_directory: + ~azure.mgmt.storagecache.models.CacheActiveDirectorySettings + :param username_download: Specifies settings for Extended Groups. Extended + Groups allows users to be members of more than 16 groups. + :type username_download: + ~azure.mgmt.storagecache.models.CacheUsernameDownloadSettings + """ + + _attribute_map = { + 'active_directory': {'key': 'activeDirectory', 'type': 'CacheActiveDirectorySettings'}, + 'username_download': {'key': 'usernameDownload', 'type': 'CacheUsernameDownloadSettings'}, + } + + def __init__(self, *, active_directory=None, username_download=None, **kwargs) -> None: + super(CacheDirectorySettings, self).__init__(**kwargs) + self.active_directory = active_directory + self.username_download = username_download + + class CacheEncryptionSettings(Model): """Cache encryption settings. @@ -261,17 +463,18 @@ def __init__(self, *, mtu: int=1500, **kwargs) -> None: class CacheSecuritySettings(Model): """Cache security settings. - :param root_squash: root squash of cache property. - :type root_squash: bool + :param access_policies: NFS access policies defined for this cache. + :type access_policies: + list[~azure.mgmt.storagecache.models.NfsAccessPolicy] """ _attribute_map = { - 'root_squash': {'key': 'rootSquash', 'type': 'bool'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[NfsAccessPolicy]'}, } - def __init__(self, *, root_squash: bool=None, **kwargs) -> None: + def __init__(self, *, access_policies=None, **kwargs) -> None: super(CacheSecuritySettings, self).__init__(**kwargs) - self.root_squash = root_squash + self.access_policies = access_policies class CacheSku(Model): @@ -340,8 +543,118 @@ def __init__(self, **kwargs) -> None: self.pending_firmware_version = None +class CacheUsernameDownloadSettings(Model): + """Settings for Extended Groups username and group download. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param extended_groups_enabled: Whether or not Extended Groups is enabled. + :type extended_groups_enabled: bool + :param username_source: This setting determines how the cache gets + username and group names for clients. Possible values include: 'AD', + 'LDAP', 'File', 'None'. Default value: "None" . + :type username_source: str or + ~azure.mgmt.storagecache.models.UsernameSource + :param group_file_uri: The URI of the file containing group information + (in /etc/group file format). This field must be populated when + 'usernameSource' is set to 'File'. + :type group_file_uri: str + :param user_file_uri: The URI of the file containing user information (in + /etc/passwd file format). This field must be populated when + 'usernameSource' is set to 'File'. + :type user_file_uri: str + :param ldap_server: The fully qualified domain name or IP address of the + LDAP server to use. + :type ldap_server: str + :param ldap_base_dn: The base distinguished name for the LDAP domain. + :type ldap_base_dn: str + :param encrypt_ldap_connection: Whether or not the LDAP connection should + be encrypted. + :type encrypt_ldap_connection: bool + :param require_valid_certificate: Determines if the certificates must be + validated by a certificate authority. When true, caCertificateURI must be + provided. + :type require_valid_certificate: bool + :param auto_download_certificate: Determines if the certificate should be + automatically downloaded. This applies to 'caCertificateURI' only if + 'requireValidCertificate' is true. + :type auto_download_certificate: bool + :param ca_certificate_uri: The URI of the CA certificate to validate the + LDAP secure connection. This field must be populated when + 'requireValidCertificate' is set to true. + :type ca_certificate_uri: str + :ivar username_downloaded: Indicates whether or not the HPC Cache has + performed the username download successfully. Possible values include: + 'Yes', 'No', 'Error' + :vartype username_downloaded: str or + ~azure.mgmt.storagecache.models.UsernameDownloadedType + :param credentials: When present, these are the credentials for the secure + LDAP connection. + :type credentials: + ~azure.mgmt.storagecache.models.CacheUsernameDownloadSettingsCredentials + """ + + _validation = { + 'username_downloaded': {'readonly': True}, + } + + _attribute_map = { + 'extended_groups_enabled': {'key': 'extendedGroupsEnabled', 'type': 'bool'}, + 'username_source': {'key': 'usernameSource', 'type': 'str'}, + 'group_file_uri': {'key': 'groupFileURI', 'type': 'str'}, + 'user_file_uri': {'key': 'userFileURI', 'type': 'str'}, + 'ldap_server': {'key': 'ldapServer', 'type': 'str'}, + 'ldap_base_dn': {'key': 'ldapBaseDn', 'type': 'str'}, + 'encrypt_ldap_connection': {'key': 'encryptLdapConnection', 'type': 'bool'}, + 'require_valid_certificate': {'key': 'requireValidCertificate', 'type': 'bool'}, + 'auto_download_certificate': {'key': 'autoDownloadCertificate', 'type': 'bool'}, + 'ca_certificate_uri': {'key': 'caCertificateURI', 'type': 'str'}, + 'username_downloaded': {'key': 'usernameDownloaded', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CacheUsernameDownloadSettingsCredentials'}, + } + + def __init__(self, *, extended_groups_enabled: bool=None, username_source="None", group_file_uri: str=None, user_file_uri: str=None, ldap_server: str=None, ldap_base_dn: str=None, encrypt_ldap_connection: bool=None, require_valid_certificate: bool=None, auto_download_certificate: bool=None, ca_certificate_uri: str=None, credentials=None, **kwargs) -> None: + super(CacheUsernameDownloadSettings, self).__init__(**kwargs) + self.extended_groups_enabled = extended_groups_enabled + self.username_source = username_source + self.group_file_uri = group_file_uri + self.user_file_uri = user_file_uri + self.ldap_server = ldap_server + self.ldap_base_dn = ldap_base_dn + self.encrypt_ldap_connection = encrypt_ldap_connection + self.require_valid_certificate = require_valid_certificate + self.auto_download_certificate = auto_download_certificate + self.ca_certificate_uri = ca_certificate_uri + self.username_downloaded = None + self.credentials = credentials + + +class CacheUsernameDownloadSettingsCredentials(Model): + """When present, these are the credentials for the secure LDAP connection. + + :param bind_dn: The Bind Distinguished Name identity to be used in the + secure LDAP connection. This value is stored encrypted and not returned on + response. + :type bind_dn: str + :param bind_password: The Bind password to be used in the secure LDAP + connection. This value is stored encrypted and not returned on response. + :type bind_password: str + """ + + _attribute_map = { + 'bind_dn': {'key': 'bindDn', 'type': 'str'}, + 'bind_password': {'key': 'bindPassword', 'type': 'str'}, + } + + def __init__(self, *, bind_dn: str=None, bind_password: str=None, **kwargs) -> None: + super(CacheUsernameDownloadSettingsCredentials, self).__init__(**kwargs) + self.bind_dn = bind_dn + self.bind_password = bind_password + + class ClfsTarget(Model): - """Properties pertained to ClfsTarget. + """Properties pertaining to the ClfsTarget. :param target: Resource ID of storage container. :type target: str @@ -368,8 +681,6 @@ class StorageTargetProperties(Model): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -382,37 +693,35 @@ class StorageTargetProperties(Model): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, } _subtype_map = { - 'target_base_type': {'nfs3': 'Nfs3TargetProperties', 'clfs': 'ClfsTargetProperties', 'unknown': 'UnknownTargetProperties'} + 'target_type': {'nfs3': 'Nfs3TargetProperties', 'clfs': 'ClfsTargetProperties', 'unknown': 'UnknownTargetProperties'} } - def __init__(self, *, junctions=None, target_type: str=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: + def __init__(self, *, junctions=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: super(StorageTargetProperties, self).__init__(**kwargs) self.junctions = junctions - self.target_type = target_type self.provisioning_state = provisioning_state self.nfs3 = nfs3 self.clfs = clfs self.unknown = unknown - self.target_base_type = None + self.target_type = None class ClfsTargetProperties(StorageTargetProperties): @@ -423,8 +732,6 @@ class ClfsTargetProperties(StorageTargetProperties): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -437,27 +744,26 @@ class ClfsTargetProperties(StorageTargetProperties): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, } - def __init__(self, *, junctions=None, target_type: str=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: - super(ClfsTargetProperties, self).__init__(junctions=junctions, target_type=target_type, provisioning_state=provisioning_state, nfs3=nfs3, clfs=clfs, unknown=unknown, **kwargs) - self.target_base_type = 'clfs' + def __init__(self, *, junctions=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: + super(ClfsTargetProperties, self).__init__(junctions=junctions, provisioning_state=provisioning_state, nfs3=nfs3, clfs=clfs, unknown=unknown, **kwargs) + self.target_type = 'clfs' class CloudError(Model): @@ -519,6 +825,26 @@ def __init__(self, *, code: str=None, details=None, message: str=None, target: s self.target = target +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + class KeyVaultKeyReference(Model): """Describes a reference to Key Vault Key. @@ -565,6 +891,79 @@ def __init__(self, *, id: str=None, **kwargs) -> None: self.id = id +class MetricDimension(Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension + :type name: str + :param display_name: Localized friendly display name of the dimension + :type display_name: str + :param internal_name: Internal name of the dimension. + :type internal_name: str + :param to_be_exported_for_shoebox: To be exported to shoe box. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(MetricDimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.internal_name = internal_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class MetricSpecification(Model): + """Details about operation related to metrics. + + :param name: The name of the metric. + :type name: str + :param display_name: Localized display name of the metric. + :type display_name: str + :param display_description: The description of the metric. + :type display_description: str + :param unit: The unit that the metric is measured in. + :type unit: str + :param aggregation_type: The type of metric aggregation. + :type aggregation_type: str + :param supported_aggregation_types: Support metric aggregation type. + :type supported_aggregation_types: list[str or + ~azure.mgmt.storagecache.models.MetricAggregationType] + :param metric_class: Type of metrics. + :type metric_class: str + :param dimensions: Dimensions of the metric + :type dimensions: list[~azure.mgmt.storagecache.models.MetricDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'metric_class': {'key': 'metricClass', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, supported_aggregation_types=None, metric_class: str=None, dimensions=None, **kwargs) -> None: + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.metric_class = metric_class + self.dimensions = dimensions + + class NamespaceJunction(Model): """A namespace junction. @@ -574,29 +973,34 @@ class NamespaceJunction(Model): :type target_path: str :param nfs_export: NFS export where targetPath exists. :type nfs_export: str + :param nfs_access_policy: Name of the access policy applied to this + junction. + :type nfs_access_policy: str """ _attribute_map = { 'namespace_path': {'key': 'namespacePath', 'type': 'str'}, 'target_path': {'key': 'targetPath', 'type': 'str'}, 'nfs_export': {'key': 'nfsExport', 'type': 'str'}, + 'nfs_access_policy': {'key': 'nfsAccessPolicy', 'type': 'str'}, } - def __init__(self, *, namespace_path: str=None, target_path: str=None, nfs_export: str=None, **kwargs) -> None: + def __init__(self, *, namespace_path: str=None, target_path: str=None, nfs_export: str=None, nfs_access_policy: str=None, **kwargs) -> None: super(NamespaceJunction, self).__init__(**kwargs) self.namespace_path = namespace_path self.target_path = target_path self.nfs_export = nfs_export + self.nfs_access_policy = nfs_access_policy class Nfs3Target(Model): - """Properties pertained to Nfs3Target. + """Properties pertaining to the Nfs3Target. :param target: IP address or host name of an NFSv3 host (e.g., 10.0.44.44). :type target: str - :param usage_model: Identifies the primary usage model to be used for this - Storage Target. Get choices from .../usageModels + :param usage_model: Identifies the usage model to be used for this Storage + Target. Get choices from .../usageModels :type usage_model: str """ @@ -623,8 +1027,6 @@ class Nfs3TargetProperties(StorageTargetProperties): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -637,27 +1039,121 @@ class Nfs3TargetProperties(StorageTargetProperties): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, + } + + def __init__(self, *, junctions=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: + super(Nfs3TargetProperties, self).__init__(junctions=junctions, provisioning_state=provisioning_state, nfs3=nfs3, clfs=clfs, unknown=unknown, **kwargs) + self.target_type = 'nfs3' + + +class NfsAccessPolicy(Model): + """A set of rules describing access policies applied to NFSv3 clients of the + cache. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name identifying this policy. Access Policy names + are not case sensitive. + :type name: str + :param access_rules: Required. The set of rules describing client accesses + allowed under this policy. + :type access_rules: list[~azure.mgmt.storagecache.models.NfsAccessRule] + """ + + _validation = { + 'name': {'required': True}, + 'access_rules': {'required': True}, } - def __init__(self, *, junctions=None, target_type: str=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: - super(Nfs3TargetProperties, self).__init__(junctions=junctions, target_type=target_type, provisioning_state=provisioning_state, nfs3=nfs3, clfs=clfs, unknown=unknown, **kwargs) - self.target_base_type = 'nfs3' + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'access_rules': {'key': 'accessRules', 'type': '[NfsAccessRule]'}, + } + + def __init__(self, *, name: str, access_rules, **kwargs) -> None: + super(NfsAccessPolicy, self).__init__(**kwargs) + self.name = name + self.access_rules = access_rules + + +class NfsAccessRule(Model): + """Rule to place restrictions on portions of the cache namespace being + presented to clients. + + All required parameters must be populated in order to send to Azure. + + :param scope: Required. Scope for this rule. The scope and filter + determine which clients match the rule. Possible values include: + 'default', 'network', 'host' + :type scope: str or ~azure.mgmt.storagecache.models.NfsAccessRuleScope + :param filter: Filter applied to the scope for this rule. The filter's + format depends on its scope. 'default' scope matches all clients and has + no filter value. 'network' scope takes a filter in CIDR format (for + example, 10.99.1.0/24). 'host' takes an IP address or fully qualified + domain name as filter. If a client does not match any filter rule and + there is no default rule, access is denied. + :type filter: str + :param access: Required. Access allowed by this rule. Possible values + include: 'no', 'ro', 'rw' + :type access: str or ~azure.mgmt.storagecache.models.NfsAccessRuleAccess + :param suid: Allow SUID semantics. + :type suid: bool + :param submount_access: For the default policy, allow access to + subdirectories under the root export. If this is set to no, clients can + only mount the path '/'. If set to yes, clients can mount a deeper path, + like '/a/b'. + :type submount_access: bool + :param root_squash: Map root accesses to anonymousUID and anonymousGID. + :type root_squash: bool + :param anonymous_uid: UID value that replaces 0 when rootSquash is true. + Default value: "-2" . + :type anonymous_uid: str + :param anonymous_gid: GID value that replaces 0 when rootSquash is true. + Default value: "-2" . + :type anonymous_gid: str + """ + + _validation = { + 'scope': {'required': True}, + 'access': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'str'}, + 'access': {'key': 'access', 'type': 'str'}, + 'suid': {'key': 'suid', 'type': 'bool'}, + 'submount_access': {'key': 'submountAccess', 'type': 'bool'}, + 'root_squash': {'key': 'rootSquash', 'type': 'bool'}, + 'anonymous_uid': {'key': 'anonymousUID', 'type': 'str'}, + 'anonymous_gid': {'key': 'anonymousGID', 'type': 'str'}, + } + + def __init__(self, *, scope, access, filter: str=None, suid: bool=None, submount_access: bool=None, root_squash: bool=None, anonymous_uid: str="-2", anonymous_gid: str="-2", **kwargs) -> None: + super(NfsAccessRule, self).__init__(**kwargs) + self.scope = scope + self.filter = filter + self.access = access + self.suid = suid + self.submount_access = submount_access + self.root_squash = root_squash + self.anonymous_uid = anonymous_uid + self.anonymous_gid = anonymous_gid class ResourceSku(Model): @@ -672,11 +1168,11 @@ class ResourceSku(Model): throughput or ops/sec. :type capabilities: list[~azure.mgmt.storagecache.models.ResourceSkuCapabilities] - :ivar locations: The set of locations that the SKU is available. This will - be supported and registered Azure Geo Regions (e.g., West US, East US, + :ivar locations: The set of locations where the SKU is available. This is + the supported and registered Azure Geo Regions (e.g., West US, East US, Southeast Asia, etc.). :vartype locations: list[str] - :param location_info: The set of locations that the SKU is available. + :param location_info: The set of locations where the SKU is available. :type location_info: list[~azure.mgmt.storagecache.models.ResourceSkuLocationInfo] :param name: The name of this SKU. @@ -803,18 +1299,26 @@ class StorageTargetResource(Model): :ivar type: Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget :vartype type: str + :ivar location: Region name string. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.storagecache.models.SystemData """ _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs) -> None: @@ -822,6 +1326,8 @@ def __init__(self, **kwargs) -> None: self.name = None self.id = None self.type = None + self.location = None + self.system_data = None class StorageTarget(StorageTargetResource): @@ -837,11 +1343,13 @@ class StorageTarget(StorageTargetResource): :ivar type: Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget :vartype type: str + :ivar location: Region name string. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.storagecache.models.SystemData :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -860,32 +1368,76 @@ class StorageTarget(StorageTargetResource): 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'junctions': {'key': 'properties.junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'properties.targetType', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'nfs3': {'key': 'properties.nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'properties.clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'properties.unknown', 'type': 'UnknownTarget'}, } - def __init__(self, *, junctions=None, target_type: str=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: + def __init__(self, *, junctions=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: super(StorageTarget, self).__init__(**kwargs) self.junctions = junctions - self.target_type = target_type self.provisioning_state = provisioning_state self.nfs3 = nfs3 self.clfs = clfs self.unknown = unknown +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.storagecache.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.storagecache.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + class UnknownTarget(Model): - """Properties pertained to UnknownTarget. + """Properties pertaining to the UnknownTarget. :param unknown_map: Dictionary of string->string pairs containing information about the Storage Target. @@ -909,8 +1461,6 @@ class UnknownTargetProperties(StorageTargetProperties): :param junctions: List of Cache namespace junctions to target for namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type of the Storage Target. - :type target_type: str :param provisioning_state: ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', @@ -923,27 +1473,26 @@ class UnknownTargetProperties(StorageTargetProperties): :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget - :param target_base_type: Required. Constant filled by server. - :type target_base_type: str + :param target_type: Required. Constant filled by server. + :type target_type: str """ _validation = { - 'target_base_type': {'required': True}, + 'target_type': {'required': True}, } _attribute_map = { 'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'}, - 'target_type': {'key': 'targetType', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'}, 'clfs': {'key': 'clfs', 'type': 'ClfsTarget'}, 'unknown': {'key': 'unknown', 'type': 'UnknownTarget'}, - 'target_base_type': {'key': 'targetBaseType', 'type': 'str'}, + 'target_type': {'key': 'targetType', 'type': 'str'}, } - def __init__(self, *, junctions=None, target_type: str=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: - super(UnknownTargetProperties, self).__init__(junctions=junctions, target_type=target_type, provisioning_state=provisioning_state, nfs3=nfs3, clfs=clfs, unknown=unknown, **kwargs) - self.target_base_type = 'unknown' + def __init__(self, *, junctions=None, provisioning_state=None, nfs3=None, clfs=None, unknown=None, **kwargs) -> None: + super(UnknownTargetProperties, self).__init__(junctions=junctions, provisioning_state=provisioning_state, nfs3=nfs3, clfs=clfs, unknown=unknown, **kwargs) + self.target_type = 'unknown' class UsageModel(Model): diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_management_client_enums.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_management_client_enums.py index 77791c659078f..5c47b428d14bf 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_management_client_enums.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_management_client_enums.py @@ -12,12 +12,31 @@ from enum import Enum +class MetricAggregationType(str, Enum): + + not_specified = "NotSpecified" + none = "None" + average = "Average" + minimum = "Minimum" + maximum = "Maximum" + total = "Total" + count = "Count" + + class CacheIdentityType(str, Enum): system_assigned = "SystemAssigned" none = "None" +class CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + class HealthStateType(str, Enum): unknown = "Unknown" @@ -47,11 +66,40 @@ class FirmwareStatusType(str, Enum): unavailable = "unavailable" -class StorageTargetType(str, Enum): +class NfsAccessRuleScope(str, Enum): + + default = "default" + network = "network" + host = "host" + + +class NfsAccessRuleAccess(str, Enum): + + no = "no" + ro = "ro" + rw = "rw" + + +class DomainJoinedType(str, Enum): + + yes = "Yes" + no = "No" + error = "Error" + + +class UsernameSource(str, Enum): + + ad = "AD" + ldap = "LDAP" + file = "File" + none = "None" + + +class UsernameDownloadedType(str, Enum): - nfs3 = "nfs3" - clfs = "clfs" - unknown = "unknown" + yes = "Yes" + no = "No" + error = "Error" class ReasonCode(str, Enum): diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/__init__.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/__init__.py index a172beeaba235..ef03e08ed00fe 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/__init__.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/__init__.py @@ -12,6 +12,7 @@ from ._operations import Operations from ._skus_operations import SkusOperations from ._usage_models_operations import UsageModelsOperations +from ._asc_operations import AscOperations from ._caches_operations import CachesOperations from ._storage_targets_operations import StorageTargetsOperations @@ -19,6 +20,7 @@ 'Operations', 'SkusOperations', 'UsageModelsOperations', + 'AscOperations', 'CachesOperations', 'StorageTargetsOperations', ] diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_asc_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_asc_operations.py new file mode 100644 index 0000000000000..ad9f25af498ef --- /dev/null +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_asc_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AscOperations(object): + """AscOperations 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: Client API version. Constant value: "2020-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-10-01" + + self.config = config + + def get( + self, location, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets the status of an asynchronous operation for the Azure HPC Cache. + + :param location: The name of the region used to look up the operation. + :type location: str + :param operation_id: The operation id which uniquely identifies the + asynchronous operation. + :type operation_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: AscOperation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storagecache.models.AscOperation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AscOperation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations/{operationId}'} diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py index c64d09bd3dcbc..186a48699bedb 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py @@ -27,7 +27,7 @@ class CachesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2020-03-01". + :ivar api_version: Client API version. Constant value: "2020-10-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-10-01" self.config = config @@ -232,8 +232,8 @@ def delete( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -278,8 +278,8 @@ def get( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -371,7 +371,7 @@ def _create_or_update_initial( 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, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -395,8 +395,8 @@ def create_or_update( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param cache: Object containing the user-selectable properties of the new Cache. If read-only properties are included, they must match the @@ -448,8 +448,8 @@ def update( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param cache: Object containing the user-selectable properties of the Cache. If read-only properties are included, they must match the @@ -516,6 +516,86 @@ def update( update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}'} + def _debug_info_initial( + self, resource_group_name, cache_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.debug_info.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'cacheName': self._serialize.url("cache_name", cache_name, 'str', pattern=r'^[-0-9a-zA-Z_]{1,80}$') + } + 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 = {} + 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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def debug_info( + self, resource_group_name, cache_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Tells a Cache to write generate debug info for support to process. + + :param resource_group_name: Target resource group. + :type resource_group_name: str + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. + :type cache_name: 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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._debug_info_initial( + resource_group_name=resource_group_name, + cache_name=cache_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_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': 'azure-async-operation'}, **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) + debug_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/debugInfo'} + + def _flush_initial( self, resource_group_name, cache_name, custom_headers=None, raw=False, **operation_config): # Construct URL @@ -573,8 +653,8 @@ def flush( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -669,8 +749,8 @@ def start( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -765,8 +845,8 @@ def stop( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -862,8 +942,8 @@ def upgrade_firmware( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py index 71eef0813ab07..4fc5100b2a80e 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2020-03-01". + :ivar api_version: Client API version. Constant value: "2020-10-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-10-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py index b22020cdfbb33..3c3e525d0fe04 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py @@ -25,7 +25,7 @@ class SkusOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2020-03-01". + :ivar api_version: Client API version. Constant value: "2020-10-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-10-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py index 02250aecc604c..c63e412602d79 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py @@ -27,7 +27,7 @@ class StorageTargetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2020-03-01". + :ivar api_version: Client API version. Constant value: "2020-10-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-10-01" self.config = config @@ -47,8 +47,8 @@ def list_by_cache( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -175,8 +175,8 @@ def delete( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param storage_target_name: Name of Storage Target. :type storage_target_name: str @@ -224,11 +224,11 @@ def get( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param storage_target_name: Name of the Storage Target. Length of name - must be not greater than 80 and chars must be in list of [-0-9a-zA-Z_] + must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type storage_target_name: str :param dict custom_headers: headers that will be added to the request @@ -323,7 +323,7 @@ def _create_or_update_initial( 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, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -350,11 +350,11 @@ def create_or_update( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of Cache. Length of name must be not greater - than 80 and chars must be in list of [-0-9a-zA-Z_] char class. + :param cache_name: Name of Cache. Length of name must not be greater + than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type cache_name: str :param storage_target_name: Name of the Storage Target. Length of name - must be not greater than 80 and chars must be in list of [-0-9a-zA-Z_] + must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. :type storage_target_name: str :param storagetarget: Object containing the definition of a Storage diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py index 9053c43233aeb..77fdd171f7568 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py @@ -25,7 +25,7 @@ class UsageModelsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2020-03-01". + :ivar api_version: Client API version. Constant value: "2020-10-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-10-01" self.config = config